diff --git a/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java b/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java index 44d09c7da4f..f89ed18d3a3 100644 --- a/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java +++ b/server/src/main/java/org/apache/druid/metadata/IndexerSQLMetadataStorageCoordinator.java @@ -425,6 +425,8 @@ public class IndexerSQLMetadataStorageCoordinator implements IndexerMetadataStor throw new IllegalArgumentException("start/end metadata pair must be either null or non-null"); } + final String dataSource = segments.iterator().next().getDataSource(); + // Find which segments are used (i.e. not overshadowed). final Set usedSegments = new HashSet<>(); List> segmentHolders =