jasonstack commented on code in PR #4150:
URL: https://github.com/apache/cassandra/pull/4150#discussion_r2105674260
##########
src/java/org/apache/cassandra/service/reads/ReplicaFilteringProtection.java:
##########
@@ -350,16 +375,66 @@ public TableMetadata metadata()
}
@Override
- public void close() { }
+ public void close()
+ {
+ if (currentRowIterator != null)
+ currentRowIterator.close();
+ }
@Override
public boolean hasNext()
{
// If there are no cached partition builders for this source,
advance the first phase iterator, which
- // will force the RFP merge listener to load at least the next
protected partition.
+ // will force the RFP merge listener to load rows from the
next protected partition.
if (partitions.isEmpty())
{
- PartitionIterators.consumeNext(merged);
+ if (consumeEntirePartitions)
Review Comment:
is there a reason to close non-null `currentRowIterator` here?
##########
src/java/org/apache/cassandra/service/reads/ReplicaFilteringProtection.java:
##########
@@ -350,16 +375,66 @@ public TableMetadata metadata()
}
@Override
- public void close() { }
+ public void close()
+ {
+ if (currentRowIterator != null)
+ currentRowIterator.close();
+ }
@Override
public boolean hasNext()
{
// If there are no cached partition builders for this source,
advance the first phase iterator, which
- // will force the RFP merge listener to load at least the next
protected partition.
+ // will force the RFP merge listener to load rows from the
next protected partition.
if (partitions.isEmpty())
{
- PartitionIterators.consumeNext(merged);
+ if (consumeEntirePartitions)
Review Comment:
is there a reason that non-null `currentRowIterator` is not closed here?
--
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]