You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "belliottsmith (via GitHub)" <gi...@apache.org> on 2025/07/07 15:27:55 UTC
[PR] Fixes 250705 [cassandra-accord]
belliottsmith opened a new pull request, #217:
URL: https://github.com/apache/cassandra-accord/pull/217
(no comment)
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] Fixes 250705 [cassandra-accord]
Posted by "ifesdjeen (via GitHub)" <gi...@apache.org>.
ifesdjeen commented on code in PR #217:
URL: https://github.com/apache/cassandra-accord/pull/217#discussion_r2190770726
##########
accord-core/src/main/java/accord/topology/TopologyManager.java:
##########
@@ -434,7 +436,9 @@ public void epochClosed(Ranges ranges, long epoch)
Invariants.require(epoch < minEpoch(), "Could not find epoch %d. Min: %d, current: %d", epoch, minEpoch(), currentEpoch);
return; // notification came for an already truncated epoch
}
- while (epochs[i].recordClosed(ranges) && ++i < epochs.length) {}
+
+ while (!ranges.isEmpty() && i < epochs.length)
+ ranges = epochs[i++].recordClosed(ranges);
Review Comment:
should we comment that we are ensuring that later epochs are transitively closing earlier ones?
##########
accord-core/src/main/java/accord/impl/progresslog/DefaultProgressLog.java:
##########
@@ -260,7 +227,54 @@ else if (after.durability().isDurableOrInvalidated() && (force || !before.durabi
}
}
- private TxnState maybeFetch(SafeCommandStore safeStore, TxnId txnId, Command after, TxnState state)
+ private TxnState updateHomeState(SafeCommandStore safeStore, Command after, @Nullable TxnState state)
+ {
+ Route<?> route = after.route();
Review Comment:
I personally would annotate this method. It might be self-evident, but adding some descriptions of the branches, especially since we're querying some conditions more than once, could be beneficial.
##########
accord-core/src/main/java/accord/impl/InMemoryCommandStore.java:
##########
@@ -1169,46 +1170,42 @@ else if (!CommandsForKey.managesExecution(txnId) && command.hasBeen(Status.Stabl
return txnId;
}
- private AsyncChain<Command> load(Command command)
+ protected TxnId loadInternal(Command command, SafeCommandStore safeStore)
+ {
+ TxnId txnId = command.txnId();
+ Cleanup cleanup = Cleanup.shouldCleanup(FULL, safeStore, command, command.participants());
+ if (cleanup != Cleanup.NO)
+ command = Commands.purge(safeStore, command, cleanup);
+
+ safeStore.unsafeGetNoCleanup(txnId).update(safeStore, command);
+ return txnId;
+ }
+
+ private AsyncChain<TxnId> load(Command command)
{
return AsyncChains.success(commandStore.executeInContext(commandStore,
context(command, ASYNC),
(SafeCommandStore safeStore) -> loadInternal(command, safeStore)));
}
- private AsyncChain<Command> apply(Command command)
+ private AsyncChain<Void> apply(TxnId txnId)
{
return AsyncChains.success(commandStore.executeInContext(commandStore,
- context(command, SYNC),
Review Comment:
nit: `import static accord.local.KeyHistory.SYNC;` is now unused
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org
Re: [PR] Fixes 250705 [cassandra-accord]
Posted by "ifesdjeen (via GitHub)" <gi...@apache.org>.
ifesdjeen merged PR #217:
URL: https://github.com/apache/cassandra-accord/pull/217
--
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: pr-unsubscribe@cassandra.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org