Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LINDEX implementation added #1395

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Arijit6258
Copy link
Contributor

No description provided.

@Arijit6258
Copy link
Contributor Author

@apoorvyadav1111 @lucifercr07 Please review the PR .

Issue : #1339

@JyotinderSingh
Copy link
Collaborator

Hi @Arijit6258, apologies for the delayed review. The team is now returning from vacations and will review this soon. In the meantime could you please resolve the merge conflicts that are happening?

@Arijit6258
Copy link
Contributor Author

Hi @JyotinderSingh , sure I will check.

@Arijit6258
Copy link
Contributor Author

@JyotinderSingh I have merged the latest master. There is a failure in integration test,which is due to some commit in master. You can check master branch has also test-failed commits.

Copy link
Contributor

@lucifercr07 lucifercr07 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comments.


obj := store.Get(key)

if obj == nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If a key doesn't exist we should return nil similar to redis.

> LINDEX test 1
(nil)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucifercr07 does "(nil)" works ?? (nil) with string quotation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucifercr07 @JyotinderSingh

Do we need to make the behavior exactly like Redis? I feel the user might not be able to understand why (nil) is being returned in this case. Showing users a proper error message seems to be a better solution to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lucifercr07 @JyotinderSingh waiting for your replies. Accordingly I will change and update the PR.

index, err := strconv.ParseInt(args[1], 10, 64)

if err != nil {
return makeEvalError(errors.New("-ERR value is not an integer or out of range"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we reuse this var here? IntOrOutOfRangeErr
We can create similar in migrated_errors.go and reuse it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants