ifesdjeen commented on code in PR #216: URL: https://github.com/apache/cassandra-accord/pull/216#discussion_r2182836432
########## accord-core/src/main/java/accord/local/durability/ShardDurability.java: ########## @@ -95,6 +97,7 @@ public Waiting next() // TODO (expected): support intra-shard parallelism private class ShardScheduler { + final boolean adhoc; Review Comment: Discussed on slack a bit; could you add a small note about repair/circumstances when we need adhoc? ########## accord-core/src/main/java/accord/messages/Propagate.java: ########## @@ -306,11 +337,19 @@ public Void apply(SafeCommandStore safeStore) case PreAccepted: // only preaccept if we coordinate the transaction if (safeStore.ranges().coordinates(txnId).intersects(route) && Route.isFullRoute(route)) + { + if (trace != null) + trace.trace(safeStore.commandStore(), "Pre-accepting"); Commands.preaccept(safeStore, safeCommand, participants, txnId, partialTxn, null, false); + } case NotDefined: if (invalidIf == IfUncommitted) + { + if (trace != null) + trace.trace(safeStore.commandStore(), "Mrking invalidIfUncommitted"); Review Comment: nit: mrking ########## accord-core/src/main/java/accord/coordinate/CheckShards.java: ########## @@ -107,6 +117,9 @@ protected Action process(Id from, CheckStatusReply reply) } else { + if (tracing != null) + tracing.trace(null, String.format("%s received failure reply %s from %s", getClass().getSimpleName(), reply, from)); Review Comment: applies not just here: should we maybe interpolate _inside_ trace? We're already allocating an array to pass to format, but in case we accidentally have a mismatch in number of arguments, it would be good to fall back instead of throwing. something vaguely like ``` public static String safeFormat(String format, Object... args) { try { return String.format(format, args); } catch (Throwable t) { return String.format("Could not format, due to %s, falling back: %s", t.getMessage(), format, Arrays.toString(args)) } } ``` it's just if we make a mistake in a trace that puts us one step further, not only we can't debug what we wanted to debug but also now the message is broken -- 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-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org