-
Notifications
You must be signed in to change notification settings - Fork 99
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
IGNITE-23885 Start partition in a common manner in case of a single element in chain #5012
base: main
Are you sure you want to change the base?
Conversation
* @param revision Revision. | ||
* @return Returns partition assignments from meta storage locally or {@code null} if assignments is absent. | ||
*/ | ||
public static @Nullable Assignments stableAssignments( |
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.
Let's name it with "Locally" suffix, or rename tableAssignmentsChainGetLocally
. Let's have common naming pattern for "get locally" methods
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.
Renamed to *GetLocally
&& (pendingAssignments == null || !pendingAssignments.force()); | ||
AssignmentsChain assignmentsChain = assignmentsChains.get(i); | ||
|
||
if (assignmentsChain == null || assignmentsChain.chain().size() == 1) { |
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.
Let's add comment describing why assignmentsChain.chain().size() == 1
is a special case and why we have different behaviour instead
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 would refactor this check to a separate method so we could reuse this method in the second place
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.
done
* @param revision Revision. | ||
* @return Future with table assignments as a value. | ||
*/ | ||
public static List<AssignmentsChain> tableAssignmentsChainGetLocally( |
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.
Or let's remove locally suffix from here
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.
Renamed to *GetLocally
https://issues.apache.org/jira/browse/IGNITE-23885