AmatyaAvadhanula commented on code in PR #15952:
URL: https://github.com/apache/druid/pull/15952#discussion_r1531931991
##########
processing/src/main/java/org/apache/druid/timeline/VersionedIntervalTimeline.java:
##########
@@ -815,6 +820,15 @@ public PartitionHolder<ObjectType> getPartitionHolder()
return partitionHolder;
}
+ /**
+ * Returns the maximum minor version across all the added segments.
+ * We do not handle updates of this variable when segments are removed for
the sake of simplicity.
+ */
+ short getMaxMinorVersion()
Review Comment:
Done
##########
processing/src/main/java/org/apache/druid/timeline/partition/PartitionHolder.java:
##########
@@ -60,14 +68,24 @@ public PartitionHolder(List<PartitionChunk<T>>
initialChunks)
}
}
- protected PartitionHolder(OvershadowableManager<T> overshadowableManager)
+ protected PartitionHolder(OvershadowableManager<T> overshadowableManager,
short maxMinorVersion)
{
this.overshadowableManager = overshadowableManager;
+ this.maxMinorVersion = maxMinorVersion;
}
public boolean add(PartitionChunk<T> chunk)
{
- return overshadowableManager.addChunk(chunk);
+ boolean added = overshadowableManager.addChunk(chunk);
+ if (added && chunk.getObject().getMinorVersion() > maxMinorVersion) {
+ maxMinorVersion = chunk.getObject().getMinorVersion();
+ }
+ return added;
+ }
+
+ public short getMaxMinorVersion()
Review Comment:
Added
##########
server/src/main/java/org/apache/druid/metadata/SqlSegmentsMetadataManager.java:
##########
@@ -1014,7 +1015,8 @@ public void poll()
@GuardedBy("pollLock")
private void doPoll()
{
- log.debug("Starting polling of segment table");
+ Stopwatch stopwatch = Stopwatch.createStarted();
Review Comment:
Done, thanks
--
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]