jacek-lewandowski commented on code in PR #2064:
URL: https://github.com/apache/cassandra/pull/2064#discussion_r1082767066
##########
src/java/org/apache/cassandra/io/sstable/format/SSTableReader.java:
##########
@@ -1983,39 +1380,36 @@ public void addTo(Ref.IdentityCollection identities)
{
identities.add(this);
identities.add(tidy.globalRef);
- dfile.addTo(identities);
- ifile.addTo(identities);
- bf.addTo(identities);
- indexSummary.addTo(identities);
-
+ tidy.closeables.forEach(c -> {
+ if (c instanceof SharedCloseable)
+ ((SharedCloseable) c).addTo(identities);
+ });
}
public boolean maybePresent(DecoratedKey key)
Review Comment:
You are right, it is not needed to check. Though, I don't like the fact that
this method does implicit assumption for certain usages.
Btw. thanks you pointing me to check the actual usages. It turned out that
there were some redundant calls.
8787244fbac13b8b9dee907d8cda0964bf0d047e
--
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]