belliottsmith commented on code in PR #237:
URL: https://github.com/apache/cassandra-accord/pull/237#discussion_r2270084053
##########
accord-core/src/main/java/accord/local/cfk/CommandsForKey.java:
##########
@@ -1604,18 +1639,21 @@ public CommandsForKey updateUniqueHlc(long minUniqueHlc)
if (maxUniqueHlc <= bounds.gcBefore.hlc() &&
bounds.gcBefore.is(HLC_BOUND))
return this;
- return new CommandsForKey(key, bounds, byId, minUndecidedById,
maxAppliedPreBootstrapWriteById, committedByExecuteAt,
maxAppliedWriteByExecuteAt, minUniqueHlc, loadingPruned, prunedBeforeById,
unmanageds);
+ return new CommandsForKey(key, bounds, byId, minUndecidedById,
maxAppliedPreBootstrapWriteById, committedByExecuteAt,
maxAppliedWriteByExecuteAt, minUniqueHlc, loadingPruned, prunedBeforeById,
unmanageds, true);
}
- public CommandsForKey setDurable(TxnId txnId)
+ public CommandsForKey setDurable(TxnId txnId, Durability durability)
{
TxnInfo txn = get(txnId);
- if (txn == null || !txn.is(APPLIED_NOT_DURABLE))
+ if (txn == null || !durability.isDurablyCommitted())
Review Comment:
I don't quite follow, but if you're asking whether this method should not
have been invoked, the answer is we already should not invoke it if we think it
won't help, but the method signature doesn't specify what Durability it would
be valid to invoke it with, and we don't want to corrupt the state if we for
some reason invoke setDurability with a Durability that doesn't imply anything
useful for CommandsForKey, so the most sensible thing IMO is to simply do
nothing if the parameter doesn't tell us anything we want to know.
--
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]