Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,20 @@ ClusterQueryResult<T> run(
}

final Set<SegmentServerSelector> segmentServers = computeSegmentsToQuery(timeline, specificSegments);
if (query.context().isDebug()) {
Comment thread
cecemei marked this conversation as resolved.
final String dataSource = ev.getBaseTableDataSource().getName();
log.infoSegmentIds(
segmentServers.stream().map(
s -> SegmentId.of(
dataSource,
s.getSegmentDescriptor().getInterval(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] Log real segment IDs, not query slices

The debug log rebuilds a SegmentId from SegmentDescriptor.getInterval(), but computeSegmentsToQuery fills that descriptor from TimelineObjectHolder.getInterval(). VersionedIntervalTimeline.lookup trims the first or last holder to the requested interval, so a query over one day inside a week-long segment logs a synthetic segment id that never existed. Use s.getServer().getSegment().getId() for the segment id, and log the query interval separately if needed.

s.getSegmentDescriptor().getVersion(),
s.getSegmentDescriptor().getPartitionNumber()
)
),
StringUtils.format("Query[%s] found segments from timeline lookup", query.getId())
);
}
final CloneQueryMode cloneQueryMode = query.context().getCloneQueryMode();
@Nullable
final byte[] queryCacheKey = cacheKeyManager.computeSegmentLevelQueryCacheKey();
Expand Down
Loading