You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2019/08/09 09:31:52 UTC
[cassandra] 01/01: print some debug info if we fail to update the
RT digest in LegacyUnfilteredPartition
This is an automated email from the ASF dual-hosted git repository.
benedict pushed a commit to branch 15263-debug
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 7f300c15754e0bfcbea723966c737a634041801d
Author: Benedict Elliott Smith <be...@apache.org>
AuthorDate: Thu Aug 8 18:28:49 2019 +0100
print some debug info if we fail to update the RT digest in LegacyUnfilteredPartition
---
src/java/org/apache/cassandra/db/LegacyLayout.java | 20 +++++++++++++++++---
src/java/org/apache/cassandra/db/ReadResponse.java | 5 +++++
2 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/java/org/apache/cassandra/db/LegacyLayout.java b/src/java/org/apache/cassandra/db/LegacyLayout.java
index 87b5d58..a114b68 100644
--- a/src/java/org/apache/cassandra/db/LegacyLayout.java
+++ b/src/java/org/apache/cassandra/db/LegacyLayout.java
@@ -478,7 +478,7 @@ public abstract class LegacyLayout
}
}
- return new LegacyUnfilteredPartition(info.getPartitionDeletion(), rtl, cells);
+ return new LegacyUnfilteredPartition(iterator.metadata(), partition.partitionKey(), info.getPartitionDeletion(), rtl, cells);
}
public static void serializeAsLegacyPartition(ReadCommand command, UnfilteredRowIterator partition, DataOutputPlus out, int version) throws IOException
@@ -1435,12 +1435,16 @@ public abstract class LegacyLayout
public static class LegacyUnfilteredPartition
{
+ final CFMetaData cfMetaData;
+ final DecoratedKey partitionKey;
public final DeletionTime partitionDeletion;
public final LegacyRangeTombstoneList rangeTombstones;
public final List<LegacyCell> cells;
- private LegacyUnfilteredPartition(DeletionTime partitionDeletion, LegacyRangeTombstoneList rangeTombstones, List<LegacyCell> cells)
+ private LegacyUnfilteredPartition(CFMetaData cfMetaData, DecoratedKey partitionKey, DeletionTime partitionDeletion, LegacyRangeTombstoneList rangeTombstones, List<LegacyCell> cells)
{
+ this.cfMetaData = cfMetaData;
+ this.partitionKey = partitionKey;
this.partitionDeletion = partitionDeletion;
this.rangeTombstones = rangeTombstones;
this.cells = cells;
@@ -1476,7 +1480,17 @@ public abstract class LegacyLayout
digest.update(ByteBufferUtil.bytes(partitionDeletion.markedForDeleteAt()));
if (!rangeTombstones.isEmpty())
- rangeTombstones.updateDigest(digest);
+ {
+ try
+ {
+ rangeTombstones.updateDigest(digest);
+ }
+ catch (Throwable t)
+ {
+ logger.error("{} {} {}", cfMetaData.cfName, cfMetaData.getKeyValidator().getString(partitionKey.getKey()), rangeTombstones.toString(), t);
+ throw t;
+ }
+ }
}
}
diff --git a/src/java/org/apache/cassandra/db/ReadResponse.java b/src/java/org/apache/cassandra/db/ReadResponse.java
index 7aa915e..1cd7d98 100644
--- a/src/java/org/apache/cassandra/db/ReadResponse.java
+++ b/src/java/org/apache/cassandra/db/ReadResponse.java
@@ -26,6 +26,9 @@ import java.util.List;
import com.google.common.annotations.VisibleForTesting;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.apache.cassandra.config.CFMetaData;
import org.apache.cassandra.db.filter.ClusteringIndexFilter;
import org.apache.cassandra.db.filter.ColumnFilter;
@@ -45,6 +48,8 @@ import org.apache.cassandra.utils.FBUtilities;
public abstract class ReadResponse
{
+ private static final Logger logger = LoggerFactory.getLogger(ReadResponse.class);
+
// Serializer for single partition read response
public static final IVersionedSerializer<ReadResponse> serializer = new Serializer();
// Serializer for the pre-3.0 rang slice responses.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org