You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "bbeaudreault (via GitHub)" <gi...@apache.org> on 2024/03/05 18:58:28 UTC

Re: [PR] HBASE-28401 Introduce a close method for memstore for release active … [hbase]

bbeaudreault commented on code in PR #5705:
URL: https://github.com/apache/hbase/pull/5705#discussion_r1513349108


##########
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/AbstractMemStore.java:
##########
@@ -376,6 +376,15 @@ ImmutableSegment getSnapshot() {
     return snapshot;
   }
 
+  @Override
+  public void close() {
+    // active should never be null
+    active.close();
+    // for snapshot, either it is empty, where we do not reference any real segment which contains a

Review Comment:
   I'm of the opinion that we should always close all closeables. I don't dispute your comment here, but I feel like we should close the snapshot either way. This prevents future bugs where assumptions might be made about the presence of a close() method on ImmutableSegment.



-- 
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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org