belliottsmith commented on code in PR #113:
URL: https://github.com/apache/cassandra-accord/pull/113#discussion_r1746063881
##########
accord-core/src/main/java/accord/local/cfk/Updating.java:
##########
@@ -158,17 +157,22 @@ static CommandsForKeyUpdate insertOrUpdate(CommandsForKey
cfk, int insertPos, in
++additionsBeforeOldUndecided;
if (newMinUndecided == null && curMinUndecided == curInfo)
- newMinUndecidedById = nextUndecided(newById, insertPos + 1);
+ newMinUndecidedById = nextUndecided(newById, insertPos + 1,
cfk);
else if (newMinUndecided == null && newMinUndecidedById >= 0)
newMinUndecidedById += additionsBeforeOldUndecided;
else if (newMinUndecided == newInfo)
- newMinUndecidedById = insertPos + -1 -
Arrays.binarySearch(additions, 0, additionCount, newInfo);
+ newMinUndecidedById = insertPos + (-1 -
Arrays.binarySearch(additions, 0, additionCount, newInfo));
else if (newMinUndecided != null)
newMinUndecidedById = Arrays.binarySearch(newById, 0,
newById.length, newMinUndecided);
}
cachedTxnIds().forceDiscard(additions, additionCount +
prunedIds.length);
- return PostProcess.LoadPruned.load(prunedIds, cfk.update(newById,
newMinUndecidedById, newCommittedByExecuteAt, newMaxAppliedWriteByExecuteAt,
newLoadingPruned, plainTxnId, curInfo, newInfo));
+
+ int newPrunedBeforeById = cfk.prunedBeforeById;
Review Comment:
but it's an index into the byId collection, not the committedByExecuteAt
collection. `newPrunedBeforeByIdx` doesn't make sense to me, and
`newPrunedBeforeByIdIdx` seems unnecessarily verbose
--
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]