You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "aweisberg (via GitHub)" <gi...@apache.org> on 2025/06/02 17:54:16 UTC
Re: [PR] Add testing of consensus live migration to simulator [cassandra-accord]
aweisberg commented on code in PR #187:
URL: https://github.com/apache/cassandra-accord/pull/187#discussion_r2121811546
##########
accord-core/src/main/java/accord/coordinate/ExecuteTxn.java:
##########
@@ -236,8 +236,9 @@ protected void onDone(Success success, Throwable failure)
executeAt = new TimestampWithUniqueHlc(executeAt, uniqueHlc);
}
- Writes writes = txnId.is(Txn.Kind.Write) ? txn.execute(txnId, executeAt, data) : null;
+ // Always compute Result before Write
Review Comment:
It makes it easier for the integration to do things like evaluate part of the result and logic related to what will happen. The order was switched and that caused the integration to apply transactions when the condition failed. I fixed it so that the integration will tolerate either order, but since this is an easy bug to re-introduce and there isn't a huge cost in saying that `Result` and `Write` will be evaluated in a specific order that it would be better to do that.
--
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