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 2020/04/07 23:36:07 UTC
[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk
This is an automated email from the ASF dual-hosted git repository.
benedict pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
commit 6f213727b678be4ee6ec350bd3ed1869db394ae9
Merge: d069fd2 912c6c4
Author: Benedict Elliott Smith <be...@apache.org>
AuthorDate: Wed Apr 8 00:35:14 2020 +0100
Merge branch 'cassandra-3.11' into trunk
CHANGES.txt | 3 ++
src/java/org/apache/cassandra/db/Memtable.java | 4 +-
.../db/partitions/AtomicBTreePartition.java | 39 ++++++++++++---
.../apache/cassandra/utils/concurrent/OpOrder.java | 58 +++++++++++++---------
.../cassandra/utils/memory/MemtableAllocator.java | 5 ++
.../apache/cassandra/index/CustomIndexTest.java | 2 +-
6 files changed, 76 insertions(+), 35 deletions(-)
diff --cc CHANGES.txt
index 5626aa5,9342825..ab71308
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,56 -1,9 +1,59 @@@
-3.11.7
+4.0-alpha4
+ * Fix cqlsh erroring out on Python 3.7 due to webbrowser module being absent (CASSANDRA-15572)
+ * Fix IMH#acquireCapacity() to return correct Outcome when endpoint reserve runs out (CASSANDRA-15607)
+ * Fix nodetool describering output (CASSANDRA-15682)
+ * Only track ideal CL failure when request CL met (CASSANDRA-15696)
+ * Fix flaky CoordinatorMessagingTest and docstring in OutboundSink and ConsistentSession (CASSANDRA-15672)
+ * Fix force compaction of wrapping ranges (CASSANDRA-15664)
+ * Expose repair streaming metrics (CASSANDRA-15656)
+ * Set now in seconds in the future for validation repairs (CASSANDRA-15655)
+ * Emit metric on preview repair failure (CASSANDRA-15654)
+ * Use more appropriate logging levels (CASSANDRA-15661)
+ * Added production recommendations and improved compaction doc organization
+ * Document usage of EC2Snitch with intra-region VPC peering (CASSANDRA-15337)
+ * Fixed flakey test in SASIIndexTest by shutting down its ExecutorService (CASSANDRA-15528)
+ * Fixed empty check in TrieMemIndex due to potential state inconsistency in ConcurrentSkipListMap (CASSANDRA-15526)
+ * Add compaction allocation measurement test (CASSANDRA-15388)
+ * Added UnleveledSSTables global and table level metric (CASSANDRA-15620)
+ * Added Virtual Table exposing Cassandra relevant system properties (CASSANDRA-15616, CASSANDRA-15643)
+ * Add data modeling introduction (CASSANDRA-15481)
+ * Improve the algorithmic token allocation in case racks = RF (CASSANDRA-15600)
+ * Fix ConnectionTest.testAcquireReleaseOutbound (CASSANDRA-15308)
+ * Include finalized pending sstables in preview repair (CASSANDRA-15553)
+ * Reverted to the original behavior of CLUSTERING ORDER on CREATE TABLE (CASSANDRA-15271)
+ * Correct inaccurate logging message (CASSANDRA-15549)
+ * Add documentation of dynamo (CASSANDRA-15486)
+ * Added documentation for Guarantees (CASSANDRA-15482)
+ * Added documentation for audit logging (CASSANDRA-15474)
+ * Unset GREP_OPTIONS (CASSANDRA-14487)
+ * Added streaming documentation (CASSANDRA-15477)
+ * Update to Python driver 3.21 for cqlsh (CASSANDRA-14872)
+ * Added bulk loading documentation (CASSANDRA-15480)
+ * Updated overview documentation (CASSANDRA-15483)
+ * Added CDC and speculative retry documentation to DDL section (CASSANDRA-15492)
+ * Fix missing Keyspaces in cqlsh describe output (CASSANDRA-15576)
+ * Fix multi DC nodetool status output (CASSANDRA-15305)
+ * Added documentation covering new Netty based internode messaging (CASSANDRA-15478)
+ * Add documentation of hints (CASSANDRA-15491)
+ * updateCoordinatorWriteLatencyTableMetric can produce misleading metrics (CASSANDRA-15569)
+ * Added documentation for read repair and an example of full repair (CASSANDRA-15485)
+ * Make cqlsh and cqlshlib Python 2 & 3 compatible (CASSANDRA-10190)
+ * Added documentation for Full Query Logging (CASSANDRA-15475)
+ * Added documentation for backups (CASSANDRA-15479)
+ * Documentation gives the wrong instruction to activate remote jmx (CASSANDRA-15535)
+ * Improve the description of nodetool listsnapshots command (CASSANDRA-14587)
+ * allow embedded cassandra launched from a one-jar or uno-jar (CASSANDRA-15494)
+ * Update hppc library to version 0.8.1 (CASSANDRA-12995)
+ * Limit the dependencies used by UDFs/UDAs (CASSANDRA-14737)
+ * Make native_transport_max_concurrent_requests_in_bytes updatable (CASSANDRA-15519)
+ * Cleanup and improvements to IndexInfo/ColumnIndex (CASSANDRA-15469)
+ * Potential Overflow in DatabaseDescriptor Functions That Convert Between KB/MB & Bytes (CASSANDRA-15470)
+Merged from 3.11:
* Allow sstableloader to use SSL on the native port (CASSANDRA-14904)
Merged from 3.0:
+ =======
+ 3.0.21
+ * Memtable memory allocations may deadlock (CASSANDRA-15367)
* Run evictFromMembership in GossipStage (CASSANDRA-15592)
Merged from 2.2:
* Disable JMX rebinding (CASSANDRA-15653)
diff --cc src/java/org/apache/cassandra/db/partitions/AtomicBTreePartition.java
index ec73814,a588303..486bec7
--- a/src/java/org/apache/cassandra/db/partitions/AtomicBTreePartition.java
+++ b/src/java/org/apache/cassandra/db/partitions/AtomicBTreePartition.java
@@@ -161,10 -110,11 +161,9 @@@ public final class AtomicBTreePartitio
public long[] addAllWithSizeDelta(final PartitionUpdate update, OpOrder.Group writeOp, UpdateTransaction indexer)
{
RowUpdater updater = new RowUpdater(this, allocator, writeOp, indexer);
- DeletionInfo inputDeletionInfoCopy = null;
- boolean monitorOwned = false;
try
{
- boolean shouldLock = usePessimisticLocking();
-
- monitorOwned = maybeLock(writeOp);
++ boolean shouldLock = shouldLock(writeOp);
indexer.start();
while (true)
@@@ -180,15 -140,25 +179,11 @@@
}
else
{
- deletionInfo = current.deletionInfo;
- }
+ long[] result = addAllWithSizeDeltaInternal(updater, update, indexer);
+ if (result != null)
+ return result;
- shouldLock = usePessimisticLocking();
- if (!shouldLock)
- {
- shouldLock = updateWastedAllocationTracker(updater.heapSize);
- }
- PartitionColumns columns = update.columns().mergeTo(current.columns);
- Row newStatic = update.staticRow();
- Row staticRow = newStatic.isEmpty()
- ? current.staticRow
- : (current.staticRow.isEmpty() ? updater.apply(newStatic) : updater.apply(current.staticRow, newStatic));
- Object[] tree = BTree.update(current.tree, update.metadata().comparator, update, update.rowCount(), updater);
- EncodingStats newStats = current.stats.mergeWith(update.stats());
-
- if (tree != null && refUpdater.compareAndSet(this, current, new Holder(columns, tree, deletionInfo, staticRow, newStats)))
- {
- updater.finish();
- return new long[]{ updater.dataSize, updater.colUpdateTimeDelta };
- }
- else if (!monitorOwned)
- {
- monitorOwned = maybeLock(updater.heapSize, writeOp);
++ shouldLock = shouldLock(updater.heapSize, writeOp);
}
}
}
@@@ -258,7 -230,36 +253,35 @@@
return allocator.ensureOnHeap().applyToPartition(super.iterator());
}
- public boolean usePessimisticLocking()
- private boolean maybeLock(OpOrder.Group writeOp)
++ private boolean shouldLock(OpOrder.Group writeOp)
+ {
+ if (!useLock())
+ return false;
+
+ return lockIfOldest(writeOp);
+ }
+
- private boolean maybeLock(long addWaste, OpOrder.Group writeOp)
++ private boolean shouldLock(long addWaste, OpOrder.Group writeOp)
+ {
+ if (!updateWastedAllocationTracker(addWaste))
+ return false;
+
+ return lockIfOldest(writeOp);
+ }
+
+ private boolean lockIfOldest(OpOrder.Group writeOp)
+ {
+ if (!writeOp.isOldestLiveGroup())
+ {
+ Thread.yield();
+ if (!writeOp.isOldestLiveGroup())
+ return false;
+ }
+
- Locks.monitorEnterUnsafe(this);
+ return true;
+ }
+
+ public boolean useLock()
{
return wasteTracker == TRACKER_PESSIMISTIC_LOCKING;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org