dcapwell commented on code in PR #50:
URL: https://github.com/apache/cassandra-accord/pull/50#discussion_r1261734533
##########
accord-core/src/main/java/accord/local/Commands.java:
##########
@@ -869,11 +913,45 @@ public NotifyWaitingOn(SafeCommand root)
@Override
public void accept(SafeCommandStore safeStore)
{
- SafeCommand prevSafe = get(safeStore, depth - 1);
+ SafeCommand prevSafe = ifInitialised(safeStore, depth - 1);
+ {
+ // we know we loaded it, so if it's null it's either truncated
or we haven't witnessed it and need to initialise;
+ // in this case use our predecessor's intersecting keys to
decide which
+ SafeCommand curSafe = ifInitialised(safeStore, depth);
+ if (curSafe == null)
+ {
+ if (prevSafe != null)
+ {
+ if
(safeStore.commandStore().redundantBefore().isRedundant(txnIds[depth],
prevSafe.current().executeAt(),
prevSafe.current().partialDeps().participants(txnIds[depth])))
Review Comment:
`prevSafe.current().partialDeps()` may return `null`. As far as I can tell,
can we not depend on a txn where we don't know the definition yet, so could
have a `prevSafe` with `null` deps?
--
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]