Jackie-Jiang commented on code in PR #17438:
URL: https://github.com/apache/pinot/pull/17438#discussion_r2669879569


##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -317,6 +317,11 @@ public static class Instance {
     // Setting the before serving queries to Integer.MAX_VALUE to effectively 
disable throttling by default
     public static final String 
DEFAULT_MAX_SEGMENT_DOWNLOAD_PARALLELISM_BEFORE_SERVING_QUERIES =
         String.valueOf(Integer.MAX_VALUE);
+
+    // SQL parsing
+    public static final String CONFIG_OF_SSE_LEGACY_LITERAL_UNESCAPING =

Review Comment:
   Given this is a broker config, consider following the existing config 
pattern: `pinot.broker.sse.*`



##########
pinot-spi/src/main/java/org/apache/pinot/spi/config/instance/InstanceConfigProvider.java:
##########
@@ -0,0 +1,136 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.spi.config.instance;
+
+import com.google.common.annotations.VisibleForTesting;
+import java.util.List;
+import javax.annotation.Nullable;
+import org.apache.pinot.spi.env.PinotConfiguration;
+
+
+/**
+ * A singleton class that provides global access to instance configuration.
+ * This can be used by any module to access instance-level configuration that 
is set during
+ * instance (controller / broker / server / minion) startup.
+ *
+ * <p>Usage:
+ * <pre>
+ * // During instance startup:
+ * InstanceConfigProvider.setInstanceConfig(pinotConfiguration);
+ *
+ * // From any module:
+ * boolean value = 
InstanceConfigProvider.getInstanceConfig().getProperty("config.key", 
defaultValue);
+ * </pre>
+ */
+public class InstanceConfigProvider {

Review Comment:
   Having a singleton shared across all components can be hard for testing. I 
see we cannot put it in `BrokerContext` because of dependency hierarchy. We can 
probably directly add a setter into `RequestUtils` similar to how 
`ForwardIndexConfig` handles raw index version.



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