-
Notifications
You must be signed in to change notification settings - Fork 1.9k
IGNITE-7986: GridPartitionStateMap.entrySet() optimization. #3659
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
Conversation
|
|
||
| cur = next; | ||
| next++; | ||
| cur = idx / BITS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to document how it works. It is not totally clear to me after reading the code what is done below
|
|
||
| assertNotNull(entry1.getValue()); | ||
| assertNotNull(entry2.getValue()); | ||
| assertNotEquals(entry1.getKey(), entry2.getKey()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to add space before sematic block
| } | ||
|
|
||
| /** | ||
| * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please document what test does and what is expected.
|
|
||
| return new Iterator<Entry<Integer, GridDhtPartitionState>>() { | ||
| private int next; | ||
| private int idx; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc for this and other fields
| private int idx; | ||
| private int cur; | ||
|
|
||
| @Override public boolean hasNext() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like has next called twice will change iterarot state
…ache#3659. Signed-off-by: dpavlov <dpavlov@apache.org> (cherry picked from commit bc7814e)
…ache#3659. Signed-off-by: dpavlov <dpavlov@apache.org> (cherry picked from commit bc7814e)
No description provided.