ankitsultana commented on code in PR #9423:
URL: https://github.com/apache/pinot/pull/9423#discussion_r973807288
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -411,6 +429,31 @@ public void addOrReplaceSegment(String segmentName,
IndexLoadingConfig indexLoad
zkMetadata.getCrc());
}
+ /**
+ * _segmentDataManagerMap is used for fetching segments that need to be
queried. If a new segment is created,
+ * calling this method ensures that all queries in the future can use the
new segment. This method may replace an
+ * existing segment with the same name.
+ */
+ @Nullable
+ protected SegmentDataManager registerSegment(String segmentName,
SegmentDataManager segmentDataManager) {
+ SegmentDataManager oldSegmentDataManager =
_segmentDataManagerMap.put(segmentName, segmentDataManager);
Review Comment:
I think we may wanna make `_segmentDataManagerMap` private so concrete
classes that extend `BaseTableDataManager` use the map only via the provided
methods here.
--
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]