cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ble...@apache.org
Subject [2/3] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Date Mon, 22 Feb 2016 11:25:25 GMT
Merge branch cassandra-2.1 into cassandra-2.2


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

Branch: refs/heads/cassandra-3.0
Commit: fbf30d2199582d3c8e24cc7efcdaedc3a2b7b68e
Parents: 61ac125 14a2157
Author: Benjamin Lerer <b.lerer@gmail.com>
Authored: Mon Feb 22 12:13:51 2016 +0100
Committer: Benjamin Lerer <b.lerer@gmail.com>
Committed: Mon Feb 22 12:19:31 2016 +0100

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/cassandra/db/RowIteratorFactory.java | 20 ++++++--------------
 .../cassandra/db/filter/ExtendedFilter.java     | 10 +---------
 .../cassandra/db/filter/SliceQueryFilter.java   |  3 ++-
 .../filter/TombstoneOverwhelmingException.java  | 14 ++++----------
 5 files changed, 14 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/fbf30d21/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 9d0046b,ef8c5a7..e3d6f95
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,21 -1,5 +1,22 @@@
 -2.1.14
 +2.2.6
 + * Replacing an aggregate with a new version doesn't reset INITCOND (CASSANDRA-10840)
 + * (cqlsh) cqlsh cannot be called through symlink (CASSANDRA-11037)
 + * fix ohc and java-driver pom dependencies in build.xml (CASSANDRA-10793)
 + * Protect from keyspace dropped during repair (CASSANDRA-11065)
 + * Handle adding fields to a UDT in SELECT JSON and toJson() (CASSANDRA-11146)
 + * Better error message for cleanup (CASSANDRA-10991)
 + * cqlsh pg-style-strings broken if line ends with ';' (CASSANDRA-11123)
 + * Use cloned TokenMetadata in size estimates to avoid race against membership check
 +   (CASSANDRA-10736)
 + * Always persist upsampled index summaries (CASSANDRA-10512)
 + * (cqlsh) Fix inconsistent auto-complete (CASSANDRA-10733)
 + * Make SELECT JSON and toJson() threadsafe (CASSANDRA-11048)
 + * Fix SELECT on tuple relations for mixed ASC/DESC clustering order (CASSANDRA-7281)
 + * (cqlsh) Support utf-8/cp65001 encoding on Windows (CASSANDRA-11030)
 + * Fix paging on DISTINCT queries repeats result when first row in partition changes
 +   (CASSANDRA-10010)
 +Merged from 2.1:
+  * Add partition key to TombstoneOverwhelmingException error message (CASSANDRA-10888)
   * Use logback setting for 'cassandra -v' command (CASSANDRA-10767)
   * Fix sstableloader to unthrottle streaming by default (CASSANDRA-9714)
   * Fix incorrect warning in 'nodetool status' (CASSANDRA-10176)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fbf30d21/src/java/org/apache/cassandra/db/RowIteratorFactory.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fbf30d21/src/java/org/apache/cassandra/db/filter/ExtendedFilter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fbf30d21/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
index d2f0bf4,957d1ba..822d838
--- a/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
+++ b/src/java/org/apache/cassandra/db/filter/SliceQueryFilter.java
@@@ -278,23 -278,37 +278,24 @@@ public class SliceQueryFilter implement
  
              if (respectTombstoneThresholds() && columnCounter.tombstones() >
DatabaseDescriptor.getTombstoneFailureThreshold())
              {
 -                Tracing.trace("Scanned over {} tombstones; query aborted (see tombstone_failure_threshold)",
 -                              DatabaseDescriptor.getTombstoneFailureThreshold());
 -                String msg = String.format("Scanned over %d tombstones in %s.%s for key:
%1.512s; query aborted (see tombstone_failure_threshold).",
 -                                           DatabaseDescriptor.getTombstoneFailureThreshold(),
 -                                           container.metadata().ksName,
 -                                           container.metadata().cfName,
 -                                           container.metadata().getKeyValidator().getString(key.getKey()));
 -                logger.error(msg);
 -                throw new TombstoneOverwhelmingException();
 +                Tracing.trace("Scanned over {} tombstones; query aborted (see tombstone_failure_threshold);
slices={}",
 +                              DatabaseDescriptor.getTombstoneFailureThreshold(), getSlicesInfo(container));
 +
 +                throw new TombstoneOverwhelmingException(columnCounter.tombstones(),
 +                                                         count,
 +                                                         container.metadata().ksName,
 +                                                         container.metadata().cfName,
 +                                                         container.getComparator().getString(cell.name()),
-                                                          getSlicesInfo(container));
++                                                         getSlicesInfo(container),
++                                                         container.metadata().getKeyValidator().getString(key.getKey()));
              }
  
 -            container.maybeAppendColumn(cell, tester, gcBefore);
 +            container.appendColumn(cell);
          }
  
 -        Tracing.trace("Read {} live and {} tombstone cells", columnCounter.live(), columnCounter.tombstones());
 -        if (logger.isWarnEnabled() && respectTombstoneThresholds() && columnCounter.tombstones()
> DatabaseDescriptor.getTombstoneWarnThreshold())
 +        boolean warnTombstones = logger.isWarnEnabled() && respectTombstoneThresholds()
&& columnCounter.tombstones() > DatabaseDescriptor.getTombstoneWarnThreshold();
 +        if (warnTombstones)
          {
 -            StringBuilder sb = new StringBuilder();
 -            CellNameType type = container.metadata().comparator;
 -
 -            for (ColumnSlice sl : slices)
 -            {
 -                assert sl != null;
 -
 -                sb.append('[');
 -                sb.append(type.getString(sl.start));
 -                sb.append('-');
 -                sb.append(type.getString(sl.finish));
 -                sb.append(']');
 -            }
 -
              String msg = String.format("Read %d live and %d tombstone cells in %s.%s for
key: %1.512s (see tombstone_warn_threshold). %d columns were requested, slices=%1.512s",
                                         columnCounter.live(),
                                         columnCounter.tombstones(),

http://git-wip-us.apache.org/repos/asf/cassandra/blob/fbf30d21/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
index 7624e1b,6a6b0f6..da4e30f
--- a/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
+++ b/src/java/org/apache/cassandra/db/filter/TombstoneOverwhelmingException.java
@@@ -18,49 -18,6 +18,43 @@@
   */
  package org.apache.cassandra.db.filter;
  
- import org.apache.cassandra.db.DecoratedKey;
- 
  public class TombstoneOverwhelmingException extends RuntimeException
  {
 +    private final int numTombstones;
 +    private final int numRequested;
 +    private final String ksName;
 +    private final String cfName;
 +    private final String lastCellName;
 +    private final String slicesInfo;
-     private String partitionKey = null;
++    private final String partitionKey;
 +
 +    public TombstoneOverwhelmingException(int numTombstones,
 +                                          int numRequested,
 +                                          String ksName,
 +                                          String cfName,
 +                                          String lastCellName,
-                                           String slicesInfo)
++                                          String slicesInfo,
++                                          String partitionKey)
 +    {
 +        this.numTombstones = numTombstones;
 +        this.numRequested = numRequested;
 +        this.ksName = ksName;
 +        this.cfName = cfName;
 +        this.lastCellName = lastCellName;
 +        this.slicesInfo = slicesInfo;
-     }
- 
-     public void setKey(DecoratedKey key)
-     {
-         if (key != null)
-             partitionKey = key.toString();
++        this.partitionKey = partitionKey;
 +    }
 +
 +    public String getLocalizedMessage()
 +    {
 +        return getMessage();
 +    }
 +
 +    public String getMessage()
 +    {
 +        return String.format(
 +                "Scanned over %d tombstones in %s.%s; %d columns were requested; query aborted
" +
 +                "(see tombstone_failure_threshold); partitionKey=%s; lastCell=%s; slices=%s",
 +                numTombstones, ksName, cfName, numRequested, partitionKey, lastCellName,
slicesInfo);
 +    }
  }


Mime
View raw message