jtao15 commented on code in PR #10303:
URL: https://github.com/apache/pinot/pull/10303#discussion_r1115144518
##########
pinot-core/src/main/java/org/apache/pinot/core/data/manager/BaseTableDataManager.java:
##########
@@ -265,13 +269,31 @@ public boolean isSegmentDeletedRecently(String
segmentName) {
@Override
public List<SegmentDataManager> acquireAllSegments() {
+ return acquireAllSegments(false);
+ }
+
+ @Override
+ public List<SegmentDataManager> acquireAllSegments(boolean
excludeReplacedSegments) {
List<SegmentDataManager> segmentDataManagers = new ArrayList<>();
for (SegmentDataManager segmentDataManager :
_segmentDataManagerMap.values()) {
if (segmentDataManager.increaseReferenceCount()) {
segmentDataManagers.add(segmentDataManager);
}
}
- return segmentDataManagers;
+ // Fetch the segment lineage metadata, and conditionally filter out
replaced segments based on segment lineage.
+ SegmentLineage segmentLineage =
SegmentLineageAccessHelper.getSegmentLineage(_propertyStore,
_tableNameWithType);
Review Comment:
+1 on this, it's also possible that different servers get different versions
of the lineage metadata, and controllers return incorrect results due to this.
--
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]