belliottsmith commented on code in PR #50:
URL: https://github.com/apache/cassandra-accord/pull/50#discussion_r1239477906
##########
accord-core/src/main/java/accord/local/Commands.java:
##########
@@ -368,36 +413,36 @@ public static void
applyRecipientLocalSyncPoint(SafeCommandStore safeStore, TxnI
}
// TODO (expected, ?): commitInvalidate may need to update cfks _if_
possible
- public static void commitInvalidate(SafeCommandStore safeStore, TxnId
txnId)
+ public static void commitInvalidate(SafeCommandStore safeStore,
SafeCommand safeCommand)
{
- SafeCommand safeCommand = safeStore.command(txnId);
Command command = safeCommand.current();
if (command.hasBeen(PreCommitted))
{
- logger.trace("{}: skipping commit invalidated - already committed
({})", txnId, command.status());
- if (!command.hasBeen(Invalidated))
- safeStore.agent().onInconsistentTimestamp(command,
Timestamp.NONE, command.executeAt());
-
+ if (command.is(Truncated))
+ {
+ logger.trace("{}: skipping commit invalidated - already
truncated ({})", safeCommand.txnId(), command.status());
+ }
+ else
+ {
+ logger.trace("{}: skipping commit invalidated - already
committed ({})", safeCommand.txnId(), command.status());
+ if (!command.is(Invalidated) && !(command.is(Truncated) &&
command.executeAt().equals(Timestamp.NONE)))
+ safeStore.agent().onInconsistentTimestamp(command,
Timestamp.NONE, command.executeAt());
+ }
return;
}
- ProgressShard shard = progressShard(safeStore, command);
- safeStore.progressLog().invalidated(command, shard);
+ safeStore.progressLog().clear(command.txnId());
Review Comment:
We already stopped doing anything at that point, this just means we also
delete the state.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]