This is an automated email from the ASF dual-hosted git repository.

alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git


The following commit(s) were added to refs/heads/master by this push:
     new 3307375aa [tserver] don't spam logs about slow scanners
3307375aa is described below

commit 3307375aaadda9fdd5d34f014c68cee1586cfbf3
Author: Alexey Serbin <[email protected]>
AuthorDate: Fri Sep 20 16:09:53 2024 -0700

    [tserver] don't spam logs about slow scanners
    
    This patch throttles INFO messages on disabled slow scan reporting to
    appear at most once in 60 seconds.  In addition, the patch removes very
    confusing wording from description of the --show_slow_scans flag, making
    it human-readable.
    
    This is a follow-up to 3d496deec61b5d44ef133b553e282f5014a8b36f.
    
    Change-Id: Ibbca6efee26b9ca2fad07dd50d8444beb51ab60a
    Reviewed-on: http://gerrit.cloudera.org:8080/21838
    Tested-by: Alexey Serbin <[email protected]>
    Reviewed-by: KeDeng <[email protected]>
---
 src/kudu/tserver/scanners.cc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/kudu/tserver/scanners.cc b/src/kudu/tserver/scanners.cc
index ddf346d2d..cc5d35858 100644
--- a/src/kudu/tserver/scanners.cc
+++ b/src/kudu/tserver/scanners.cc
@@ -65,9 +65,10 @@ DEFINE_int32(completed_scan_history_count, 10,
 TAG_FLAG(completed_scan_history_count, experimental);
 
 DEFINE_bool(show_slow_scans, false,
-            "Whether to show slow scans on the /scans page of web or record it 
in the log. "
-            "Please note that once set to true, full table scans may occur, 
which may affect "
-            "the normal Kudu service unexpectedly.");
+            "Whether to report on 'slow' scans at the /scans WebUI page and "
+            "in the INFO log. If enabled, well performing full table scans "
+            "and scans run by lazily-fetching clients may be reported as "
+            "'slow' depending on the --slow_scanner_threshold_ms setting.");
 TAG_FLAG(show_slow_scans, advanced);
 TAG_FLAG(show_slow_scans, runtime);
 
@@ -356,7 +357,8 @@ vector<SharedScanDescriptor> ScannerManager::ListScans() 
const {
 vector<SharedScanDescriptor> ScannerManager::ListSlowScans() const {
   vector<SharedScanDescriptor> ret;
   if (!FLAGS_show_slow_scans) {
-    LOG(INFO) << "Slow scans show is disabled. Set --show_slow_scans to enable 
it.";
+    KLOG_EVERY_N_SECS(INFO, 60) << Substitute(
+        "slow scan reporting is disabled: set --show_slow_scans to enable");
     return ret;
   }
 

Reply via email to