xiangfu0 commented on code in PR #18405:
URL: https://github.com/apache/pinot/pull/18405#discussion_r3184737644


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/store/FilePerIndexDirectory.java:
##########
@@ -99,8 +103,15 @@ public void close()
 
   @Override
   public void removeIndex(String columnName, IndexType<?, ?, ?> indexType) {
-    // TODO: this leaks the removed data buffer (it's not going to be freed in 
close() method)
-    _indexBuffers.remove(new IndexKey(columnName, indexType));
+    PinotDataBuffer removedBuffer = _indexBuffers.remove(new 
IndexKey(columnName, indexType));
+    if (removedBuffer != null) {
+      try {
+        removedBuffer.close();

Review Comment:
   buffer close exception may still got silently swallowed



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