This is an automated email from the ASF dual-hosted git repository.
rongr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new bd251e4dba Remove realtime segments from metadata upon destroy (#9021)
bd251e4dba is described below
commit bd251e4dba15441033398695620c64b49b83f3c2
Author: Kartik Khare <[email protected]>
AuthorDate: Thu Jul 7 01:05:01 2022 +0530
Remove realtime segments from metadata upon destroy (#9021)
Co-authored-by: Kartik Khare <[email protected]>
---
.../segment/local/indexsegment/mutable/MutableSegmentImpl.java | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
index 179b1fe795..baed54aa10 100644
---
a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
+++
b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/indexsegment/mutable/MutableSegmentImpl.java
@@ -1100,6 +1100,15 @@ public class MutableSegmentImpl implements
MutableSegment {
public void destroy() {
_logger.info("Trying to close RealtimeSegmentImpl : {}", _segmentName);
+ // Remove the upsert and dedup metadata before closing the readers
+ if (_partitionUpsertMetadataManager != null) {
+ _partitionUpsertMetadataManager.removeSegment(this);
+ }
+
+ if (_partitionDedupMetadataManager != null) {
+ _partitionDedupMetadataManager.removeSegment(this);
+ }
+
// Gather statistics for off-heap mode
if (_offHeap) {
if (_numDocsIndexed > 0) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]