-
Notifications
You must be signed in to change notification settings - Fork 101
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-22459 Implement zone Raft group listener #5134
base: main
Are you sure you want to change the base?
Conversation
|
||
CompletableFuture<?>[] futures = zoneTables.stream() | ||
.map(tbl -> { | ||
CompletableFuture<Void> createStoragesFuture = runAsync( |
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.
To reviewer: this change is needed, because there was a bug: getOrCreatePartitionStorages
returns a CompletableFuture
, which we wrapped in a runAsync
having a double wrapped future, which means we didn't wait for the nested future to complete
bcb1d1b
to
e830657
Compare
|
||
clo.result(new TransactionResult(cmd.commit() ? COMMITTED : ABORTED, cmd.commitTimestamp())); | ||
} else if (command instanceof PrimaryReplicaChangeCommand) { | ||
// This is a hack for tests, this command is not issued in production because no zone-wide placement driver exists yet. |
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.
Don't we need a TODO here to remove the hack later?
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 don't know which ticket to use here and I don't expect us to miss this place, because it will likely not work properly when we will implement the placement driver.
|
||
processTableSpecificCommand(tablePartitionId, clo); | ||
} else { | ||
LOG.info("Message type " + command.getClass() + " is not supported by the zone partition RAFT listener yet"); |
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.
Should this be a WARN?
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.
This is from the previous implementation and this is temporary code anyway, this will become an assertion eventually
return Collections.singleton(value).iterator(); | ||
} | ||
|
||
private static CommandClosure<WriteCommand> idempotentCommandClosure(CommandClosure<WriteCommand> clo) { |
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.
It seems that this is a 'no-result-propagating' closure. Why is it called idempotent?
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.
The idea is that you can call result
many times and it will not affect the state of the closure) What do you propose?
e4d3fce
to
277fda6
Compare
277fda6
to
e53d829
Compare
https://issues.apache.org/jira/browse/IGNITE-22459
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
The Review Checklist
- There is a single JIRA ticket related to the pull request.
- The web-link to the pull request is attached to the JIRA ticket.
- The JIRA ticket has the Patch Available state.
- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
Notes