tkalkirill commented on code in PR #1263:
URL: https://github.com/apache/ignite-3/pull/1263#discussion_r1007939496
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -147,6 +148,7 @@ public void onWrite(Iterator<CommandClosure<WriteCommand>>
iterator) {
* Handler for the {@link UpdateCommand}.
*
* @param cmd Command.
+ * @param commandIndex Index of the RAFT command.
*/
private void handleUpdateCommand(UpdateCommand cmd, long commandIndex) {
storage.runConsistently(() -> {
Review Comment:
Tried to fix it
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -108,19 +108,20 @@ public void onRead(Iterator<CommandClosure<ReadCommand>>
iterator) {
});
}
- /** {@inheritDoc} */
@Override
public void onWrite(Iterator<CommandClosure<WriteCommand>> iterator) {
iterator.forEachRemaining((CommandClosure<? extends WriteCommand> clo)
-> {
Command command = clo.command();
long commandIndex = clo.index();
- long storageAppliedIndex = storage.lastAppliedIndex();
+ // We choose the minimum applied index, since we choose it (the
minimum one) on local recovery so as not to lose the data for
+ // one of the storages.
+ long storagesAppliedIndex = Math.min(storage.lastAppliedIndex(),
txStateStorage.lastAppliedIndex());
Review Comment:
Tried to fix it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]