Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 540C2200D57 for ; Mon, 11 Dec 2017 09:07:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 5292B160C13; Mon, 11 Dec 2017 08:07:16 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4CB00160C26 for ; Mon, 11 Dec 2017 09:07:15 +0100 (CET) Received: (qmail 82654 invoked by uid 500); 11 Dec 2017 08:07:13 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 81365 invoked by uid 99); 11 Dec 2017 08:07:13 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Dec 2017 08:07:13 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 43982E17C7; Mon, 11 Dec 2017 08:07:09 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: marcuse@apache.org To: commits@cassandra.apache.org Date: Mon, 11 Dec 2017 08:07:15 -0000 Message-Id: <766212e529dc4c8b984e5d5da01a064f@git.apache.org> In-Reply-To: <0da618a1cb254e46b809c4c76bb0f7bb@git.apache.org> References: <0da618a1cb254e46b809c4c76bb0f7bb@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/10] cassandra git commit: Merge branch 'cassandra-2.2' into cassandra-3.0 archived-at: Mon, 11 Dec 2017 08:07:16 -0000 Merge branch 'cassandra-2.2' into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d7329a63 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d7329a63 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d7329a63 Branch: refs/heads/trunk Commit: d7329a639f3761cacf360e1345c8bd2aef16a71b Parents: a9225f9 3cd2c3c Author: Marcus Eriksson Authored: Mon Dec 11 09:00:46 2017 +0100 Committer: Marcus Eriksson Committed: Mon Dec 11 09:00:46 2017 +0100 ---------------------------------------------------------------------- CHANGES.txt | 2 ++ .../cassandra/db/compaction/CompactionManager.java | 1 + .../org/apache/cassandra/db/compaction/Scrubber.java | 4 +++- .../io/sstable/IndexSummaryRedistribution.java | 12 ++++++++---- 4 files changed, 14 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7329a63/CHANGES.txt ---------------------------------------------------------------------- diff --cc CHANGES.txt index a5a97db,c1e81fd..8cff716 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,81 -1,7 +1,83 @@@ -2.2.12 +3.0.16 + * Fix SStable ordering by max timestamp in SinglePartitionReadCommand (CASSANDRA-14010) + * Accept role names containing forward-slash (CASSANDRA-14088) + * Optimize CRC check chance probability calculations (CASSANDRA-14094) + * Fix cleanup on keyspace with no replicas (CASSANDRA-13526) + * Fix updating base table rows with TTL not removing materialized view entries (CASSANDRA-14071) + * Reduce garbage created by DynamicSnitch (CASSANDRA-14091) + * More frequent commitlog chained markers (CASSANDRA-13987) + * Fix serialized size of DataLimits (CASSANDRA-14057) + * Add flag to allow dropping oversized read repair mutations (CASSANDRA-13975) + * Fix SSTableLoader logger message (CASSANDRA-14003) + * Fix repair race that caused gossip to block (CASSANDRA-13849) + * Tracing interferes with digest requests when using RandomPartitioner (CASSANDRA-13964) + * Add flag to disable materialized views, and warnings on creation (CASSANDRA-13959) + * Don't let user drop or generally break tables in system_distributed (CASSANDRA-13813) + * Provide a JMX call to sync schema with local storage (CASSANDRA-13954) + * Mishandling of cells for removed/dropped columns when reading legacy files (CASSANDRA-13939) + * Deserialise sstable metadata in nodetool verify (CASSANDRA-13922) ++Merged from 2.2: + * Grab refs during scrub/index redistribution/cleanup (CASSANDRA-13873) -2.2.11 + +3.0.15 + * Improve TRUNCATE performance (CASSANDRA-13909) + * Implement short read protection on partition boundaries (CASSANDRA-13595) + * Fix ISE thrown by UPI.Serializer.hasNext() for some SELECT queries (CASSANDRA-13911) + * Filter header only commit logs before recovery (CASSANDRA-13918) + * AssertionError prepending to a list (CASSANDRA-13149) + * Fix support for SuperColumn tables (CASSANDRA-12373) + * Handle limit correctly on tables with strict liveness (CASSANDRA-13883) + * Fix missing original update in TriggerExecutor (CASSANDRA-13894) + * Remove non-rpc-ready nodes from counter leader candidates (CASSANDRA-13043) + * Improve short read protection performance (CASSANDRA-13794) + * Fix sstable reader to support range-tombstone-marker for multi-slices (CASSANDRA-13787) + * Fix short read protection for tables with no clustering columns (CASSANDRA-13880) + * Make isBuilt volatile in PartitionUpdate (CASSANDRA-13619) + * Prevent integer overflow of timestamps in CellTest and RowsTest (CASSANDRA-13866) + * Fix counter application order in short read protection (CASSANDRA-12872) + * Don't block RepairJob execution on validation futures (CASSANDRA-13797) + * Wait for all management tasks to complete before shutting down CLSM (CASSANDRA-13123) + * INSERT statement fails when Tuple type is used as clustering column with default DESC order (CASSANDRA-13717) + * Fix pending view mutations handling and cleanup batchlog when there are local and remote paired mutations (CASSANDRA-13069) + * Improve config validation and documentation on overflow and NPE (CASSANDRA-13622) + * Range deletes in a CAS batch are ignored (CASSANDRA-13655) + * Avoid assertion error when IndexSummary > 2G (CASSANDRA-12014) + * Change repair midpoint logging for tiny ranges (CASSANDRA-13603) + * Better handle corrupt final commitlog segment (CASSANDRA-11995) + * StreamingHistogram is not thread safe (CASSANDRA-13756) + * Fix MV timestamp issues (CASSANDRA-11500) + * Better tolerate improperly formatted bcrypt hashes (CASSANDRA-13626) + * Fix race condition in read command serialization (CASSANDRA-13363) + * Enable segement creation before recovering commitlogs (CASSANDRA-13587) + * Fix AssertionError in short read protection (CASSANDRA-13747) + * Don't skip corrupted sstables on startup (CASSANDRA-13620) + * Fix the merging of cells with different user type versions (CASSANDRA-13776) + * Copy session properties on cqlsh.py do_login (CASSANDRA-13640) + * Potential AssertionError during ReadRepair of range tombstone and partition deletions (CASSANDRA-13719) + * Don't let stress write warmup data if n=0 (CASSANDRA-13773) + * Gossip thread slows down when using batch commit log (CASSANDRA-12966) + * Randomize batchlog endpoint selection with only 1 or 2 racks (CASSANDRA-12884) + * Fix digest calculation for counter cells (CASSANDRA-13750) + * Fix ColumnDefinition.cellValueType() for non-frozen collection and change SSTabledump to use type.toJSONString() (CASSANDRA-13573) + * Skip materialized view addition if the base table doesn't exist (CASSANDRA-13737) + * Drop table should remove corresponding entries in dropped_columns table (CASSANDRA-13730) + * Log warn message until legacy auth tables have been migrated (CASSANDRA-13371) + * Fix incorrect [2.1 <- 3.0] serialization of counter cells created in 2.0 (CASSANDRA-13691) + * Fix invalid writetime for null cells (CASSANDRA-13711) + * Fix ALTER TABLE statement to atomically propagate changes to the table and its MVs (CASSANDRA-12952) + * Fixed ambiguous output of nodetool tablestats command (CASSANDRA-13722) + * JMXEnabledThreadPoolExecutor with corePoolSize equal to maxPoolSize (Backport CASSANDRA-13329) + * Fix Digest mismatch Exception if hints file has UnknownColumnFamily (CASSANDRA-13696) + * Purge tombstones created by expired cells (CASSANDRA-13643) + * Make concat work with iterators that have different subsets of columns (CASSANDRA-13482) + * Set test.runners based on cores and memory size (CASSANDRA-13078) + * Allow different NUMACTL_ARGS to be passed in (CASSANDRA-13557) + * Allow native function calls in CQLSSTableWriter (CASSANDRA-12606) + * Fix secondary index queries on COMPACT tables (CASSANDRA-13627) + * Nodetool listsnapshots output is missing a newline, if there are no snapshots (CASSANDRA-13568) + * sstabledump reports incorrect usage for argument order (CASSANDRA-13532) +Merged from 2.2: * Safely handle empty buffers when outputting to JSON (CASSANDRA-13868) * Copy session properties on cqlsh.py do_login (CASSANDRA-13847) * Fix load over calculated issue in IndexSummaryRedistribution (CASSANDRA-13738) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7329a63/src/java/org/apache/cassandra/db/compaction/CompactionManager.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/compaction/CompactionManager.java index fdda562,2e69b6f..eaeb089 --- a/src/java/org/apache/cassandra/db/compaction/CompactionManager.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionManager.java @@@ -869,16 -850,18 +869,17 @@@ public class CompactionManager implemen if (compactionFileLocation == null) throw new IOException("disk full"); - ISSTableScanner scanner = cleanupStrategy.getScanner(sstable, getRateLimiter()); - CleanupInfo ci = new CleanupInfo(sstable, scanner); - - metrics.beginCompaction(ci); List finished; - try (SSTableRewriter writer = new SSTableRewriter(cfs, txn, sstable.maxDataAge, false); - CompactionController controller = new CompactionController(cfs, txn.originals(), getDefaultGcBefore(cfs)); - Refs refs = Refs.ref(Collections.singleton(sstable))) + int nowInSec = FBUtilities.nowInSeconds(); + try (SSTableRewriter writer = SSTableRewriter.construct(cfs, txn, false, sstable.maxDataAge, false); + ISSTableScanner scanner = cleanupStrategy.getScanner(sstable, getRateLimiter()); + CompactionController controller = new CompactionController(cfs, txn.originals(), getDefaultGcBefore(cfs, nowInSec)); ++ Refs refs = Refs.ref(Collections.singleton(sstable)); + CompactionIterator ci = new CompactionIterator(OperationType.CLEANUP, Collections.singletonList(scanner), controller, nowInSec, UUIDGen.getTimeUUID(), metrics)) { - writer.switchWriter(createWriter(cfs, compactionFileLocation, expectedBloomFilterSize, sstable.getSSTableMetadata().repairedAt, sstable)); + writer.switchWriter(createWriter(cfs, compactionFileLocation, expectedBloomFilterSize, sstable.getSSTableMetadata().repairedAt, sstable, txn)); - while (scanner.hasNext()) + while (ci.hasNext()) { if (ci.isStopRequested()) throw new CompactionInterruptedException(ci.getCompactionInfo()); http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7329a63/src/java/org/apache/cassandra/db/compaction/Scrubber.java ---------------------------------------------------------------------- diff --cc src/java/org/apache/cassandra/db/compaction/Scrubber.java index c010891,b6b20fb..c8e0c53 --- a/src/java/org/apache/cassandra/db/compaction/Scrubber.java +++ b/src/java/org/apache/cassandra/db/compaction/Scrubber.java @@@ -35,7 -36,11 +35,8 @@@ import org.apache.cassandra.io.sstable. import org.apache.cassandra.io.util.FileUtils; import org.apache.cassandra.io.util.RandomAccessReader; import org.apache.cassandra.service.ActiveRepairService; -import org.apache.cassandra.utils.ByteBufferUtil; -import org.apache.cassandra.utils.JVMStabilityInspector; -import org.apache.cassandra.utils.OutputHandler; -import org.apache.cassandra.utils.UUIDGen; +import org.apache.cassandra.utils.*; + import org.apache.cassandra.utils.concurrent.Refs; public class Scrubber implements Closeable { @@@ -135,17 -140,11 +136,18 @@@ this.nextRowPositionFromIndex = 0; } + private UnfilteredRowIterator withValidation(UnfilteredRowIterator iter, String filename) + { + return checkData ? UnfilteredRowIterators.withValidation(iter, filename) : iter; + } + public void scrub() { + List finished = new ArrayList<>(); + boolean completed = false; outputHandler.output(String.format("Scrubbing %s (%s bytes)", sstable, dataFile.length())); - try (SSTableRewriter writer = SSTableRewriter.construct(cfs, transaction, false, sstable.maxDataAge, transaction.isOffline())) - try (SSTableRewriter writer = new SSTableRewriter(cfs, transaction, sstable.maxDataAge, transaction.isOffline()); ++ try (SSTableRewriter writer = SSTableRewriter.construct(cfs, transaction, false, sstable.maxDataAge, transaction.isOffline()); + Refs refs = Refs.ref(Collections.singleton(sstable))) { nextIndexKey = indexAvailable() ? ByteBufferUtil.readWithShortLength(indexFile) : null; if (indexAvailable()) http://git-wip-us.apache.org/repos/asf/cassandra/blob/d7329a63/src/java/org/apache/cassandra/io/sstable/IndexSummaryRedistribution.java ---------------------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org