You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by bl...@apache.org on 2017/02/10 09:43:03 UTC
[1/2] cassandra git commit: Use only one file pointer when creating
commitlog segments
Repository: cassandra
Updated Branches:
refs/heads/cassandra-3.0 e885886d5 -> 9fca3cb15
Use only one file pointer when creating commitlog segments
patch by Benjamin Lerer; reviewed by Joshua McKenzie for CASSANDRA-12539
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/7680aebf
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/7680aebf
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/7680aebf
Branch: refs/heads/cassandra-3.0
Commit: 7680aebf10c34b05a24bdc925196038818ec5126
Parents: f0f9cf2
Author: Benjamin Lerer <b....@gmail.com>
Authored: Fri Feb 10 10:25:34 2017 +0100
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Fri Feb 10 10:25:34 2017 +0100
----------------------------------------------------------------------
CHANGES.txt | 1 +
.../db/commitlog/MemoryMappedSegment.java | 17 ++---------------
2 files changed, 3 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7680aebf/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c8419ab..4295dd8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
2.2.9
+ * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)
* Fix speculative retry bugs (CASSANDRA-13009)
* Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
* Remove support for non-JavaScript UDFs (CASSANDRA-12883)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/7680aebf/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java b/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java
index e240a91..fa9ef37 100644
--- a/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java
+++ b/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java
@@ -18,7 +18,6 @@
package org.apache.cassandra.db.commitlog;
import java.io.IOException;
-import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
@@ -55,21 +54,9 @@ public class MemoryMappedSegment extends CommitLogSegment
{
try
{
- // Extend the file size to the standard segment size.
- // NOTE: while we're using RAF to easily adjust file size, we need to avoid using RAF
- // for grabbing the FileChannel due to FILE_SHARE_DELETE flag bug on windows.
- // See: https://bugs.openjdk.java.net/browse/JDK-6357433 and CASSANDRA-8308
- try (RandomAccessFile raf = new RandomAccessFile(logFile, "rw"))
- {
- raf.setLength(DatabaseDescriptor.getCommitLogSegmentSize());
- }
- catch (IOException e)
- {
- throw new FSWriteError(e, logFile);
- }
+ MappedByteBuffer mappedFile = channel.map(FileChannel.MapMode.READ_WRITE, 0, DatabaseDescriptor.getCommitLogSegmentSize());
commitLog.allocator.addSize(DatabaseDescriptor.getCommitLogSegmentSize());
-
- return channel.map(FileChannel.MapMode.READ_WRITE, 0, DatabaseDescriptor.getCommitLogSegmentSize());
+ return mappedFile;
}
catch (IOException e)
{
[2/2] cassandra git commit: Merge branch cassandra-2.2 into
cassandra-3.0
Posted by bl...@apache.org.
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/9fca3cb1
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9fca3cb1
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9fca3cb1
Branch: refs/heads/cassandra-3.0
Commit: 9fca3cb1503e6d811f685088f881d04b09679212
Parents: e885886 7680aeb
Author: Benjamin Lerer <b....@gmail.com>
Authored: Fri Feb 10 10:40:24 2017 +0100
Committer: Benjamin Lerer <b....@gmail.com>
Committed: Fri Feb 10 10:40:24 2017 +0100
----------------------------------------------------------------------
CHANGES.txt | 2 ++
.../db/commitlog/MemoryMappedSegment.java | 17 ++---------------
2 files changed, 4 insertions(+), 15 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9fca3cb1/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index ae7b069,4295dd8..2345a4e
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,44 -1,7 +1,46 @@@
+3.0.11
+ * Reloading logback.xml does not work (CASSANDRA-13173)
+ * Lightweight transactions temporarily fail after upgrade from 2.1 to 3.0 (CASSANDRA-13109)
+ * Duplicate rows after upgrading from 2.1.16 to 3.0.10/3.9 (CASSANDRA-13125)
+ * Fix UPDATE queries with empty IN restrictions (CASSANDRA-13152)
+ * Abort or retry on failed hints delivery (CASSANDRA-13124)
+ * Fix handling of partition with partition-level deletion plus
+ live rows in sstabledump (CASSANDRA-13177)
+ * Provide user workaround when system_schema.columns does not contain entries
+ for a table that's in system_schema.tables (CASSANDRA-13180)
+ * Dump threads when unit tests time out (CASSANDRA-13117)
+ * Better error when modifying function permissions without explicit keyspace (CASSANDRA-12925)
+ * Indexer is not correctly invoked when building indexes over sstables (CASSANDRA-13075)
+ * Read repair is not blocking repair to finish in foreground repair (CASSANDRA-13115)
+ * Stress daemon help is incorrect (CASSANDRA-12563)
+ * Remove ALTER TYPE support (CASSANDRA-12443)
+ * Fix assertion for certain legacy range tombstone pattern (CASSANDRA-12203)
+ * Set javac encoding to utf-8 (CASSANDRA-11077)
+ * Replace empty strings with null values if they cannot be converted (CASSANDRA-12794)
+ * Fixed flacky SSTableRewriterTest: check file counts before calling validateCFS (CASSANDRA-12348)
+ * Fix deserialization of 2.x DeletedCells (CASSANDRA-12620)
+ * Add parent repair session id to anticompaction log message (CASSANDRA-12186)
+ * Improve contention handling on failure to acquire MV lock for streaming and hints (CASSANDRA-12905)
+ * Fix DELETE and UPDATE queries with empty IN restrictions (CASSANDRA-12829)
+ * Mark MVs as built after successful bootstrap (CASSANDRA-12984)
+ * Estimated TS drop-time histogram updated with Cell.NO_DELETION_TIME (CASSANDRA-13040)
+ * Nodetool compactionstats fails with NullPointerException (CASSANDRA-13021)
+ * Thread local pools never cleaned up (CASSANDRA-13033)
+ * Set RPC_READY to false when draining or if a node is marked as shutdown (CASSANDRA-12781)
+ * Make sure sstables only get committed when it's safe to discard commit log records (CASSANDRA-12956)
+ * Reject default_time_to_live option when creating or altering MVs (CASSANDRA-12868)
+ * Nodetool should use a more sane max heap size (CASSANDRA-12739)
+ * LocalToken ensures token values are cloned on heap (CASSANDRA-12651)
+ * AnticompactionRequestSerializer serializedSize is incorrect (CASSANDRA-12934)
+ * Prevent reloading of logback.xml from UDF sandbox (CASSANDRA-12535)
+ * Reenable HeapPool (CASSANDRA-12900)
+Merged from 2.2:
+ 2.2.9
+ * Use only one file pointer when creating commitlog segments (CASSANDRA-12539)
* Fix speculative retry bugs (CASSANDRA-13009)
- * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
+ * Fix handling of nulls and unsets in IN conditions (CASSANDRA-12981)
+ * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856)
+ * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979)
* Remove support for non-JavaScript UDFs (CASSANDRA-12883)
* Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074)
* cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909)
http://git-wip-us.apache.org/repos/asf/cassandra/blob/9fca3cb1/src/java/org/apache/cassandra/db/commitlog/MemoryMappedSegment.java
----------------------------------------------------------------------