kfaraz commented on code in PR #17653:
URL: https://github.com/apache/druid/pull/17653#discussion_r1947547126
##########
indexing-service/src/main/java/org/apache/druid/indexing/overlord/DruidOverlord.java:
##########
@@ -139,13 +141,15 @@ public void becomeLeader()
@Override
public void start()
{
+ segmentMetadataCache.becomeLeader();
segmentAllocationQueue.becomeLeader();
taskMaster.becomeHalfLeader(taskRunner, taskQueue);
}
@Override
public void stop()
{
+ segmentMetadataCache.stopBeingLeader();
Review Comment:
Fixed.
##########
server/src/main/java/org/apache/druid/metadata/SegmentsMetadataManagerConfig.java:
##########
@@ -19,25 +19,42 @@
package org.apache.druid.metadata;
+import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
+import org.apache.druid.common.config.Configs;
import org.joda.time.Period;
/**
+ * Config that dictates polling and caching of segment metadata on leader
+ * Coordinator or Overlord services.
*/
public class SegmentsMetadataManagerConfig
{
public static final String CONFIG_PREFIX = "druid.manager.segments";
@JsonProperty
- private Period pollDuration = new Period("PT1M");
+ private final Period pollDuration;
- public Period getPollDuration()
+ @JsonProperty
+ private final boolean useCache;
+
+ @JsonCreator
+ public SegmentsMetadataManagerConfig(
+ @JsonProperty("pollDuration") Period pollDuration,
+ @JsonProperty("useCache") Boolean useCache
+ )
{
- return pollDuration;
+ this.pollDuration = Configs.valueOrDefault(pollDuration,
Period.minutes(1));
+ this.useCache = Configs.valueOrDefault(useCache, true);
Review Comment:
Fixed, default is now false (disabled).
--
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]