belliottsmith commented on code in PR #7:
URL: https://github.com/apache/cassandra-accord/pull/7#discussion_r1016006508
##########
accord-core/src/main/java/accord/impl/InMemoryCommand.java:
##########
@@ -218,21 +230,23 @@ public Status status()
}
@Override
- public void status(Status status)
+ public void setStatus(Status status)
{
this.status = status;
}
@Override
- public boolean isGloballyPersistent()
+ public Durability durability()
{
- return isGloballyPersistent;
+ if (status.hasBeen(PreApplied) && durability == NotDurable)
Review Comment:
Should be fixed
##########
accord-core/src/main/java/accord/messages/PreAccept.java:
##########
@@ -209,28 +210,36 @@ public String toString()
}
}
- static Deps calculateDeps(SafeCommandStore commandStore, TxnId txnId, Keys
keys, Txn.Kind kindOfTxn, Timestamp executeAt)
- {
- try (Deps.OrderedBuilder builder = Deps.orderedBuilder(false))
- {
- return calculateDeps(commandStore, txnId, keys, kindOfTxn,
executeAt, builder);
- }
- }
-
static PartialDeps calculatePartialDeps(SafeCommandStore commandStore,
TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt, KeyRanges
ranges)
{
try (PartialDeps.OrderedBuilder builder =
PartialDeps.orderedBuilder(ranges, false))
{
- return calculateDeps(commandStore, txnId, keys, kindOfTxn,
executeAt, builder);
+ return calculateDeps(commandStore, txnId, keys, kindOfTxn,
executeAt, ranges, builder);
}
}
- private static <T extends Deps> T calculateDeps(SafeCommandStore
commandStore, TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt,
Deps.AbstractOrderedBuilder<T> builder)
+ private static <T extends Deps> T calculateDeps(SafeCommandStore
commandStore, TxnId txnId, Keys keys, Txn.Kind kindOfTxn, Timestamp executeAt,
KeyRanges ranges, Deps.AbstractOrderedBuilder<T> builder)
{
- keys.forEach(key -> {
+// keys.forEach((key) -> {
+// CommandsForKey forKey = commandStore.maybeCommandsForKey(key);
+// if (forKey == null)
+// return;
+//
+// builder.nextKey(key);
+// TestKind testKind = kindOfTxn.isWrite() ? RorWs : Ws;
+// forKey.uncommitted().before(executeAt, testKind, ANY_DEPS, null,
ANY_STATUS, null)
+// .forEach(info -> {
+// if (!info.txnId.equals(txnId))
builder.add(info.txnId);
+// });
+// forKey.committedByExecuteAt().before(executeAt, testKind,
ANY_DEPS, null, ANY_STATUS, null)
+// .forEach(id -> {
+// if (!id.equals(txnId)) builder.add(id);
+// });
Review Comment:
Should be fixed
--
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]