dcapwell commented on code in PR #4518:
URL: https://github.com/apache/cassandra/pull/4518#discussion_r2604064459
##########
src/java/org/apache/cassandra/service/accord/txn/TxnUpdate.java:
##########
@@ -677,7 +678,18 @@ public TxnWrite apply(Timestamp executeAt, Data data)
ClusterMetadata cm = ClusterMetadata.current();
checkState(cm.epoch.getEpoch() >= executeAt.epoch(), "TCM epoch %d is
< executeAt epoch %d", cm.epoch.getEpoch(), executeAt.epoch());
- Pair<List<TxnWrite.Update>, SimpleBitSet> pair =
processCondition(executeAt, data);
+ Pair<List<TxnWrite.Update>, SimpleBitSet> pair;
+ try
+ {
+ pair = processCondition(executeAt, data);
+ }
+ catch (RequestValidationException e)
+ {
+ // the update isn't allowed
+ ((TxnData) data).putValidationException(e.code(), e.getMessage());
Review Comment:
i didn't test constraints, i *hope* they are `RequestValidationException`
but didn't check
##########
test/distributed/org/apache/cassandra/distributed/shared/ClusterUtils.java:
##########
@@ -717,6 +719,8 @@ public static Epoch maxEpoch(ICluster<IInvokableInstance>
cluster)
public static Epoch maxEpoch(ICluster<IInvokableInstance> cluster, int...
nodes)
{
+ if (nodes == null || nodes.length == 0)
Review Comment:
this bug has been in the other branch for ages and adds a race condition to
tests that depend on this... so not "part" of this patch, but makes sure we
stop hitting these race conditions
--
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]