michaeljmarshall commented on code in PR #3296:
URL: https://github.com/apache/cassandra/pull/3296#discussion_r1595622360


##########
src/java/org/apache/cassandra/cql3/statements/ModificationStatement.java:
##########
@@ -652,9 +652,11 @@ static RowIterator casInternal(CQL3CasRequest request, 
long timestamp, int nowIn
         SinglePartitionReadQuery readCommand = 
request.readCommand(nowInSeconds);
         FilteredPartition current;
         try (ReadExecutionController executionController = 
readCommand.executionController();
-             PartitionIterator iter = 
readCommand.executeInternal(executionController))
+             PartitionIterator iter = 
readCommand.executeInternal(executionController);
+             RowIterator rowIterator = PartitionIterators.getOnlyElement(iter, 
readCommand))

Review Comment:
   Though, we're at risk of leaking the `PartitionIterator` in the event of an 
exception in the `PartitionIterators.getOnlyElement`.



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

Reply via email to