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


##########
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:
   I wrote a bit on that point here 
https://github.com/datastax/cassandra/pull/1103#issue-2278426122.
   
   > Note that it doesn't look like the `Close` class defined in the 
`PartitionIterators#getOnlyElement` method is ever called. I'm not sure if 
that's an issue or not. However, I added some basic logging to the chunk cache 
during my testing, and I can see that this PR's change fixes a reference leak.
   
   In my quick testing, I found that the `PartitionIterator` wasn't closed via 
the close transformation. It is possible that my debugging wasn't 
representative, as I am somewhat new to this code.



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