You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by br...@apache.org on 2020/06/23 19:10:13 UTC

[cassandra] branch cassandra-3.0 updated: Add token to tombstone warning and error messages

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

brandonwilliams pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
     new 226b756  Add token to tombstone warning and error messages
226b756 is described below

commit 226b756495b0e80aa2899bba72ad5a3294b9599a
Author: nvharikrishna <n....@gmail.com>
AuthorDate: Mon Jun 22 23:06:42 2020 +0530

    Add token to tombstone warning and error messages
    
    Patch by  Venkata Harikrishna Nukala, reviewed by brandonwilliams for
    CASSANDRA-15890
---
 CHANGES.txt                                                           | 1 +
 src/java/org/apache/cassandra/db/ReadCommand.java                     | 4 +++-
 .../apache/cassandra/db/filter/TombstoneOverwhelmingException.java    | 4 ++--
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index dc50ff5..7e1a4fd 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.21
+ * Add token to tombstone warning and error messages (CASSANDRA-15890)
  * Fixed range read concurrency factor computation and capped as 10 times tpc cores (CASSANDRA-15752)
  * Catch exception on bootstrap resume and init native transport (CASSANDRA-15863)
  * Fix replica-side filtering returning stale data with CL > ONE (CASSANDRA-8272, CASSANDRA-8273)
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java b/src/java/org/apache/cassandra/db/ReadCommand.java
index 39a5402..81b6803 100644
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@ -537,7 +537,9 @@ public abstract class ReadCommand implements ReadQuery
                 boolean warnTombstones = tombstones > warningThreshold && respectTombstoneThresholds;
                 if (warnTombstones)
                 {
-                    String msg = String.format("Read %d live rows and %d tombstone cells for query %1.512s (see tombstone_warn_threshold)", liveRows, tombstones, ReadCommand.this.toCQLString());
+                    String msg = String.format(
+                            "Read %d live rows and %d tombstone cells for query %1.512s; token %s (see tombstone_warn_threshold)",
+                            liveRows, tombstones, ReadCommand.this.toCQLString(), currentKey.getToken());
                     ClientWarn.instance.warn(msg);
                     logger.warn(msg);
                 }
diff --git a/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java b/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
index 98b539e..622edb4 100644
--- a/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
+++ b/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
@@ -28,8 +28,8 @@ public class TombstoneOverwhelmingException extends RuntimeException
 {
     public TombstoneOverwhelmingException(int numTombstones, String query, CFMetaData metadata, DecoratedKey lastPartitionKey, ClusteringPrefix lastClustering)
     {
-        super(String.format("Scanned over %d tombstones during query '%s' (last scanned row partion key was (%s)); query aborted",
-                            numTombstones, query, makePKString(metadata, lastPartitionKey.getKey(), lastClustering)));
+        super(String.format("Scanned over %d tombstones during query '%s' (last scanned row token was %s and partion key was (%s)); query aborted",
+                            numTombstones, query, lastPartitionKey.getToken(), makePKString(metadata, lastPartitionKey.getKey(), lastClustering)));
     }
 
     private static String makePKString(CFMetaData metadata, ByteBuffer partitionKey, ClusteringPrefix clustering)


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