dcapwell commented on code in PR #3743:
URL: https://github.com/apache/cassandra/pull/3743#discussion_r1884691443
##########
src/java/org/apache/cassandra/service/accord/AccordSegmentCompactor.java:
##########
@@ -126,6 +126,7 @@ public Collection<StaticSegment<JournalKey, V>>
compact(Collection<StaticSegment
while ((advanced = reader.advance()) &&
reader.key().equals(key));
if (advanced) readers.offer(reader); // there is more to
this reader, but not with this key
+ else reader.close();
Review Comment:
this leak detection was caught by
`org.apache.cassandra.index.accord.RouteIndexTest#test`. The fs would run out
of space and when you looked it had very few files and only ~40mb of data, yet
4g was allocated! The root cause was that each time we open a reader we create
a new channel and didn't close it, so we could never purge segments.
--
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]