suvodeep-pyne commented on code in PR #17159:
URL: https://github.com/apache/pinot/pull/17159#discussion_r2504685774


##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/ServerReloadJobStatusCache.java:
##########
@@ -35,26 +42,33 @@
  *
  * <p>Thread-safe for concurrent access. Uses Guava Cache with LRU eviction
  * and time-based expiration.
+ *
+ * <p>Implements PinotClusterConfigChangeListener to support dynamic 
configuration
+ * updates from ZooKeeper cluster config. When config changes, cache is rebuilt
+ * with new settings and existing entries are migrated.
  */
 @ThreadSafe
-public class ServerReloadJobStatusCache {
+public class ServerReloadJobStatusCache implements 
PinotClusterConfigChangeListener {
   private static final Logger LOG = 
LoggerFactory.getLogger(ServerReloadJobStatusCache.class);
+  private static final String CONFIG_PREFIX = 
"pinot.server.table.reload.status.cache";
+  private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
 
-  private final Cache<String, ReloadJobStatus> _cache;
+  private volatile Cache<String, ReloadJobStatus> _cache;
+  private ServerReloadJobStatusCacheConfig _currentConfig;
 
   /**
-   * Creates a cache with the given configuration.
-   *
+   * Creates a cache with default configuration.

Review Comment:
   > we should always aim to support both mechanisms
   
   This is a good point and I have felt that. I just think that there needs to 
be a general infra for this where we can provide a deployment/launch time way 
to load up cluster configs. Having 2 separate orthogonal configs can 
potentially lead to conflicting settings and is a different problem. I am not 
sold on manually supporting 2 different kinds of configs for each feature. That 
seems like a duplicate effort.
   
   But we can create an issue for this if you also feel this is a pain point in 
pinot config mgmt.



-- 
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]

Reply via email to