shauryachats commented on code in PR #18102:
URL: https://github.com/apache/pinot/pull/18102#discussion_r3114755612


##########
pinot-core/src/main/java/org/apache/pinot/core/accounting/QueryMonitorConfig.java:
##########
@@ -280,6 +316,72 @@ public QueryMonitorConfig(PinotConfiguration config, long 
maxHeapSize) {
     } else {
       _workloadCostEnforcementEnabled = 
oldConfig._workloadCostEnforcementEnabled;
     }
+
+    if 
(changedConfigs.contains(CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MODE))
 {
+      _scanBasedKillingMode = 
validateScanKillingMode(clusterConfigs.getOrDefault(
+          CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MODE,
+          CommonConstants.Accounting.DEFAULT_SCAN_BASED_KILLING_MODE));
+    } else {
+      _scanBasedKillingMode = oldConfig.getScanBasedKillingMode();
+    }
+
+    if (changedConfigs.contains(
+        
CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MAX_ENTRIES_SCANNED_IN_FILTER))
 {
+      _scanBasedKillingMaxEntriesScannedInFilter = Long.parseLong(
+          clusterConfigs.getOrDefault(
+              
CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MAX_ENTRIES_SCANNED_IN_FILTER,
+              String.valueOf(
+                  
CommonConstants.Accounting.DEFAULT_SCAN_BASED_KILLING_MAX_ENTRIES_SCANNED_IN_FILTER)));
+    } else {
+      _scanBasedKillingMaxEntriesScannedInFilter =
+          oldConfig.getScanBasedKillingMaxEntriesScannedInFilter();
+    }
+
+    if (changedConfigs.contains(
+        
CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MAX_DOCS_SCANNED)) {
+      _scanBasedKillingMaxDocsScanned = Long.parseLong(
+          clusterConfigs.getOrDefault(
+              
CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MAX_DOCS_SCANNED,
+              
String.valueOf(CommonConstants.Accounting.DEFAULT_SCAN_BASED_KILLING_MAX_DOCS_SCANNED)));
+    } else {
+      _scanBasedKillingMaxDocsScanned = 
oldConfig.getScanBasedKillingMaxDocsScanned();
+    }
+
+    if (changedConfigs.contains(
+        
CommonConstants.Accounting.CONFIG_OF_SCAN_BASED_KILLING_MAX_ENTRIES_SCANNED_POST_FILTER))
 {
+      _scanBasedKillingMaxEntriesScannedPostFilter = Long.parseLong(

Review Comment:
   Guard against invalid string values (empty string for example).



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