cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject [04/10] cassandra git commit: Downgrade logger.debug calls to logger.trace in the read path
Date Fri, 30 Mar 2018 15:18:48 GMT
Downgrade logger.debug calls to logger.trace in the read path

Patch by Alexander Dejanovski; Reviewed by Paulo Motta for CASSANDRA-14318


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ac77e5e7
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ac77e5e7
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ac77e5e7

Branch: refs/heads/trunk
Commit: ac77e5e7742548f7c7c25da3923841f59d4b2713
Parents: 53b6116
Author: Alexander Dejanovski <alex@thelastpickle.com>
Authored: Tue Mar 27 12:05:27 2018 +0200
Committer: Paulo Motta <paulo@apache.org>
Committed: Fri Mar 30 12:10:05 2018 -0300

----------------------------------------------------------------------
 CHANGES.txt                                                 | 1 +
 .../apache/cassandra/service/pager/AbstractQueryPager.java  | 9 +++++----
 .../org/apache/cassandra/service/pager/SliceQueryPager.java | 2 +-
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac77e5e7/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2e45b85..4828517 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.13
+ * Fix query pager DEBUG log leak causing hit in paged reads throughput (CASSANDRA-14318)
  * Backport circleci yaml (CASSANDRA-14240)
 Merged from 2.1:
  * CVE-2017-5929 Security vulnerability in Logback warning in NEWS.txt (CASSANDRA-14183)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac77e5e7/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
index 02623eb..46d4a3e 100644
--- a/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/AbstractQueryPager.java
@@ -86,13 +86,13 @@ abstract class AbstractQueryPager implements QueryPager
 
         if (rows.isEmpty())
         {
-            logger.debug("Got empty set of rows, considering pager exhausted");
+            logger.trace("Got empty set of rows, considering pager exhausted");
             exhausted = true;
             return Collections.emptyList();
         }
 
         int liveCount = getPageLiveCount(rows);
-        logger.debug("Fetched {} live rows", liveCount);
+        logger.trace("Fetched {} live rows", liveCount);
 
         // Because SP.getRangeSlice doesn't trim the result (see SP.trim()), liveCount may
be greater than what asked
         // (currentPageSize). This would throw off the paging logic so we trim the excess.
It's not extremely efficient
@@ -109,7 +109,8 @@ abstract class AbstractQueryPager implements QueryPager
         // we still need to return the current page)
         if (liveCount < currentPageSize)
         {
-            logger.debug("Got result ({}) smaller than page size ({}), considering pager
exhausted", liveCount, currentPageSize);
+            logger.trace("Got result ({}) smaller than page size ({}), considering pager
exhausted", liveCount,
+                    currentPageSize);
             exhausted = true;
         }
 
@@ -130,7 +131,7 @@ abstract class AbstractQueryPager implements QueryPager
             remaining++;
         }
 
-        logger.debug("Remaining rows to page: {}", remaining);
+        logger.trace("Remaining rows to page: {}", remaining);
 
         if (!isExhausted())
             shouldFetchExtraRow = recordLast(rows.get(rows.size() - 1));

http://git-wip-us.apache.org/repos/asf/cassandra/blob/ac77e5e7/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
index 1a2fc6c..3420831 100644
--- a/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/SliceQueryPager.java
@@ -89,7 +89,7 @@ public class SliceQueryPager extends AbstractQueryPager implements SinglePartiti
         if (lastReturned != null)
             filter = filter.withUpdatedStart(lastReturned, cfm);
 
-        logger.debug("Querying next page of slice query; new filter: {}", filter);
+        logger.trace("Querying next page of slice query; new filter: {}", filter);
         ReadCommand pageCmd = command.withUpdatedFilter(filter);
         return localQuery
              ? Collections.singletonList(pageCmd.getRow(Keyspace.open(command.ksName)))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message