belliottsmith commented on code in PR #4078:
URL: https://github.com/apache/cassandra/pull/4078#discussion_r2040343861


##########
src/java/org/apache/cassandra/cql3/statements/CQL3CasRequest.java:
##########
@@ -484,27 +488,30 @@ public String toString()
     public Txn toAccordTxn(ClusterMetadata cm, ConsistencyLevel 
consistencyLevel, ConsistencyLevel commitConsistencyLevel, ClientState 
clientState, long nowInSecs)
     {
         SinglePartitionReadCommand readCommand = readCommand(nowInSecs);
-        Update update = createUpdate(cm, clientState, commitConsistencyLevel);
+        TableMetadatas tables = TableMetadatas.of(getTableMetadata(cm, 
metadata.id));
+        TableMetadata metadata = tables.get(0);
+        TableMetadatasAndKeys tablesAndKeys = new 
TableMetadatasAndKeys(tables, Keys.of(new PartitionKey(metadata.id, 
readCommand.partitionKey())));
+        Update update = createUpdate(cm, tablesAndKeys, clientState, 
commitConsistencyLevel);
         // If the write strategy is sending all writes through Accord there is 
no need to use the supplied consistency
         // level since Accord will manage reading safely
-        TableParams tableParams = getTableMetadata(cm, metadata.id).params;
+        TableParams tableParams = tables.get(metadata.id).params;

Review Comment:
   This is intentional for two reasons: one to dedup, two in at least one place 
to make sure we’re getting the most recent from TCM (for deciding the protocol 
to use)



-- 
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

Reply via email to