-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
SCAN cursor is int, should be unsigned long #531
Comments
Yes. This makes lots of sense. This will break backward compatibility, so we should be careful on when we should a merge a fix for this. |
I agree to be careful on breaking backward compatibility. :) But I also think we should think more about this issue, because it's not a simple functional lack, it's a bug. Let me explain this issue by showing current implementation to scan.
*scan methods may throw NumberFormatException when Redis returns cursor value upper than signed integer's max, and there's no try/catch statement in Jedis. Modifying this will break compatibility only related to *scan commands, so only users who uses *scan command feel inconvenience. (Am I right?) I wish to listen our opinions about it. :) |
@HeartSaVioR I do agree that it is a bug. Since SCAN was introduced in the last release, maybe we can merge your PR now and release a minor with the change. What do you think? |
Following semver, patches need to be backward compatible bugfixes. And this
By doing this, we are backward compatible and we can release this in the We should also learn from this (specially me :) ) to pay more attention On Feb 9, 2014 2:06 PM, "Marcos Nils" notifications@github.com wrote:
|
@marcosnils @xetorthio I respect your thought. :) Though I really wanna follow @marcosnils and let this PR to next minor, I also agree to try to respect policies we have, so I'm following @xetorthio . So what would be nice to name new *scan method? |
What about overloading the current *scan methods but instead of using an int jursor just send a string?If we annotate the methods with a good description it shouldn't be a problem |
Exactly. Overloading :)
|
@xetorthio @marcosnils I've just found that it's overloadable! Thank you all! :) |
@marcosnils @xetorthio I open new pull request cleaned one, #536. |
Perfect, I'm closing this one so we don't get confused!. |
Great that SCAN etc. are in latest release. The official documentation describes the cursor as a "string representing an unsigned 64 bit number", whereas the jedis methods use ints for cursors. Obviously, long type doesn't quite get us there either unless we mess with the sign, but would presumably be closer to compatibility with documented spec. I'd vote for strings personally.
The text was updated successfully, but these errors were encountered: