[jira] [Commented] (CASSANDRA-7731) Get max values for live/tombstone cells per slice
[ https://issues.apache.org/jira/browse/CASSANDRA-7731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135024#comment-14135024 ] Robert Stupp commented on CASSANDRA-7731: - Seems that the fix is committed to [release 3.1.0|http://search.maven.org/#artifactdetails|io.dropwizard.metrics|metrics-core|3.1.0|bundle]. But it would need some refactoring (more than package renames) in C* code to adopt that new version. I'll take stab on this to a) consistently verify it with currently used, b) check whether this is fixed in 3.1.0 and c) determine whether it's safe to adopt it in 2.1 or whether it needs to wait for 3.0. Sorry for the late answer. Get max values for live/tombstone cells per slice - Key: CASSANDRA-7731 URL: https://issues.apache.org/jira/browse/CASSANDRA-7731 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Cyril Scetbon Assignee: Robert Stupp Priority: Minor Fix For: 2.1.1 Attachments: 7731-2.0.txt, 7731-2.1.txt I think you should not say that slice statistics are valid for the [last five minutes |https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/tools/NodeCmd.java#L955-L956] in CFSTATS command of nodetool. I've read the documentation from yammer for Histograms and there is no way to force values to expire after x minutes except by [clearing|http://grepcode.com/file/repo1.maven.org/maven2/com.yammer.metrics/metrics-core/2.1.2/com/yammer/metrics/core/Histogram.java#96] it . The only thing I can see is that the last snapshot used to provide the median (or whatever you'd used instead) value is based on 1028 values. I think we should also be able to detect that some requests are accessing a lot of live/tombstone cells per query and that's not possible for now without activating DEBUG for SliceQueryFilter for example and by tweaking the threshold. Currently as nodetool cfstats returns the median if a low part of the queries are scanning a lot of live/tombstone cells we miss it ! -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7731) Get max values for live/tombstone cells per slice
[ https://issues.apache.org/jira/browse/CASSANDRA-7731?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135053#comment-14135053 ] Cyril Scetbon commented on CASSANDRA-7731: -- Thank you Robert. I'm eager to read your conclusions :) Get max values for live/tombstone cells per slice - Key: CASSANDRA-7731 URL: https://issues.apache.org/jira/browse/CASSANDRA-7731 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Cyril Scetbon Assignee: Robert Stupp Priority: Minor Fix For: 2.1.1 Attachments: 7731-2.0.txt, 7731-2.1.txt I think you should not say that slice statistics are valid for the [last five minutes |https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/tools/NodeCmd.java#L955-L956] in CFSTATS command of nodetool. I've read the documentation from yammer for Histograms and there is no way to force values to expire after x minutes except by [clearing|http://grepcode.com/file/repo1.maven.org/maven2/com.yammer.metrics/metrics-core/2.1.2/com/yammer/metrics/core/Histogram.java#96] it . The only thing I can see is that the last snapshot used to provide the median (or whatever you'd used instead) value is based on 1028 values. I think we should also be able to detect that some requests are accessing a lot of live/tombstone cells per query and that's not possible for now without activating DEBUG for SliceQueryFilter for example and by tweaking the threshold. Currently as nodetool cfstats returns the median if a low part of the queries are scanning a lot of live/tombstone cells we miss it ! -- This message was sent by Atlassian JIRA (v6.3.4#6332)
git commit: Improve compaction logging
Repository: cassandra Updated Branches: refs/heads/trunk 7fc0e9efe - 5f37e9fa5 Improve compaction logging Patch by Mihai Suteu; reviewed by marcuse for CASSANDRA-7818 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5f37e9fa Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5f37e9fa Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5f37e9fa Branch: refs/heads/trunk Commit: 5f37e9fa57189b6f9fd30f1c5f1894686d076b34 Parents: 7fc0e9e Author: Marcus Eriksson marc...@apache.org Authored: Tue Sep 16 08:36:07 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Tue Sep 16 08:37:19 2014 +0200 -- CHANGES.txt | 1 + .../cassandra/db/compaction/CompactionTask.java | 14 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f37e9fa/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 9a43511..ed141ef 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.0 + * Improve compaction logging (CASSANDRA-7818) * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) * Support Java source code for user-defined functions (CASSANDRA-7562) * Require arg types to disambiguate UDF drops (CASSANDRA-7812) http://git-wip-us.apache.org/repos/asf/cassandra/blob/5f37e9fa/src/java/org/apache/cassandra/db/compaction/CompactionTask.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java index 349caf3..fa0cffc 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java @@ -44,6 +44,7 @@ import org.apache.cassandra.io.sstable.SSTableWriter; import org.apache.cassandra.io.sstable.metadata.MetadataCollector; import org.apache.cassandra.service.ActiveRepairService; import org.apache.cassandra.utils.CloseableIterator; +import org.apache.cassandra.utils.UUIDGen; public class CompactionTask extends AbstractCompactionTask { @@ -132,7 +133,14 @@ public class CompactionTask extends AbstractCompactionTask // new sstables from flush can be added during a compaction, but only the compaction can remove them, // so in our single-threaded compaction world this is a valid way of determining if we're compacting // all the sstables (that existed when we started) -logger.info(Compacting {}, sstables); +StringBuilder ssTableLoggerMsg = new StringBuilder([); +for (SSTableReader sstr : sstables) +{ +ssTableLoggerMsg.append(String.format(SSTableReader(path=%s, level=%d), , sstr.getFilename(), sstr.getSSTableLevel())); +} +ssTableLoggerMsg.append(]); +String taskIdLoggerMsg = taskId == null ? UUIDGen.getTimeUUID().toString() : taskId.toString(); +logger.info(Compacting ({}) {}, taskIdLoggerMsg, ssTableLoggerMsg); long start = System.nanoTime(); long totalKeysWritten = 0; @@ -246,8 +254,8 @@ public class CompactionTask extends AbstractCompactionTask } SystemKeyspace.updateCompactionHistory(cfs.keyspace.getName(), cfs.name, System.currentTimeMillis(), startsize, endsize, mergedRows); -logger.info(String.format(Compacted %d sstables to [%s]. %,d bytes to %,d (~%d%% of original) in %,dms = %fMB/s. %,d total partitions merged to %,d. Partition merge counts were {%s}, - oldSStables.size(), newSSTableNames.toString(), startsize, endsize, (int) (ratio * 100), dTime, mbps, totalSourceRows, totalKeysWritten, mergeSummary.toString())); +logger.info(String.format(Compacted (%s) %d sstables to [%s] to level=%d. %,d bytes to %,d (~%d%% of original) in %,dms = %fMB/s. %,d total partitions merged to %,d. Partition merge counts were {%s}, + taskIdLoggerMsg, oldSStables.size(), newSSTableNames.toString(), getLevel(), startsize, endsize, (int) (ratio * 100), dTime, mbps, totalSourceRows, totalKeysWritten, mergeSummary.toString())); logger.debug(String.format(CF Total Bytes Compacted: %,d, CompactionTask.addToTotalBytesCompacted(endsize))); logger.debug(Actual #keys: {}, Estimated #keys:{}, Err%: {}, totalKeysWritten, estimatedTotalKeys, ((double)(totalKeysWritten - estimatedTotalKeys)/totalKeysWritten)); }
[jira] [Created] (CASSANDRA-7942) Allow CAS batch to modify multiple partitions.
Matt Stump created CASSANDRA-7942: - Summary: Allow CAS batch to modify multiple partitions. Key: CASSANDRA-7942 URL: https://issues.apache.org/jira/browse/CASSANDRA-7942 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Matt Stump Summary: Allow CAS batch to modify multiple partitions as long as all conditions use the same partition. Example usage: Create user if not exists, and also populate inverted indexes for the user entity. Batch conditions would continue to be limited to a single partition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7942) Allow CAS batch to modify multiple partitions.
[ https://issues.apache.org/jira/browse/CASSANDRA-7942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Stump updated CASSANDRA-7942: -- Attachment: trunk-7942.txt Allow CAS batch to modify multiple partitions. -- Key: CASSANDRA-7942 URL: https://issues.apache.org/jira/browse/CASSANDRA-7942 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Matt Stump Attachments: trunk-7942.txt Summary: Allow CAS batch to modify multiple partitions as long as all conditions use the same partition. Example usage: Create user if not exists, and also populate inverted indexes for the user entity. Batch conditions would continue to be limited to a single partition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7784) DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown
[ https://issues.apache.org/jira/browse/CASSANDRA-7784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-7784: - Attachment: 7784.txt DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown --- Key: CASSANDRA-7784 URL: https://issues.apache.org/jira/browse/CASSANDRA-7784 Project: Cassandra Issue Type: Bug Reporter: Benedict Assignee: Aleksey Yeschenko Priority: Minor Attachments: 7784.txt It looks like this is quite a realistic race to hit reasonably often, since we forceBlockingFlush after removing from Schema.cfIdMap, so there could be a lengthy window to overlap with an auto-save -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7784) DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown
[ https://issues.apache.org/jira/browse/CASSANDRA-7784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-7784: Reviewer: Benedict DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown --- Key: CASSANDRA-7784 URL: https://issues.apache.org/jira/browse/CASSANDRA-7784 Project: Cassandra Issue Type: Bug Reporter: Benedict Assignee: Aleksey Yeschenko Priority: Minor Attachments: 7784.txt It looks like this is quite a realistic race to hit reasonably often, since we forceBlockingFlush after removing from Schema.cfIdMap, so there could be a lengthy window to overlap with an auto-save -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7784) DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown
[ https://issues.apache.org/jira/browse/CASSANDRA-7784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135082#comment-14135082 ] Benedict commented on CASSANDRA-7784: - Mostly LGTM, in fact it seems like an obvious improvement all round. But I'd either remove the \@Deprecated method entirely, or not deprecate it. Since it's only used in one very cheap to replace place, I'd simply drop it. DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown --- Key: CASSANDRA-7784 URL: https://issues.apache.org/jira/browse/CASSANDRA-7784 Project: Cassandra Issue Type: Bug Reporter: Benedict Assignee: Aleksey Yeschenko Priority: Minor Attachments: 7784.txt It looks like this is quite a realistic race to hit reasonably often, since we forceBlockingFlush after removing from Schema.cfIdMap, so there could be a lengthy window to overlap with an auto-save -- This message was sent by Atlassian JIRA (v6.3.4#6332)
git commit: Fix saving caches when a table is dropped
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 4efb6dc8c - 05db5384f Fix saving caches when a table is dropped patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for CASSANDRA-7784 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05db5384 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05db5384 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05db5384 Branch: refs/heads/cassandra-2.1 Commit: 05db5384f163e1534b67bc6aa74efd1775c29830 Parents: 4efb6dc Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 16 00:30:21 2014 -0700 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 16 00:30:21 2014 -0700 -- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 35 -- .../org/apache/cassandra/cache/CacheKey.java| 38 ++-- .../apache/cassandra/cache/CounterCacheKey.java | 6 ++-- .../org/apache/cassandra/cache/KeyCacheKey.java | 4 +-- .../org/apache/cassandra/cache/RowCacheKey.java | 7 ++-- .../org/apache/cassandra/config/Schema.java | 9 + 7 files changed, 42 insertions(+), 58 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05db5384/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8fe4253..f89cc6d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) http://git-wip-us.apache.org/repos/asf/cassandra/blob/05db5384/src/java/org/apache/cassandra/cache/AutoSavingCache.java -- diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java b/src/java/org/apache/cassandra/cache/AutoSavingCache.java index affd69b..30b6891 100644 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.compaction.CompactionInfo; import org.apache.cassandra.db.compaction.CompactionManager; import org.apache.cassandra.db.compaction.OperationType; @@ -64,11 +65,18 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK this.cacheLoader = cacheloader; } +@Deprecated public File getCachePath(String ksName, String cfName, UUID cfId, String version) { return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); } +public File getCachePath(UUID cfId, String version) +{ +PairString, String names = Schema.instance.getCF(cfId); +return DatabaseDescriptor.getSerializedCachePath(names.left, names.right, cfId, cacheType, version); +} + public Writer getWriter(int keysToSave) { return new Writer(keysToSave); @@ -206,18 +214,21 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK long start = System.nanoTime(); -HashMapCacheKey.PathInfo, SequentialWriter writers = new HashMap(); +HashMapUUID, SequentialWriter writers = new HashMap(); try { for (K key : keys) { -CacheKey.PathInfo path = key.getPathInfo(); -SequentialWriter writer = writers.get(path); +UUID cfId = key.getCFId(); +if (!Schema.instance.hasCF(key.getCFId())) +continue; // the table has been dropped. + +SequentialWriter writer = writers.get(cfId); if (writer == null) { -writer = tempCacheFile(path); -writers.put(path, writer); +writer = tempCacheFile(cfId); +writers.put(cfId, writer); } try @@ -238,13 +249,13 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK FileUtils.closeQuietly(writer); } -for (Map.EntryCacheKey.PathInfo, SequentialWriter info : writers.entrySet()) +for (Map.EntryUUID, SequentialWriter entry : writers.entrySet()) { -
git commit: Fix saving caches when a table is dropped
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 05db5384f - e25d94e6e (forced update) Fix saving caches when a table is dropped patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for CASSANDRA-7784 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e25d94e6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e25d94e6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e25d94e6 Branch: refs/heads/cassandra-2.1 Commit: e25d94e6e9f2f18efa7cfb8c7ed02e826b413984 Parents: 4efb6dc Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 16 00:30:21 2014 -0700 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 16 00:34:01 2014 -0700 -- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 37 --- .../org/apache/cassandra/cache/CacheKey.java| 38 ++-- .../apache/cassandra/cache/CounterCacheKey.java | 6 ++-- .../org/apache/cassandra/cache/KeyCacheKey.java | 4 +-- .../org/apache/cassandra/cache/RowCacheKey.java | 7 ++-- .../org/apache/cassandra/config/Schema.java | 9 + 7 files changed, 43 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e25d94e6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8fe4253..f89cc6d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e25d94e6/src/java/org/apache/cassandra/cache/AutoSavingCache.java -- diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java b/src/java/org/apache/cassandra/cache/AutoSavingCache.java index affd69b..d8fd5e0 100644 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.compaction.CompactionInfo; import org.apache.cassandra.db.compaction.CompactionManager; import org.apache.cassandra.db.compaction.OperationType; @@ -64,11 +65,18 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK this.cacheLoader = cacheloader; } +@Deprecated public File getCachePath(String ksName, String cfName, UUID cfId, String version) { return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); } +public File getCachePath(UUID cfId, String version) +{ +PairString, String names = Schema.instance.getCF(cfId); +return DatabaseDescriptor.getSerializedCachePath(names.left, names.right, cfId, cacheType, version); +} + public Writer getWriter(int keysToSave) { return new Writer(keysToSave); @@ -103,7 +111,7 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK long start = System.nanoTime(); // modern format, allows both key and value (so key cache load can be purely sequential) -File path = getCachePath(cfs.keyspace.getName(), cfs.name, cfs.metadata.cfId, CURRENT_VERSION); +File path = getCachePath(cfs.metadata.cfId, CURRENT_VERSION); // if path does not exist, try without cfId (assuming saved cache is created with current CF) if (!path.exists()) path = getCachePath(cfs.keyspace.getName(), cfs.name, null, CURRENT_VERSION); @@ -206,18 +214,21 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK long start = System.nanoTime(); -HashMapCacheKey.PathInfo, SequentialWriter writers = new HashMap(); +HashMapUUID, SequentialWriter writers = new HashMap(); try { for (K key : keys) { -CacheKey.PathInfo path = key.getPathInfo(); -SequentialWriter writer = writers.get(path); +UUID cfId = key.getCFId(); +if (!Schema.instance.hasCF(key.getCFId())) +continue; // the table has been dropped. + +SequentialWriter writer = writers.get(cfId); if
[jira] [Commented] (CASSANDRA-7784) DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown
[ https://issues.apache.org/jira/browse/CASSANDRA-7784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135100#comment-14135100 ] Benedict commented on CASSANDRA-7784: - Ah, yes, I see the confusing part is that it hasn't been replaced in a place where it could have been, but the second usage is a place where it _couldn't_ be. It would be clearer if the first usage was replaced, so it were more obvious. Possibly also dropping the UUID from the parameter list. But no biggy DROP table leaves the counter and row cache in a temporarily inconsistent state that, if saved during, will cause an exception to be thrown --- Key: CASSANDRA-7784 URL: https://issues.apache.org/jira/browse/CASSANDRA-7784 Project: Cassandra Issue Type: Bug Reporter: Benedict Assignee: Aleksey Yeschenko Priority: Minor Fix For: 2.1.1 Attachments: 7784.txt It looks like this is quite a realistic race to hit reasonably often, since we forceBlockingFlush after removing from Schema.cfIdMap, so there could be a lengthy window to overlap with an auto-save -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[1/2] git commit: Fix saving caches when a table is dropped
Repository: cassandra Updated Branches: refs/heads/trunk 5f37e9fa5 - feb30e21c Fix saving caches when a table is dropped patch by Aleksey Yeschenko; reviewed by Benedict Elliott Smith for CASSANDRA-7784 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e25d94e6 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e25d94e6 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e25d94e6 Branch: refs/heads/trunk Commit: e25d94e6e9f2f18efa7cfb8c7ed02e826b413984 Parents: 4efb6dc Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 16 00:30:21 2014 -0700 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 16 00:34:01 2014 -0700 -- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 37 --- .../org/apache/cassandra/cache/CacheKey.java| 38 ++-- .../apache/cassandra/cache/CounterCacheKey.java | 6 ++-- .../org/apache/cassandra/cache/KeyCacheKey.java | 4 +-- .../org/apache/cassandra/cache/RowCacheKey.java | 7 ++-- .../org/apache/cassandra/config/Schema.java | 9 + 7 files changed, 43 insertions(+), 59 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e25d94e6/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 8fe4253..f89cc6d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) http://git-wip-us.apache.org/repos/asf/cassandra/blob/e25d94e6/src/java/org/apache/cassandra/cache/AutoSavingCache.java -- diff --git a/src/java/org/apache/cassandra/cache/AutoSavingCache.java b/src/java/org/apache/cassandra/cache/AutoSavingCache.java index affd69b..d8fd5e0 100644 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@ -29,6 +29,7 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.config.CFMetaData; import org.apache.cassandra.config.DatabaseDescriptor; +import org.apache.cassandra.config.Schema; import org.apache.cassandra.db.compaction.CompactionInfo; import org.apache.cassandra.db.compaction.CompactionManager; import org.apache.cassandra.db.compaction.OperationType; @@ -64,11 +65,18 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK this.cacheLoader = cacheloader; } +@Deprecated public File getCachePath(String ksName, String cfName, UUID cfId, String version) { return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); } +public File getCachePath(UUID cfId, String version) +{ +PairString, String names = Schema.instance.getCF(cfId); +return DatabaseDescriptor.getSerializedCachePath(names.left, names.right, cfId, cacheType, version); +} + public Writer getWriter(int keysToSave) { return new Writer(keysToSave); @@ -103,7 +111,7 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK long start = System.nanoTime(); // modern format, allows both key and value (so key cache load can be purely sequential) -File path = getCachePath(cfs.keyspace.getName(), cfs.name, cfs.metadata.cfId, CURRENT_VERSION); +File path = getCachePath(cfs.metadata.cfId, CURRENT_VERSION); // if path does not exist, try without cfId (assuming saved cache is created with current CF) if (!path.exists()) path = getCachePath(cfs.keyspace.getName(), cfs.name, null, CURRENT_VERSION); @@ -206,18 +214,21 @@ public class AutoSavingCacheK extends CacheKey, V extends InstrumentingCacheK long start = System.nanoTime(); -HashMapCacheKey.PathInfo, SequentialWriter writers = new HashMap(); +HashMapUUID, SequentialWriter writers = new HashMap(); try { for (K key : keys) { -CacheKey.PathInfo path = key.getPathInfo(); -SequentialWriter writer = writers.get(path); +UUID cfId = key.getCFId(); +if (!Schema.instance.hasCF(key.getCFId())) +continue; // the table has been dropped. + +SequentialWriter writer = writers.get(cfId); if (writer == null)
[2/2] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/feb30e21 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/feb30e21 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/feb30e21 Branch: refs/heads/trunk Commit: feb30e21c0d3f97cef4b87d66dc28bcbe51d29df Parents: 5f37e9f e25d94e Author: Aleksey Yeschenko alek...@apache.org Authored: Tue Sep 16 00:36:25 2014 -0700 Committer: Aleksey Yeschenko alek...@apache.org Committed: Tue Sep 16 00:38:21 2014 -0700 -- CHANGES.txt | 1 + .../apache/cassandra/cache/AutoSavingCache.java | 38 +++- .../org/apache/cassandra/cache/CacheKey.java| 38 ++-- .../apache/cassandra/cache/CounterCacheKey.java | 6 ++-- .../org/apache/cassandra/cache/KeyCacheKey.java | 4 +-- .../org/apache/cassandra/cache/RowCacheKey.java | 7 ++-- .../cassandra/config/DatabaseDescriptor.java| 9 + .../org/apache/cassandra/config/Schema.java | 9 + 8 files changed, 40 insertions(+), 72 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/CHANGES.txt -- diff --cc CHANGES.txt index ed141ef,f89cc6d..2db88fb --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,27 -1,5 +1,28 @@@ +3.0 + * Improve compaction logging (CASSANDRA-7818) + * Remove YamlFileNetworkTopologySnitch (CASSANDRA-7917) + * Support Java source code for user-defined functions (CASSANDRA-7562) + * Require arg types to disambiguate UDF drops (CASSANDRA-7812) + * Do anticompaction in groups (CASSANDRA-6851) + * Verify that UDF class methods are static (CASSANDRA-7781) + * Support pure user-defined functions (CASSANDRA-7395, 7740) + * Permit configurable timestamps with cassandra-stress (CASSANDRA-7416) + * Move sstable RandomAccessReader to nio2, which allows using the + FILE_SHARE_DELETE flag on Windows (CASSANDRA-4050) + * Remove CQL2 (CASSANDRA-5918) + * Add Thrift get_multi_slice call (CASSANDRA-6757) + * Optimize fetching multiple cells by name (CASSANDRA-6933) + * Allow compilation in java 8 (CASSANDRA-7028) + * Make incremental repair default (CASSANDRA-7250) + * Enable code coverage thru JaCoCo (CASSANDRA-7226) + * Switch external naming of 'column families' to 'tables' (CASSANDRA-4369) + * Shorten SSTable path (CASSANDRA-6962) + * Use unsafe mutations for most unit tests (CASSANDRA-6969) + * Fix race condition during calculation of pending ranges (CASSANDRA-7390) + + 2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) http://git-wip-us.apache.org/repos/asf/cassandra/blob/feb30e21/src/java/org/apache/cassandra/cache/AutoSavingCache.java -- diff --cc src/java/org/apache/cassandra/cache/AutoSavingCache.java index affd69b,d8fd5e0..5c39938 --- a/src/java/org/apache/cassandra/cache/AutoSavingCache.java +++ b/src/java/org/apache/cassandra/cache/AutoSavingCache.java @@@ -64,9 -65,16 +65,10 @@@ public class AutoSavingCacheK extends this.cacheLoader = cacheloader; } - public File getCachePath(String ksName, String cfName, UUID cfId, String version) -@Deprecated -public File getCachePath(String ksName, String cfName, UUID cfId, String version) -{ -return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); -} - + public File getCachePath(UUID cfId, String version) { - return DatabaseDescriptor.getSerializedCachePath(ksName, cfName, cfId, cacheType, version); + PairString, String names = Schema.instance.getCF(cfId); + return DatabaseDescriptor.getSerializedCachePath(names.left, names.right, cfId, cacheType, version); } public Writer getWriter(int keysToSave) @@@ -103,10 -111,10 +105,7 @@@ long start = System.nanoTime(); // modern format, allows both key and value (so key cache load can be purely sequential) - File path = getCachePath(cfs.keyspace.getName(), cfs.name, cfs.metadata.cfId, CURRENT_VERSION); - // if path does not exist, try without cfId (assuming saved cache is created with current CF) - if (!path.exists()) - path = getCachePath(cfs.keyspace.getName(), cfs.name, null, CURRENT_VERSION); + File path = getCachePath(cfs.metadata.cfId, CURRENT_VERSION); -// if path does not exist, try without cfId (assuming saved cache is created
[jira] [Commented] (CASSANDRA-7838) Warn user when disks are network/ebs mounted
[ https://issues.apache.org/jira/browse/CASSANDRA-7838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135111#comment-14135111 ] AMIT KUMAR commented on CASSANDRA-7838: --- I spent some time looking at these: * High disk latency -Sigar cannot determine disk io queue lengths on OSX or on file systems mounted via NFS on linux boxes it returns -1, ditto for disk reads, writes. * Swap enabled -we can determine that with accuracy on Unix/Linux and OSX * Ulimit -open files/max user process, those I could get on linux and OSX What ulimit values do we think are sane? Can one of you give disk latency a try on EBS disks? I can commit the changes to a branch and we can figure out what would be most useful. Thanks Amit Warn user when disks are network/ebs mounted Key: CASSANDRA-7838 URL: https://issues.apache.org/jira/browse/CASSANDRA-7838 Project: Cassandra Issue Type: Improvement Reporter: T Jake Luciani Priority: Minor Labels: lhf Fix For: 3.0 The Sigar project let's you probe os/cpu/filesystems across the major platforms. https://github.com/hyperic/sigar It would be nice on start-up to use this to warn users if they are running with settings that will make them sad, like Network drive or EBS on Ec2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-4762) Support IN clause for any clustering column
[ https://issues.apache.org/jira/browse/CASSANDRA-4762?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135188#comment-14135188 ] Benjamin Lerer commented on CASSANDRA-4762: --- The branch for 3.0 is: [branch|https://github.com/blerer/cassandra/commits/CASSANDRA-4762] Support IN clause for any clustering column --- Key: CASSANDRA-4762 URL: https://issues.apache.org/jira/browse/CASSANDRA-4762 Project: Cassandra Issue Type: Improvement Components: Core Reporter: T Jake Luciani Assignee: Benjamin Lerer Labels: cql, docs Fix For: 3.0 Attachments: 4762-1.txt Given CASSANDRA-3885 It seems it should be possible to store multiple ranges for many predicates even the inner parts of a composite column. They could be expressed as a expanded set of filter queries. example: {code} CREATE TABLE test ( name text, tdate timestamp, tdate2 timestamp, tdate3 timestamp, num double, PRIMARY KEY(name,tdate,tdate2,tdate3) ) WITH COMPACT STORAGE; SELECT * FROM test WHERE name IN ('a','b') and tdate IN ('2010-01-01','2011-01-01') and tdate2 IN ('2010-01-01','2011-01-01') and tdate3 IN ('2010-01-01','2011-01-01') {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Git Push Summary
Repository: cassandra Updated Tags: refs/tags/cassandra-2.1.0 [deleted] c51a64085
Git Push Summary
Repository: cassandra Updated Tags: refs/tags/cassandra-2.1.0 [created] 265d2ae20
[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
[ https://issues.apache.org/jira/browse/CASSANDRA-7546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135201#comment-14135201 ] Sylvain Lebresne commented on CASSANDRA-7546: - bq. https://git-wip-us.apache.org/repos/asf?p=cassandra.git;a=log;h=f099e086f3f002789e24bd6c58e52b7553cd5381 is what was released according to the 2.1.0 tag in git vs what Sylvain Lebresne said in the email thread regarding no changes after c6a2c65a75adea9a62896269da98dd036c8e57f3 which was 2.1.0-tentative I messed up when tagging it, it's the vote email that was correct, and I apologize for the confusion. I've updated the tag to reflect what was actually released. AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory - Key: CASSANDRA-7546 URL: https://issues.apache.org/jira/browse/CASSANDRA-7546 Project: Cassandra Issue Type: Bug Components: Core Reporter: graham sanderson Assignee: graham sanderson Fix For: 2.1.1 Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, suggestion1.txt, suggestion1_21.txt, young_gen_gc.png In order to preserve atomicity, this code attempts to read, clone/update, then CAS the state of the partition. Under heavy contention for updating a single partition this can cause some fairly staggering memory growth (the more cores on your machine the worst it gets). Whilst many usage patterns don't do highly concurrent updates to the same partition, hinting today, does, and in this case wild (order(s) of magnitude more than expected) memory allocation rates can be seen (especially when the updates being hinted are small updates to different partitions which can happen very fast on their own) - see CASSANDRA-7545 It would be best to eliminate/reduce/limit the spinning memory allocation whilst not slowing down the very common un-contended case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7928) Digest queries do not require alder32 checks
[ https://issues.apache.org/jira/browse/CASSANDRA-7928?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135348#comment-14135348 ] Benedict commented on CASSANDRA-7928: - WFM :) Digest queries do not require alder32 checks Key: CASSANDRA-7928 URL: https://issues.apache.org/jira/browse/CASSANDRA-7928 Project: Cassandra Issue Type: Improvement Reporter: sankalp kohli Assignee: sankalp kohli Priority: Minor Labels: performance Fix For: 2.1.1 While reading data from sstables, C* does Alder32 checks for any data being read. We have seen that this causes higher CPU usage while doing kernel profiling. These checks might not be useful for digest queries as they will have a different digest in case of corruption. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7519) Further stress improvements to generate more realistic workloads
[ https://issues.apache.org/jira/browse/CASSANDRA-7519?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-7519: Labels: docs tools (was: tools) Further stress improvements to generate more realistic workloads Key: CASSANDRA-7519 URL: https://issues.apache.org/jira/browse/CASSANDRA-7519 Project: Cassandra Issue Type: Improvement Components: Tools Reporter: Benedict Assignee: Benedict Priority: Minor Labels: docs, tools Fix For: 2.1.1 We generally believe that the most common workload is for reads to exponentially prefer most recently written data. However as stress currently behaves we have two id generation modes: sequential and random (although random can be distributed). I propose introducing a new mode which is somewhat like sequential, except we essentially 'look back' from the current id by some amount defined by a distribution. I may possibly make the position only increment as it's first written to also, so that this mode can be run from a clean slate with a mixed workload. This should allow is to generate workloads that are more representative. At the same time, I will introduce a timestamp value generator for primary key columns that is strictly ascending, i.e. has some random component but is based off of the actual system time (or some shared monotonically increasing state) so that we can again generate a more realistic workload. This may be challenging to tie in with the new procedurally generated partitions, but I'm sure it can be done without too much difficulty. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7916) Stress should collect and cross-cluster GC statistics
[ https://issues.apache.org/jira/browse/CASSANDRA-7916?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-7916: Labels: docs (was: ) Stress should collect and cross-cluster GC statistics - Key: CASSANDRA-7916 URL: https://issues.apache.org/jira/browse/CASSANDRA-7916 Project: Cassandra Issue Type: Improvement Components: Tools Reporter: Benedict Assignee: Benedict Priority: Minor Labels: docs Fix For: 2.1.1 It would be useful to see stress outputs deliver cross-cluster statistics, the most useful being GC data. Some simple changes to GCInspector collect the data, and can deliver to a nodetool request or to stress over JMX. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-6146) CQL-native stress
[ https://issues.apache.org/jira/browse/CASSANDRA-6146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-6146: Labels: docs qa-resolved (was: qa-resolved) CQL-native stress - Key: CASSANDRA-6146 URL: https://issues.apache.org/jira/browse/CASSANDRA-6146 Project: Cassandra Issue Type: New Feature Components: Tools Reporter: Jonathan Ellis Assignee: T Jake Luciani Labels: docs, qa-resolved Fix For: 2.1 rc3 Attachments: 6146-v2.txt, 6146.txt, 6164-v3.txt The existing CQL support in stress is not worth discussing. We need to start over, and we might as well kill two birds with one stone and move to the native protocol while we're at it. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-7943) Remove deprecated metrics
T Jake Luciani created CASSANDRA-7943: - Summary: Remove deprecated metrics Key: CASSANDRA-7943 URL: https://issues.apache.org/jira/browse/CASSANDRA-7943 Project: Cassandra Issue Type: Task Reporter: T Jake Luciani Fix For: 3.0 We have had both custom mbean metrics and yammer metrics systems in the code base since 1.2 we can probably drop the custom legacy metrics now -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-7943) Remove deprecated metrics
[ https://issues.apache.org/jira/browse/CASSANDRA-7943?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita resolved CASSANDRA-7943. --- Resolution: Duplicate Remove deprecated metrics -- Key: CASSANDRA-7943 URL: https://issues.apache.org/jira/browse/CASSANDRA-7943 Project: Cassandra Issue Type: Task Reporter: T Jake Luciani Fix For: 3.0 We have had both custom mbean metrics and yammer metrics systems in the code base since 1.2 we can probably drop the custom legacy metrics now -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-5657) remove deprecated metrics
[ https://issues.apache.org/jira/browse/CASSANDRA-5657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-5657: -- Labels: technical_debt (was: ) remove deprecated metrics - Key: CASSANDRA-5657 URL: https://issues.apache.org/jira/browse/CASSANDRA-5657 Project: Cassandra Issue Type: Task Components: Tools Reporter: Jonathan Ellis Assignee: T Jake Luciani Labels: technical_debt Fix For: 3.0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-5657) remove deprecated metrics
[ https://issues.apache.org/jira/browse/CASSANDRA-5657?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani reassigned CASSANDRA-5657: - Assignee: T Jake Luciani (was: Yuki Morishita) remove deprecated metrics - Key: CASSANDRA-5657 URL: https://issues.apache.org/jira/browse/CASSANDRA-5657 Project: Cassandra Issue Type: Task Components: Tools Reporter: Jonathan Ellis Assignee: T Jake Luciani Labels: technical_debt Fix For: 3.0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7838) Warn user when disks are network/ebs mounted
[ https://issues.apache.org/jira/browse/CASSANDRA-7838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135447#comment-14135447 ] T Jake Luciani commented on CASSANDRA-7838: --- Here are the current recommended settings. I think the ulimit stuff is a good thing to start with http://www.datastax.com/documentation/cassandra/2.0/cassandra/install/installRecommendSettings.html Warn user when disks are network/ebs mounted Key: CASSANDRA-7838 URL: https://issues.apache.org/jira/browse/CASSANDRA-7838 Project: Cassandra Issue Type: Improvement Reporter: T Jake Luciani Priority: Minor Labels: lhf Fix For: 3.0 The Sigar project let's you probe os/cpu/filesystems across the major platforms. https://github.com/hyperic/sigar It would be nice on start-up to use this to warn users if they are running with settings that will make them sad, like Network drive or EBS on Ec2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-7402) Add metrics to track memory used by client requests
[ https://issues.apache.org/jira/browse/CASSANDRA-7402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani reassigned CASSANDRA-7402: - Assignee: T Jake Luciani Add metrics to track memory used by client requests --- Key: CASSANDRA-7402 URL: https://issues.apache.org/jira/browse/CASSANDRA-7402 Project: Cassandra Issue Type: Improvement Reporter: T Jake Luciani Assignee: T Jake Luciani Labels: ops, performance, stability Fix For: 3.0 When running a production cluster one common operational issue is quantifying GC pauses caused by ongoing requests. Since different queries return varying amount of data you can easily get your self into a situation where you Stop the world from a couple of bad actors in the system. Or more likely the aggregate garbage generated on a single node across all in flight requests causes a GC. We should be able to set a limit on the max heap we can allocate to all outstanding requests and track the garbage per requests to stop this from happening. It should increase a single nodes availability substantially. In the yaml this would be {code} total_request_memory_space_mb: 400 {code} It would also be nice to have either a log of queries which generate the most garbage so operators can track this. Also a histogram. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-5657) remove deprecated metrics
[ https://issues.apache.org/jira/browse/CASSANDRA-5657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135464#comment-14135464 ] Benedict commented on CASSANDRA-5657: - This does _not_ appear to be the same as the just closed CASSANDRA-7943, which suggests dropping 'legacy metrics' - which seems to refer to the custom histogram. This ticket refers to removing deprecated mbeans and object wrappers only. I am -1 dropping the legacy histograms, since they are considerably more accurate than the yammer histograms. Before we consider dropping them we need to consider holistically our approach to metrics, which really need overhauling, since yammer metrics are lacking. remove deprecated metrics - Key: CASSANDRA-5657 URL: https://issues.apache.org/jira/browse/CASSANDRA-5657 Project: Cassandra Issue Type: Task Components: Tools Reporter: Jonathan Ellis Assignee: T Jake Luciani Labels: technical_debt Fix For: 3.0 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-3017) add a Message size limit
[ https://issues.apache.org/jira/browse/CASSANDRA-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani reassigned CASSANDRA-3017: - Assignee: T Jake Luciani add a Message size limit Key: CASSANDRA-3017 URL: https://issues.apache.org/jira/browse/CASSANDRA-3017 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Jonathan Ellis Assignee: T Jake Luciani Priority: Minor Labels: lhf Attachments: 0001-use-the-thrift-max-message-size-for-inter-node-messa.patch, trunk-3017.txt We protect the server from allocating huge buffers for malformed message with the Thrift frame size (CASSANDRA-475). But we don't have similar protection for the inter-node Message objects. Adding this would be good to deal with malicious adversaries as well as a malfunctioning cluster participant. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7838) Warn user when disks are network/ebs mounted
[ https://issues.apache.org/jira/browse/CASSANDRA-7838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135505#comment-14135505 ] Joshua McKenzie commented on CASSANDRA-7838: {quote}on OSX or on file systems mounted via NFS on linux{quote} {quote}on Unix/Linux and OSX{quote} {quote}on linux and OSX{quote} Something appears to be missing... ;) A quick peek at their javadocs looks like Win32 has support for quite a few of the above so I don't expect this to be a *big* issue, but worth keeping in mind. Warn user when disks are network/ebs mounted Key: CASSANDRA-7838 URL: https://issues.apache.org/jira/browse/CASSANDRA-7838 Project: Cassandra Issue Type: Improvement Reporter: T Jake Luciani Priority: Minor Labels: lhf Fix For: 3.0 The Sigar project let's you probe os/cpu/filesystems across the major platforms. https://github.com/hyperic/sigar It would be nice on start-up to use this to warn users if they are running with settings that will make them sad, like Network drive or EBS on Ec2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7818) Improve compaction logging
[ https://issues.apache.org/jira/browse/CASSANDRA-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135538#comment-14135538 ] Benedict commented on CASSANDRA-7818: - Is it worth shortening the SSTableReader() prefix in the message to clean the messages up a little further? No need for it really. Something like {code} StringBuilder ssTableLoggerMsg = new StringBuilder([); for (SSTableReader sstr : sstables) { ssTableLoggerMsg.append(String.format(%s:level %d), , sstr.getFilename(), sstr.getSSTableLevel())); } ssTableLoggerMsg.append(]); {code} ? Improve compaction logging -- Key: CASSANDRA-7818 URL: https://issues.apache.org/jira/browse/CASSANDRA-7818 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Mihai Suteu Priority: Minor Labels: compaction, lhf Fix For: 3.0 Attachments: cassandra-7818.patch We should log more information about compactions to be able to debug issues more efficiently * give each CompactionTask an id that we log (so that you can relate the start-compaction-messages to the finished-compaction ones) * log what level the sstables are taken from -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-7818) Improve compaction logging
[ https://issues.apache.org/jira/browse/CASSANDRA-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135538#comment-14135538 ] Benedict edited comment on CASSANDRA-7818 at 9/16/14 2:40 PM: -- Is it worth shortening the SSTableReader() prefix in the message to clean the messages up a little further? No need for it really. Something like {code} StringBuilder ssTableLoggerMsg = new StringBuilder([); for (SSTableReader sstr : sstables) { ssTableLoggerMsg.append(String.format(%s:level %d, , sstr.getFilename(), sstr.getSSTableLevel())); } ssTableLoggerMsg.append(]); {code} ? was (Author: benedict): Is it worth shortening the SSTableReader() prefix in the message to clean the messages up a little further? No need for it really. Something like {code} StringBuilder ssTableLoggerMsg = new StringBuilder([); for (SSTableReader sstr : sstables) { ssTableLoggerMsg.append(String.format(%s:level %d), , sstr.getFilename(), sstr.getSSTableLevel())); } ssTableLoggerMsg.append(]); {code} ? Improve compaction logging -- Key: CASSANDRA-7818 URL: https://issues.apache.org/jira/browse/CASSANDRA-7818 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Mihai Suteu Priority: Minor Labels: compaction, lhf Fix For: 3.0 Attachments: cassandra-7818.patch We should log more information about compactions to be able to debug issues more efficiently * give each CompactionTask an id that we log (so that you can relate the start-compaction-messages to the finished-compaction ones) * log what level the sstables are taken from -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
Jim Bisso created CASSANDRA-7944: Summary: cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reassigned CASSANDRA-7944: --- Assignee: Mikhail Stepura cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Assignee: Mikhail Stepura 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-7944: Priority: Minor (was: Major) Fix Version/s: 2.1.1 cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Assignee: Mikhail Stepura Priority: Minor Fix For: 2.1.1 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7546) AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory
[ https://issues.apache.org/jira/browse/CASSANDRA-7546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135637#comment-14135637 ] graham sanderson commented on CASSANDRA-7546: - Ok, thanks Sylvain, yes I was a bit confused (also because Benedict's changes included in the incorrect tag had CHANGES.txt with his new stress change as part of listed 2.1.0 changes - which of course now makes sense); anyways... this is good news for me, I'll leave the test cluster on what I deployed (2.1.0-tentative == the real 2.1.0 as expected according to how the vote was looking at the time), and update stress.jar on my load machine to come from 2.1 head. AtomicSortedColumns.addAllWithSizeDelta has a spin loop that allocates memory - Key: CASSANDRA-7546 URL: https://issues.apache.org/jira/browse/CASSANDRA-7546 Project: Cassandra Issue Type: Bug Components: Core Reporter: graham sanderson Assignee: graham sanderson Fix For: 2.1.1 Attachments: 7546.20.txt, 7546.20_2.txt, 7546.20_3.txt, 7546.20_4.txt, 7546.20_5.txt, 7546.20_6.txt, 7546.20_7.txt, 7546.20_7b.txt, 7546.20_alt.txt, 7546.20_async.txt, 7546.21_v1.txt, hint_spikes.png, suggestion1.txt, suggestion1_21.txt, young_gen_gc.png In order to preserve atomicity, this code attempts to read, clone/update, then CAS the state of the partition. Under heavy contention for updating a single partition this can cause some fairly staggering memory growth (the more cores on your machine the worst it gets). Whilst many usage patterns don't do highly concurrent updates to the same partition, hinting today, does, and in this case wild (order(s) of magnitude more than expected) memory allocation rates can be seen (especially when the updates being hinted are small updates to different partitions which can happen very fast on their own) - see CASSANDRA-7545 It would be best to eliminate/reduce/limit the spinning memory allocation whilst not slowing down the very common un-contended case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7942) Allow CAS batch to modify multiple partitions.
[ https://issues.apache.org/jira/browse/CASSANDRA-7942?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Matt Stump updated CASSANDRA-7942: -- Attachment: 2.0-7942.txt Allow CAS batch to modify multiple partitions. -- Key: CASSANDRA-7942 URL: https://issues.apache.org/jira/browse/CASSANDRA-7942 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Matt Stump Attachments: 2.0-7942.txt, trunk-7942.txt Summary: Allow CAS batch to modify multiple partitions as long as all conditions use the same partition. Example usage: Create user if not exists, and also populate inverted indexes for the user entity. Batch conditions would continue to be limited to a single partition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7873) Replace AbstractRowResolver.replies with collection with tailored properties
[ https://issues.apache.org/jira/browse/CASSANDRA-7873?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-7873: --- Labels: qa-resolved (was: ) Replace AbstractRowResolver.replies with collection with tailored properties Key: CASSANDRA-7873 URL: https://issues.apache.org/jira/browse/CASSANDRA-7873 Project: Cassandra Issue Type: Bug Environment: OSX and Ubuntu 14.04 Reporter: Philip Thompson Assignee: Benedict Labels: qa-resolved Fix For: 3.0 Attachments: 7873.21.txt, 7873.trunk.txt, 7873.txt The dtest auth_test.py:TestAuth.system_auth_ks_is_alterable_test is failing on trunk only with the following stack trace: {code} Unexpected error in node1 node log: ERROR [Thrift:1] 2014-09-03 15:48:08,389 CustomTThreadPoolServer.java:219 - Error occurred during processing of message. java.util.ConcurrentModificationException: null at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:859) ~[na:1.7.0_65] at java.util.ArrayList$Itr.next(ArrayList.java:831) ~[na:1.7.0_65] at org.apache.cassandra.service.RowDigestResolver.resolve(RowDigestResolver.java:71) ~[main/:na] at org.apache.cassandra.service.RowDigestResolver.resolve(RowDigestResolver.java:28) ~[main/:na] at org.apache.cassandra.service.ReadCallback.get(ReadCallback.java:110) ~[main/:na] at org.apache.cassandra.service.AbstractReadExecutor.get(AbstractReadExecutor.java:144) ~[main/:na] at org.apache.cassandra.service.StorageProxy.fetchRows(StorageProxy.java:1228) ~[main/:na] at org.apache.cassandra.service.StorageProxy.read(StorageProxy.java:1154) ~[main/:na] at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:256) ~[main/:na] at org.apache.cassandra.cql3.statements.SelectStatement.execute(SelectStatement.java:212) ~[main/:na] at org.apache.cassandra.auth.Auth.selectUser(Auth.java:257) ~[main/:na] at org.apache.cassandra.auth.Auth.isExistingUser(Auth.java:76) ~[main/:na] at org.apache.cassandra.service.ClientState.login(ClientState.java:178) ~[main/:na] at org.apache.cassandra.thrift.CassandraServer.login(CassandraServer.java:1486) ~[main/:na] at org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(Cassandra.java:3579) ~[thrift/:na] at org.apache.cassandra.thrift.Cassandra$Processor$login.getResult(Cassandra.java:3563) ~[thrift/:na] at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:39) ~[libthrift-0.9.1.jar:0.9.1] at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:39) ~[libthrift-0.9.1.jar:0.9.1] at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:201) ~[main/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_65] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_65] {code} That exception is thrown when the following query is sent: {code} SELECT strategy_options FROM system.schema_keyspaces WHERE keyspace_name = 'system_auth' {code} The test alters the RF of the system_auth keyspace, then shuts down and restarts the cluster. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
Yuki Morishita created CASSANDRA-7945: - Summary: new cassanrda-stress does not work with NetworkTopologyStrategy Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Reporter: Yuki Morishita Priority: Trivial {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7410) Pig support for BulkOutputFormat as a parameter in url
[ https://issues.apache.org/jira/browse/CASSANDRA-7410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135690#comment-14135690 ] Alex Liu commented on CASSANDRA-7410: - checking Pig support for BulkOutputFormat as a parameter in url -- Key: CASSANDRA-7410 URL: https://issues.apache.org/jira/browse/CASSANDRA-7410 Project: Cassandra Issue Type: Improvement Components: Hadoop Reporter: Alex Liu Assignee: Alex Liu Priority: Minor Fix For: 2.0.11 Attachments: 7410-2.0-branch.txt Add BulkOutputFormat support in Pig url -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7942) Allow CAS batch to modify multiple partitions.
[ https://issues.apache.org/jira/browse/CASSANDRA-7942?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135702#comment-14135702 ] Matt Stump commented on CASSANDRA-7942: --- Hold off, the patches have a bug. Allow CAS batch to modify multiple partitions. -- Key: CASSANDRA-7942 URL: https://issues.apache.org/jira/browse/CASSANDRA-7942 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Matt Stump Attachments: 2.0-7942.txt, trunk-7942.txt Summary: Allow CAS batch to modify multiple partitions as long as all conditions use the same partition. Example usage: Create user if not exists, and also populate inverted indexes for the user entity. Batch conditions would continue to be limited to a single partition. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7930: --- Labels: jmx (was: ) Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7938) Releases prior to 2.0 gratuitously invalidate buffer cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7938?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] T Jake Luciani updated CASSANDRA-7938: -- Attachment: 7938.txt Patch to ignore fadvise calls with -Dcassandra.ignore.fadvise=true Releases prior to 2.0 gratuitously invalidate buffer cache -- Key: CASSANDRA-7938 URL: https://issues.apache.org/jira/browse/CASSANDRA-7938 Project: Cassandra Issue Type: Bug Components: Core Reporter: Matt Stump Fix For: 1.2.19 Attachments: 7938.txt RandomAccessReader gratuitously invalidates the buffer cache in releases prior to 2.0. Additionally, Linux 3.X kernels spend 30% of CPU time in book keeping for the invalidated pages as captured by CPU flame graphs. fadvise DONT_NEED should never be called for files other than the commit log segments. https://github.com/apache/cassandra/blob/cassandra-2.1/src/java/org/apache/cassandra/io/util/RandomAccessReader.java#L168 -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7923) When preparing a statement, do not parse the provided string if we already have the parsed statement cached
[ https://issues.apache.org/jira/browse/CASSANDRA-7923?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7923: --- Reviewer: Tyler Hobbs When preparing a statement, do not parse the provided string if we already have the parsed statement cached --- Key: CASSANDRA-7923 URL: https://issues.apache.org/jira/browse/CASSANDRA-7923 Project: Cassandra Issue Type: Improvement Reporter: Benedict Assignee: Benedict Priority: Minor Labels: cql, performance Fix For: 2.1.1 Attachments: 7923.txt If there are many clients preparing the same statement (or the same client preparing it multiple times), there's no point parsing the statement each times. We already have it prepared, we should ship back the prior result. I would like us separately to consider introducing some checks to ensure that we never have a hash collision (and error if we do, asking the user to salt their query string), but this change in no way increases the risk profile here, since all we did was overwrite the prior statement with the new one. This change means that clients referencing the old statement continue to function and the client registering the colliding statement will not execute the correct statement, but this is in no way worse than the reverse situation. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7930: --- Labels: bootcamp jmx (was: jmx) Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
git commit: Clean up compaction logging more - followup to CASSANDRA-7818
Repository: cassandra Updated Branches: refs/heads/trunk feb30e21c - 38d5178a3 Clean up compaction logging more - followup to CASSANDRA-7818 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/38d5178a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/38d5178a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/38d5178a Branch: refs/heads/trunk Commit: 38d5178a3714d04d557b05dc6e76a5cb97f3c93b Parents: feb30e2 Author: Marcus Eriksson marc...@apache.org Authored: Tue Sep 16 19:02:15 2014 +0200 Committer: Marcus Eriksson marc...@apache.org Committed: Tue Sep 16 19:02:15 2014 +0200 -- src/java/org/apache/cassandra/db/compaction/CompactionTask.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/38d5178a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java -- diff --git a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java index fa0cffc..4a22d0c 100644 --- a/src/java/org/apache/cassandra/db/compaction/CompactionTask.java +++ b/src/java/org/apache/cassandra/db/compaction/CompactionTask.java @@ -136,7 +136,7 @@ public class CompactionTask extends AbstractCompactionTask StringBuilder ssTableLoggerMsg = new StringBuilder([); for (SSTableReader sstr : sstables) { -ssTableLoggerMsg.append(String.format(SSTableReader(path=%s, level=%d), , sstr.getFilename(), sstr.getSSTableLevel())); +ssTableLoggerMsg.append(String.format(%s:level=%d, , sstr.getFilename(), sstr.getSSTableLevel())); } ssTableLoggerMsg.append(]); String taskIdLoggerMsg = taskId == null ? UUIDGen.getTimeUUID().toString() : taskId.toString();
[jira] [Commented] (CASSANDRA-7818) Improve compaction logging
[ https://issues.apache.org/jira/browse/CASSANDRA-7818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135725#comment-14135725 ] Marcus Eriksson commented on CASSANDRA-7818: sure, committed Improve compaction logging -- Key: CASSANDRA-7818 URL: https://issues.apache.org/jira/browse/CASSANDRA-7818 Project: Cassandra Issue Type: Improvement Reporter: Marcus Eriksson Assignee: Mihai Suteu Priority: Minor Labels: compaction, lhf Fix For: 3.0 Attachments: cassandra-7818.patch We should log more information about compactions to be able to debug issues more efficiently * give each CompactionTask an id that we log (so that you can relate the start-compaction-messages to the finished-compaction ones) * log what level the sstables are taken from -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135739#comment-14135739 ] Mikhail Stepura commented on CASSANDRA-7944: [~thobbs] it is supposed to be fixed by CASSANDRA-7863. isn't it? cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Assignee: Mikhail Stepura Priority: Minor Fix For: 2.1.1 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reassigned CASSANDRA-7945: --- Assignee: Benedict new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-7945: Component/s: Tools Fix Version/s: 2.1.1 new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress Fix For: 2.1.1 {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-7945: Attachment: 7945.txt Could you give this patch a try? It simply avoids passing through the extra RF option if it isn't the SimpleStrategy and it isn't specified explicitly by the user, so should fix it. new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress Fix For: 2.1.1 Attachments: 7945.txt {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135759#comment-14135759 ] Tyler Hobbs commented on CASSANDRA-7930: Two last minor tweaks and then it should be good to go: * In the log statement about evicted prepared statements, it should specify that X statements were discarded _in the last minute_ * Why is {{activePreparedStatements}} incremented in a {{finally}} block? It should be sufficient to just increment immediately after the {{put()}} call. Also, the current code doesn't handle duplicate statements being prepared more than once, but I'll make sure that gets taken care of in CASSANDRA-7923. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7566) DROP TABLE should also drop prepared statements associated to
[ https://issues.apache.org/jira/browse/CASSANDRA-7566?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tyler Hobbs updated CASSANDRA-7566: --- Labels: bootcamp cql3 (was: cql3) DROP TABLE should also drop prepared statements associated to - Key: CASSANDRA-7566 URL: https://issues.apache.org/jira/browse/CASSANDRA-7566 Project: Cassandra Issue Type: Bug Components: Core Environment: OSX 10.9.4 / JDK 1.8.0_05 Reporter: Ben Hood Assignee: Yuki Morishita Labels: bootcamp, cql3 Fix For: 2.1.1 Attachments: trunk-7566.txt An integration test suite that drops and creates the same column family 3 times causes the following error in the server log: INFO 15:40:34 Initializing gocql_test.wiki_page ERROR 15:40:34 Attempted to write commit log entry for unrecognized column family: b0e167e0-0dc8-11e4-9cbb-29a4872887f2 ERROR 15:40:34 Attempting to mutate non-existant column family b0e167e0-0dc8-11e4-9cbb-29a4872887f2 ERROR 15:40:34 Attempted to write commit log entry for unrecognized column family: b0e167e0-0dc8-11e4-9cbb-29a4872887f2 ERROR 15:40:34 Attempting to mutate non-existant column family b0e167e0-0dc8-11e4-9cbb-29a4872887f2 The test that reproduces this issue is here: https://github.com/gocql/gocql/blob/master/wiki_test.go Interestingly this issue only occurs after the common table is dropped/created for the 3rd time. If only one of the tests is run on its own, this issue does not arise. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135771#comment-14135771 ] Tyler Hobbs commented on CASSANDRA-7944: Yes. I'm not able to reproduce this in 2.1, are you? cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Assignee: Mikhail Stepura Priority: Minor Fix For: 2.1.1 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135794#comment-14135794 ] Yuki Morishita commented on CASSANDRA-7945: --- {code} strategy.equals(org.apache.cassandra.locator.SimpleStrategy) {code} {{strategy}} here is {{OptionSimple}} object so equality is always false. so when no {{-schema}} it fails to create replication strategy. Otherwise, it works for NTS. new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress Fix For: 2.1.1 Attachments: 7945.txt {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135793#comment-14135793 ] Jim Bisso commented on CASSANDRA-7944: -- I forgot to mention, this was with 2.1.0-rc7 cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Assignee: Mikhail Stepura Priority: Minor Fix For: 2.1.1 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7833) Collection types validation is incomplete
[ https://issues.apache.org/jira/browse/CASSANDRA-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-7833: Attachment: 7833.txt Attaching trivial fix. It's on the 2.0. The 2.1 branch actually has (commented out) tests for this (in CollectionsTest.testInvalidCollectionsMix) but as it's not in 2.0, I'll just activate the tests while merging. Collection types validation is incomplete - Key: CASSANDRA-7833 URL: https://issues.apache.org/jira/browse/CASSANDRA-7833 Project: Cassandra Issue Type: Bug Reporter: Sylvain Lebresne Assignee: Sylvain Lebresne Priority: Minor Fix For: 2.0.11 Attachments: 7833.txt The collection types will complain if a value has less values than advertised, or if some of those values don't validate, but it does check that there is no remaining bytes after the collection. One consequence is that if you prepare {{INSERT INTO t(k, s) VALUES (0, ?)}} where {{s}} is a set, and you pass a map value (with the same type for keys and values than the set), then no error will be issued. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benedict updated CASSANDRA-7945: Attachment: 7945v2.txt Thanks. Fixed (v2). Will commit after you +1 new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress Fix For: 2.1.1 Attachments: 7945.txt, 7945v2.txt {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-7944. - Resolution: Not a Problem Fix Version/s: (was: 2.1.1) Assignee: (was: Mikhail Stepura) cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Priority: Minor 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7450) Make repair -pr work within a datacenter
[ https://issues.apache.org/jira/browse/CASSANDRA-7450?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita updated CASSANDRA-7450: -- Attachment: 7450-2.1-v3.txt Thanks, [~pauloricardomg]! I attached V3 version which is based on your work. There are some places that are checking presence of bothe -pr and -local, so I modified check to actually run repair in that case. Plus, some code clean up. Is this looking good? Make repair -pr work within a datacenter Key: CASSANDRA-7450 URL: https://issues.apache.org/jira/browse/CASSANDRA-7450 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Paulo Motta Labels: bootcamp, repair Fix For: 2.1.1 Attachments: 2.1-CASSANDRA-7450-v1.txt, 2.1-CASSANDRA-7450-v2.txt, 7450-2.1-v3.txt As was noticed in CASSANDRA-7317, using '-pr' alongside '-local' for repair doesn't really work properly, and disabling the combination was definitively the right short time fix. However, the main goal of '-pr' is to make it easy to repair a full cluster without doing any duplication of work. Doing the same only within a data-center is obviously desirable. I think a reasonably simple solution would be modify the behavior of '-pr' when it's limited to only one DC. If applied to nodeX in dcY, instead of repairing only the primary range of nodeX for the whole ring, we'll repair that range but also all ranges that are primary for a node not in dcY and for which nodeX is the first node of dcY found in ring order. Basically we'll ensure that running 'repair -local -pr' on every nodes of a given DC will repair all ranges for the nodes of that DC without repairing the same range twice. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7523) add date and time types
[ https://issues.apache.org/jira/browse/CASSANDRA-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135807#comment-14135807 ] Benedict commented on CASSANDRA-7523: - A few quick comments: * You should use TimeUnit.HOURS etc instead of creating static variables and multiplying by them (incl millisPerDay) * Why getMillisAtMidnight()? Doesn't seem to be used, but uses Calendar * It would be nice to make these values byte-order comparable up front, although we can take care of it as part of the later work to be able to transform all bytes to such representations. But it would be preferable to make this one byte-order comparable without conversion, since we have the opportunity. This can be achieved with a simple offset, starting the minimum value at 0, or shifting 0 to MIN_VALUE. i.e. add Integer/Long.MIN_VALUE to any value you would currently generate. * Do we need to support empty values on new types? seems to me we could explicitly forbid them, or would thrift clients still expect to be able to set this to empty? What's to stop is introducing semantics for new types that prevent this, so we can start stamping it out? add date and time types --- Key: CASSANDRA-7523 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523 Project: Cassandra Issue Type: New Feature Components: API Reporter: Jonathan Ellis Assignee: Joshua McKenzie Priority: Minor Fix For: 2.1.1, 3.0 http://www.postgresql.org/docs/9.1/static/datatype-datetime.html (we already have timestamp; interval is out of scope for now, and see CASSANDRA-6350 for discussion on timestamp-with-time-zone. but date/time should be pretty easy to add.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Reopened] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams reopened CASSANDRA-7944: - cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Priority: Minor 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-7944) cqlsh describe keyspace omits frozen keyword from CQL statements
[ https://issues.apache.org/jira/browse/CASSANDRA-7944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams resolved CASSANDRA-7944. - Resolution: Duplicate cqlsh describe keyspace omits frozen keyword from CQL statements Key: CASSANDRA-7944 URL: https://issues.apache.org/jira/browse/CASSANDRA-7944 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Jim Bisso Priority: Minor 1. create a schema. 2. create a UDT or tuple 3. in cqlsh describe keyspace foo should list CQL statements with frozen keyword intact. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robbie Strickland updated CASSANDRA-7930: - Attachment: cassandra-2.0-v6.txt Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135844#comment-14135844 ] Aleksey Yeschenko commented on CASSANDRA-7930: -- This seems to (intentionally?) duplicate a lot of CASSANDRA-7719. So Before committing any of this, I want us to address the issues in my previous comment there - https://issues.apache.org/jira/browse/CASSANDRA-7719?focusedCommentId=14132561page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14132561 Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
git commit: Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 169ec3db8 - 19c6cc198 Metrics for prepared stmt usage and eviction Patch by Robbie Strickland; review by Tyler Hobbs for CASSANDRA-7930 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/19c6cc19 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/19c6cc19 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/19c6cc19 Branch: refs/heads/cassandra-2.0 Commit: 19c6cc1982d2146a99ccaf6dccc087fe88d5785f Parents: 169ec3d Author: Robbie Strickland rostrickl...@gmail.com Authored: Tue Sep 16 13:07:52 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:07:52 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 47 - .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 101 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 3ee938a..cf7112c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index a59fe9b..ee188a3 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,11 +19,14 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; +import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -32,8 +35,10 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; +import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; +import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -73,6 +78,9 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; +public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); +private static AtomicLong evictionCount = new AtomicLong(0); + static { if (MemoryMeter.isInitialized()) @@ -80,11 +88,29 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .build(); + .listener(new EvictionListenerMD5Digest, CQLStatement() + { + @Override + public void onEviction(MD5Digest md5Digest, CQLStatement prepared) + { + metrics.activePreparedStatements.dec(); + metrics.evictedPreparedStatements.inc(); + evictionCount.incrementAndGet(); + } + }).build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement()
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135855#comment-14135855 ] Robbie Strickland commented on CASSANDRA-7930: -- I simply backported the metrics class to 2.0 so I could add the cache-related stuff, so I'm happy to change as long as it's consistent with whatever you ultimately decide for 2.1. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7450) Make repair -pr work within a datacenter
[ https://issues.apache.org/jira/browse/CASSANDRA-7450?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135876#comment-14135876 ] Paulo Motta commented on CASSANDRA-7450: LGTM, thanks! Make repair -pr work within a datacenter Key: CASSANDRA-7450 URL: https://issues.apache.org/jira/browse/CASSANDRA-7450 Project: Cassandra Issue Type: Improvement Reporter: Sylvain Lebresne Assignee: Paulo Motta Labels: bootcamp, repair Fix For: 2.1.1 Attachments: 2.1-CASSANDRA-7450-v1.txt, 2.1-CASSANDRA-7450-v2.txt, 7450-2.1-v3.txt As was noticed in CASSANDRA-7317, using '-pr' alongside '-local' for repair doesn't really work properly, and disabling the combination was definitively the right short time fix. However, the main goal of '-pr' is to make it easy to repair a full cluster without doing any duplication of work. Doing the same only within a data-center is obviously desirable. I think a reasonably simple solution would be modify the behavior of '-pr' when it's limited to only one DC. If applied to nodeX in dcY, instead of repairing only the primary range of nodeX for the whole ring, we'll repair that range but also all ranges that are primary for a node not in dcY and for which nodeX is the first node of dcY found in ring order. Basically we'll ensure that running 'repair -local -pr' on every nodes of a given DC will repair all ranges for the nodes of that DC without repairing the same range twice. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[1/2] git commit: Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 e25d94e6e - 681c380b5 Metrics for prepared stmt usage and eviction Patch by Robbie Strickland; review by Tyler Hobbs for CASSANDRA-7930 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/19c6cc19 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/19c6cc19 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/19c6cc19 Branch: refs/heads/cassandra-2.1 Commit: 19c6cc1982d2146a99ccaf6dccc087fe88d5785f Parents: 169ec3d Author: Robbie Strickland rostrickl...@gmail.com Authored: Tue Sep 16 13:07:52 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:07:52 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 47 - .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 101 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 3ee938a..cf7112c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index a59fe9b..ee188a3 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,11 +19,14 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; +import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -32,8 +35,10 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; +import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; +import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -73,6 +78,9 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; +public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); +private static AtomicLong evictionCount = new AtomicLong(0); + static { if (MemoryMeter.isInitialized()) @@ -80,11 +88,29 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .build(); + .listener(new EvictionListenerMD5Digest, CQLStatement() + { + @Override + public void onEviction(MD5Digest md5Digest, CQLStatement prepared) + { + metrics.activePreparedStatements.dec(); + metrics.evictedPreparedStatements.inc(); + evictionCount.incrementAndGet(); + } + }).build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement()
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/QueryProcessor.java src/java/org/apache/cassandra/metrics/CqlStatementMetrics.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/681c380b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/681c380b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/681c380b Branch: refs/heads/cassandra-2.1 Commit: 681c380b5a9d0f57b85523a9c23c02e71417c799 Parents: e25d94e 19c6cc1 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:21:36 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:21:36 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 53 +--- .../cassandra/metrics/CqlStatementMetrics.java | 1 + 3 files changed, 36 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/681c380b/CHANGES.txt -- diff --cc CHANGES.txt index f89cc6d,cf7112c..0abc66a --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,92 -1,10 +1,93 @@@ -2.0.11: +2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) - * Explicitly disallowing mixing multi-column and single-column + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing
[jira] [Updated] (CASSANDRA-7939) checkForEndpointCollision should ignore joining nodes
[ https://issues.apache.org/jira/browse/CASSANDRA-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-7939: Attachment: 7939.txt A simple enough fix for 2.0. Unfortunately for 2.1, bypassing this problem causes a new one for CASSANDRA-7069, since we can begin bootstrapping before we've seen the entire ring. I think we'll have to check STATUS for each node in cFEC and bail if we see JOINING or LEAVING, since tMD won't be populated from the shadow round. checkForEndpointCollision should ignore joining nodes - Key: CASSANDRA-7939 URL: https://issues.apache.org/jira/browse/CASSANDRA-7939 Project: Cassandra Issue Type: Bug Components: Core Reporter: Brandon Williams Assignee: Brandon Williams Priority: Minor Fix For: 2.0.11, 2.1.1 Attachments: 7939.txt If you fail a bootstrap, then immediately retry it, cFEC erroneously tells you to replace it: {noformat} ERROR 00:04:50 Exception encountered during startup java.lang.RuntimeException: A node with address bw-3/10.208.8.63 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node. at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:453) ~[main/:na] at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:666) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:614) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:507) ~[main/:na] at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:338) [main/:na] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:457) [main/:na] at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:546) [main/:na] {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[1/3] git commit: Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/trunk 38d5178a3 - 196e5146d Metrics for prepared stmt usage and eviction Patch by Robbie Strickland; review by Tyler Hobbs for CASSANDRA-7930 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/19c6cc19 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/19c6cc19 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/19c6cc19 Branch: refs/heads/trunk Commit: 19c6cc1982d2146a99ccaf6dccc087fe88d5785f Parents: 169ec3d Author: Robbie Strickland rostrickl...@gmail.com Authored: Tue Sep 16 13:07:52 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:07:52 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 47 - .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 101 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 3ee938a..cf7112c 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.0.11: + * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/19c6cc19/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index a59fe9b..ee188a3 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,11 +19,14 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; +import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -32,8 +35,10 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; +import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; +import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -73,6 +78,9 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; +public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); +private static AtomicLong evictionCount = new AtomicLong(0); + static { if (MemoryMeter.isInitialized()) @@ -80,11 +88,29 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .build(); + .listener(new EvictionListenerMD5Digest, CQLStatement() + { + @Override + public void onEviction(MD5Digest md5Digest, CQLStatement prepared) + { + metrics.activePreparedStatements.dec(); + metrics.evictedPreparedStatements.inc(); + evictionCount.incrementAndGet(); + } + }).build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY)
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/QueryProcessor.java src/java/org/apache/cassandra/metrics/CqlStatementMetrics.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/681c380b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/681c380b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/681c380b Branch: refs/heads/trunk Commit: 681c380b5a9d0f57b85523a9c23c02e71417c799 Parents: e25d94e 19c6cc1 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:21:36 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:21:36 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 53 +--- .../cassandra/metrics/CqlStatementMetrics.java | 1 + 3 files changed, 36 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/681c380b/CHANGES.txt -- diff --cc CHANGES.txt index f89cc6d,cf7112c..0abc66a --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,92 -1,10 +1,93 @@@ -2.0.11: +2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: + * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) - * Explicitly disallowing mixing multi-column and single-column + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/196e5146 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/196e5146 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/196e5146 Branch: refs/heads/trunk Commit: 196e5146d300986760fee83bc4fdcfb18e35bb5e Parents: 38d5178 681c380 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:22:50 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:22:50 2014 -0500 -- CHANGES.txt | 1 + .../apache/cassandra/cql3/QueryProcessor.java | 53 +--- .../cassandra/metrics/CqlStatementMetrics.java | 1 + 3 files changed, 36 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/196e5146/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/196e5146/src/java/org/apache/cassandra/cql3/QueryProcessor.java --
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135895#comment-14135895 ] Tyler Hobbs commented on CASSANDRA-7930: [~iamaleksey] Hmm, I committed this before I saw your request. Perhaps we should make a new ticket to change what you want in 2.0 and 2.1? Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Reopened] (CASSANDRA-7719) Add PreparedStatements related metrics
[ https://issues.apache.org/jira/browse/CASSANDRA-7719?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko reopened CASSANDRA-7719: -- Reopening, because of stuff like CASSANDRA-7930, and CASSANDRA-7921 depending on it. Add PreparedStatements related metrics -- Key: CASSANDRA-7719 URL: https://issues.apache.org/jira/browse/CASSANDRA-7719 Project: Cassandra Issue Type: New Feature Reporter: Michaël Figuière Assignee: T Jake Luciani Priority: Minor Fix For: 2.1.1 Attachments: 7719.txt Cassandra newcomers often don't understand that they're expected to use PreparedStatements for almost all of their repetitive queries executed in production. It doesn't look like Cassandra currently expose any PreparedStatements related metrics.It would be interesting, and I believe fairly simple, to add several of them to make it possible, in development / management / monitoring tools, to show warnings or alerts related to this bad practice. Thus I would suggest to add the following metrics: * Executed prepared statements count * Executed unprepared statements count * Amount of PreparedStatements that have been registered on the node -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135906#comment-14135906 ] Aleksey Yeschenko commented on CASSANDRA-7930: -- [~thobbs] CASSANDRA-7719 is 2.1.1, so not released yet. I've reopened it instead. This here, I'd just revert it for now. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7945) new cassanrda-stress does not work with NetworkTopologyStrategy
[ https://issues.apache.org/jira/browse/CASSANDRA-7945?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135907#comment-14135907 ] Yuki Morishita commented on CASSANDRA-7945: --- +1 new cassanrda-stress does not work with NetworkTopologyStrategy --- Key: CASSANDRA-7945 URL: https://issues.apache.org/jira/browse/CASSANDRA-7945 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Yuki Morishita Assignee: Benedict Priority: Trivial Labels: stress Fix For: 2.1.1 Attachments: 7945.txt, 7945v2.txt {code} $ cassandra-stress write -schema 'replication(strategy=NetworkTopologyStrategy,DC1=2,DC2=1)' {code} prints error: {code} Unable to create stress keyspace: Error constructing replication strategy class {code} Looks like it is caused by passing 'replication_factor' to NTS, which is illegal option for NTS. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-7946) NPE when streaming data to a joining node and dropping table in cluster
DOAN DuyHai created CASSANDRA-7946: -- Summary: NPE when streaming data to a joining node and dropping table in cluster Key: CASSANDRA-7946 URL: https://issues.apache.org/jira/browse/CASSANDRA-7946 Project: Cassandra Issue Type: Bug Components: Core Environment: Cassandra 2.0.9 Reporter: DOAN DuyHai Summary The cluster has 3 nodes with Vnodes. We were adding a 4th one (in auto bootstrap mode). The 4 node has stream sessions, receiving data from the others. While the streaming was going on (it takes quite a while because there are 200Gb of data of worth), an existing table is dropped in the cluster and a new one is created. A few time after, we caught an NPE in the log file of the joining node (still not finished joining): The NPE is located here: https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L63 It can be a race condition where schema agreement has not reached the joining node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7523) add date and time types
[ https://issues.apache.org/jira/browse/CASSANDRA-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135921#comment-14135921 ] Joshua McKenzie commented on CASSANDRA-7523: Pushed an updated branch. {quote}You should use TimeUnit.HOURS etc instead of creating static variables and multiplying by them (incl millisPerDay){quote} Updated to use TimeUnit enum. Much cleaner abstraction - thanks for pointing that out. {quote}Why getMillisAtMidnight()? Doesn't seem to be used, but uses Calendar{quote} calendar threadlocal and that method were vestigial from some other interim work and I overlooked that while reviewing - I've removed it. {quote}It would be nice to make these values byte-order comparable up front, although we can take care of it as part of the later work to be able to transform all bytes to such representations.{quote} Since the discussion is still ongoing and we don't know what form things are going to stabilize in, I'd prefer to keep the complexity of dealing with / preparing for a constraint of byte-order comparability in a separate effort. This also helps keep the code-base consistent as we won't have some types that are refactored to support different storage constraints, some that aren't. {quote}Do we need to support empty values on new types? seems to me we could explicitly forbid them, or would thrift clients still expect to be able to set this to empty? What's to stop is introducing semantics for new types that prevent this, so we can start stamping it out?{quote} Good question. I went with an implementation that was consistent with the rest of the code-base but can see the argument either way. add date and time types --- Key: CASSANDRA-7523 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523 Project: Cassandra Issue Type: New Feature Components: API Reporter: Jonathan Ellis Assignee: Joshua McKenzie Priority: Minor Fix For: 2.1.1, 3.0 http://www.postgresql.org/docs/9.1/static/datatype-datetime.html (we already have timestamp; interval is out of scope for now, and see CASSANDRA-6350 for discussion on timestamp-with-time-zone. but date/time should be pretty easy to add.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-7946) NPE when streaming data to a joining node and dropping table in cluster
[ https://issues.apache.org/jira/browse/CASSANDRA-7946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Yuki Morishita reassigned CASSANDRA-7946: - Assignee: Yuki Morishita NPE when streaming data to a joining node and dropping table in cluster --- Key: CASSANDRA-7946 URL: https://issues.apache.org/jira/browse/CASSANDRA-7946 Project: Cassandra Issue Type: Bug Components: Core Environment: Cassandra 2.0.9 Reporter: DOAN DuyHai Assignee: Yuki Morishita Summary The cluster has 3 nodes with Vnodes. We were adding a 4th one (in auto bootstrap mode). The 4 node has stream sessions, receiving data from the others. While the streaming was going on (it takes quite a while because there are 200Gb of data of worth), an existing table is dropped in the cluster and a new one is created. A few time after, we caught an NPE in the log file of the joining node (still not finished joining): The NPE is located here: https://github.com/apache/cassandra/blob/cassandra-2.0/src/java/org/apache/cassandra/streaming/compress/CompressedStreamReader.java#L63 It can be a race condition where schema agreement has not reached the joining node. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
git commit: Revert Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/cassandra-2.0 19c6cc198 - f19b4cb80 Revert Metrics for prepared stmt usage and eviction This reverts commit 19c6cc1982d2146a99ccaf6dccc087fe88d5785f. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f19b4cb8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f19b4cb8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f19b4cb8 Branch: refs/heads/cassandra-2.0 Commit: f19b4cb807d30cc7fdb1869c407ee9a5e9e3acce Parents: 19c6cc1 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:58:56 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:58:56 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 47 + .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 3 insertions(+), 101 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cf7112c..3ee938a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,4 @@ 2.0.11: - * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index ee188a3..a59fe9b 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,14 +19,11 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; -import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -35,10 +32,8 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; -import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; -import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -78,9 +73,6 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; -public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); -private static AtomicLong evictionCount = new AtomicLong(0); - static { if (MemoryMeter.isInitialized()) @@ -88,29 +80,11 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .listener(new EvictionListenerMD5Digest, CQLStatement() - { - @Override - public void onEviction(MD5Digest md5Digest, CQLStatement prepared) - { - metrics.activePreparedStatements.dec(); - metrics.evictedPreparedStatements.inc(); - evictionCount.incrementAndGet(); - } - }).build(); + .build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement()
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135981#comment-14135981 ] Aleksey Yeschenko commented on CASSANDRA-7930: -- Okay, now I'm officially confused. EvictedPreparedStatements metric is part of the CASSANDRA-7921 patch, that hasn't been committed yet, but is one day older than this one. How are we backporting something that's not committed yet. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135992#comment-14135992 ] Robbie Strickland commented on CASSANDRA-7930: -- Wow, you're right. This looks like a duplicate of that ticket, just implemented slightly differently. I brought up the issue at boot camp, and it looks like Nate and I both worked on it simultaneously... Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[2/2] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/QueryProcessor.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b319b406 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b319b406 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b319b406 Branch: refs/heads/cassandra-2.1 Commit: b319b406b9ff69fb64e696627f65b443431d1d64 Parents: 681c380 f19b4cb Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 14:09:45 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 14:09:45 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 53 +++- .../cassandra/metrics/CqlStatementMetrics.java | 1 - 3 files changed, 19 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b319b406/CHANGES.txt -- diff --cc CHANGES.txt index 0abc66a,3ee938a..f89cc6d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,93 -1,9 +1,92 @@@ -2.0.11: +2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: - * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) - * Explicitly disallowing mixing multi-column and single-column + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add
[1/2] git commit: Revert Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 681c380b5 - b319b406b Revert Metrics for prepared stmt usage and eviction This reverts commit 19c6cc1982d2146a99ccaf6dccc087fe88d5785f. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f19b4cb8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f19b4cb8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f19b4cb8 Branch: refs/heads/cassandra-2.1 Commit: f19b4cb807d30cc7fdb1869c407ee9a5e9e3acce Parents: 19c6cc1 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:58:56 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:58:56 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 47 + .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 3 insertions(+), 101 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cf7112c..3ee938a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,4 @@ 2.0.11: - * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index ee188a3..a59fe9b 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,14 +19,11 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; -import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -35,10 +32,8 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; -import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; -import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -78,9 +73,6 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; -public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); -private static AtomicLong evictionCount = new AtomicLong(0); - static { if (MemoryMeter.isInitialized()) @@ -88,29 +80,11 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .listener(new EvictionListenerMD5Digest, CQLStatement() - { - @Override - public void onEviction(MD5Digest md5Digest, CQLStatement prepared) - { - metrics.activePreparedStatements.dec(); - metrics.evictedPreparedStatements.inc(); - evictionCount.incrementAndGet(); - } - }).build(); + .build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement()
[2/3] git commit: Merge branch 'cassandra-2.0' into cassandra-2.1
Merge branch 'cassandra-2.0' into cassandra-2.1 Conflicts: CHANGES.txt src/java/org/apache/cassandra/cql3/QueryProcessor.java Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b319b406 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b319b406 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b319b406 Branch: refs/heads/trunk Commit: b319b406b9ff69fb64e696627f65b443431d1d64 Parents: 681c380 f19b4cb Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 14:09:45 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 14:09:45 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 53 +++- .../cassandra/metrics/CqlStatementMetrics.java | 1 - 3 files changed, 19 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b319b406/CHANGES.txt -- diff --cc CHANGES.txt index 0abc66a,3ee938a..f89cc6d --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,93 -1,9 +1,92 @@@ -2.0.11: +2.1.1 + * Fix saving caches when a table is dropped (CASSANDRA-7784) + * Add better error checking of new stress profile (CASSANDRA-7716) + * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) + * Prevent operator mistakes due to simultaneous bootstrap (CASSANDRA-7069) + * cassandra-stress supports whitelist mode for node config (CASSANDRA-7658) + * GCInspector more closely tracks GC; cassandra-stress and nodetool report it (CASSANDRA-7916) + * nodetool won't output bogus ownership info without a keyspace (CASSANDRA-7173) + * Add human readable option to nodetool commands (CASSANDRA-5433) + * Don't try to set repairedAt on old sstables (CASSANDRA-7913) + * Add metrics for tracking PreparedStatement use (CASSANDRA-7719) + * (cqlsh) tab-completion for triggers (CASSANDRA-7824) + * (cqlsh) Support for query paging (CASSANDRA-7514) + * (cqlsh) Show progress of COPY operations (CASSANDRA-7789) + * Add syntax to remove multiple elements from a map (CASSANDRA-6599) + * Support non-equals conditions in lightweight transactions (CASSANDRA-6839) + * Add IF [NOT] EXISTS to create/drop triggers (CASSANDRA-7606) + * (cqlsh) Display the current logged-in user (CASSANDRA-7785) + * (cqlsh) Don't ignore CTRL-C during COPY FROM execution (CASSANDRA-7815) + * (cqlsh) Order UDTs according to cross-type dependencies in DESCRIBE + output (CASSANDRA-7659) + * (cqlsh) Fix handling of CAS statement results (CASSANDRA-7671) + * (cqlsh) COPY TO/FROM improvements (CASSANDRA-7405) + * Support list index operations with conditions (CASSANDRA-7499) + * Add max live/tombstoned cells to nodetool cfstats output (CASSANDRA-7731) + * Validate IPv6 wildcard addresses properly (CASSANDRA-7680) + * (cqlsh) Error when tracing query (CASSANDRA-7613) + * Avoid IOOBE when building SyntaxError message snippet (CASSANDRA-7569) + * SSTableExport uses correct validator to create string representation of partition + keys (CASSANDRA-7498) + * Avoid NPEs when receiving type changes for an unknown keyspace (CASSANDRA-7689) + * Add support for custom 2i validation (CASSANDRA-7575) + * Pig support for hadoop CqlInputFormat (CASSANDRA-6454) + * Add listen_interface and rpc_interface options (CASSANDRA-7417) + * Improve schema merge performance (CASSANDRA-7444) + * Adjust MT depth based on # of partition validating (CASSANDRA-5263) + * Optimise NativeCell comparisons (CASSANDRA-6755) + * Configurable client timeout for cqlsh (CASSANDRA-7516) + * Include snippet of CQL query near syntax error in messages (CASSANDRA-7111) +Merged from 2.0: - * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) - * Explicitly disallowing mixing multi-column and single-column + * Explicitly disallow mixing multi-column and single-column relations on clustering columns (CASSANDRA-7711) * Better error message when condition is set on PK column (CASSANDRA-7804) + * Don't send schema change responses and events for no-op DDL + statements (CASSANDRA-7600) + * (Hadoop) fix cluster initialisation for a split fetching (CASSANDRA-7774) + * Throw InvalidRequestException when queries contain relations on entire + collection columns (CASSANDRA-7506) + * (cqlsh) enable CTRL-R history search with libedit (CASSANDRA-7577) + * (Hadoop) allow ACFRW to limit nodes to local DC (CASSANDRA-7252) + * (cqlsh) cqlsh should automatically disable tracing when selecting + from system_traces (CASSANDRA-7641) + * (Hadoop) Add
[1/3] git commit: Revert Metrics for prepared stmt usage and eviction
Repository: cassandra Updated Branches: refs/heads/trunk 196e5146d - 61a27af49 Revert Metrics for prepared stmt usage and eviction This reverts commit 19c6cc1982d2146a99ccaf6dccc087fe88d5785f. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/f19b4cb8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/f19b4cb8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/f19b4cb8 Branch: refs/heads/trunk Commit: f19b4cb807d30cc7fdb1869c407ee9a5e9e3acce Parents: 19c6cc1 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 13:58:56 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 13:58:56 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 47 + .../cassandra/metrics/CqlStatementMetrics.java | 54 .../apache/cassandra/service/ClientState.java | 2 +- 4 files changed, 3 insertions(+), 101 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index cf7112c..3ee938a 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,4 @@ 2.0.11: - * Add metrics for prepared statement usage and eviction (CASSANDRA-7930) * Make CQLSSTableWriter sync within partitions (CASSANDRA-7360) * Potentially use non-local replicas in CqlConfigHelper (CASSANDRA-7906) * Explicitly disallowing mixing multi-column and single-column http://git-wip-us.apache.org/repos/asf/cassandra/blob/f19b4cb8/src/java/org/apache/cassandra/cql3/QueryProcessor.java -- diff --git a/src/java/org/apache/cassandra/cql3/QueryProcessor.java b/src/java/org/apache/cassandra/cql3/QueryProcessor.java index ee188a3..a59fe9b 100644 --- a/src/java/org/apache/cassandra/cql3/QueryProcessor.java +++ b/src/java/org/apache/cassandra/cql3/QueryProcessor.java @@ -19,14 +19,11 @@ package org.apache.cassandra.cql3; import java.nio.ByteBuffer; import java.util.*; -import java.util.concurrent.TimeUnit; -import java.util.concurrent.atomic.AtomicLong; import com.google.common.primitives.Ints; import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; import com.googlecode.concurrentlinkedhashmap.EntryWeigher; -import com.googlecode.concurrentlinkedhashmap.EvictionListener; import org.antlr.runtime.*; import org.github.jamm.MemoryMeter; import org.slf4j.Logger; @@ -35,10 +32,8 @@ import org.slf4j.LoggerFactory; import org.apache.cassandra.cql3.statements.*; import org.apache.cassandra.db.*; import org.apache.cassandra.exceptions.*; -import org.apache.cassandra.metrics.CqlStatementMetrics; import org.apache.cassandra.service.ClientState; import org.apache.cassandra.service.QueryState; -import org.apache.cassandra.service.StorageService; import org.apache.cassandra.thrift.ThriftClientState; import org.apache.cassandra.tracing.Tracing; import org.apache.cassandra.transport.messages.ResultMessage; @@ -78,9 +73,6 @@ public class QueryProcessor implements QueryHandler private static final ConcurrentLinkedHashMapMD5Digest, CQLStatement preparedStatements; private static final ConcurrentLinkedHashMapInteger, CQLStatement thriftPreparedStatements; -public static final CqlStatementMetrics metrics = new CqlStatementMetrics(); -private static AtomicLong evictionCount = new AtomicLong(0); - static { if (MemoryMeter.isInitialized()) @@ -88,29 +80,11 @@ public class QueryProcessor implements QueryHandler preparedStatements = new ConcurrentLinkedHashMap.BuilderMD5Digest, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY) .weigher(cqlMemoryUsageWeigher) - .listener(new EvictionListenerMD5Digest, CQLStatement() - { - @Override - public void onEviction(MD5Digest md5Digest, CQLStatement prepared) - { - metrics.activePreparedStatements.dec(); - metrics.evictedPreparedStatements.inc(); - evictionCount.incrementAndGet(); - } - }).build(); + .build(); thriftPreparedStatements = new ConcurrentLinkedHashMap.BuilderInteger, CQLStatement() .maximumWeightedCapacity(MAX_CACHE_PREPARED_MEMORY)
[3/3] git commit: Merge branch 'cassandra-2.1' into trunk
Merge branch 'cassandra-2.1' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/61a27af4 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/61a27af4 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/61a27af4 Branch: refs/heads/trunk Commit: 61a27af490a2ba6111baecaf5b12fd2ede3f64de Parents: 196e514 b319b40 Author: Tyler Hobbs ty...@datastax.com Authored: Tue Sep 16 14:10:25 2014 -0500 Committer: Tyler Hobbs ty...@datastax.com Committed: Tue Sep 16 14:10:25 2014 -0500 -- CHANGES.txt | 1 - .../apache/cassandra/cql3/QueryProcessor.java | 53 +++- .../cassandra/metrics/CqlStatementMetrics.java | 1 - 3 files changed, 19 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/61a27af4/CHANGES.txt -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/61a27af4/src/java/org/apache/cassandra/cql3/QueryProcessor.java --
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14135998#comment-14135998 ] Tyler Hobbs commented on CASSANDRA-7930: Okay, I reverted the patch for now. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136006#comment-14136006 ] Aleksey Yeschenko commented on CASSANDRA-7930: -- [~rstrickland] Not entirely. We should still take the logging part from yours. I'll ask for another patch from you for that, once I deal with the rest of the related stuff, if you don't mind doing it. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7939) checkForEndpointCollision should ignore joining nodes
[ https://issues.apache.org/jira/browse/CASSANDRA-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-7939: Attachment: 7939-2.1.txt Patch to check states after the shadow round. This increases the window where CASSANDRA-7069 can miss slightly, since if the nodes are started very close together it's possible one will gossip with the seed before setting its STATUS, but this was always possible so this is our best effort. checkForEndpointCollision should ignore joining nodes - Key: CASSANDRA-7939 URL: https://issues.apache.org/jira/browse/CASSANDRA-7939 Project: Cassandra Issue Type: Bug Components: Core Reporter: Brandon Williams Assignee: Brandon Williams Priority: Minor Fix For: 2.0.11, 2.1.1 Attachments: 7939-2.1.txt, 7939.txt If you fail a bootstrap, then immediately retry it, cFEC erroneously tells you to replace it: {noformat} ERROR 00:04:50 Exception encountered during startup java.lang.RuntimeException: A node with address bw-3/10.208.8.63 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node. at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:453) ~[main/:na] at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:666) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:614) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:507) ~[main/:na] at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:338) [main/:na] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:457) [main/:na] at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:546) [main/:na] {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7930) Warn when evicting prepared statements from cache
[ https://issues.apache.org/jira/browse/CASSANDRA-7930?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136023#comment-14136023 ] Robbie Strickland commented on CASSANDRA-7930: -- Sure, I'll wait until you get things sorted out. Warn when evicting prepared statements from cache - Key: CASSANDRA-7930 URL: https://issues.apache.org/jira/browse/CASSANDRA-7930 Project: Cassandra Issue Type: Improvement Components: Core Reporter: Robbie Strickland Assignee: Robbie Strickland Labels: bootcamp, jmx Attachments: cassandra-2.0-v2.txt, cassandra-2.0-v3.txt, cassandra-2.0-v4.txt, cassandra-2.0-v5.txt, cassandra-2.0-v6.txt, cassandra-2.0.txt, cassandra-2.1.txt The prepared statement cache is an LRU, with a max size of maxMemory / 256. There is currently no warning when statements are evicted, which could be problematic if the user is unaware that this is happening. At the very least, we should provide a JMX metric and possibly a log message indicating this is happening. At some point it may also be worthwhile to make this tunable for users with large numbers of statements. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7939) checkForEndpointCollision should ignore joining nodes
[ https://issues.apache.org/jira/browse/CASSANDRA-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136025#comment-14136025 ] Brandon Williams commented on CASSANDRA-7939: - On second thought, there's probably no need to remove the original check for 2.1; we can just double up for better protection. checkForEndpointCollision should ignore joining nodes - Key: CASSANDRA-7939 URL: https://issues.apache.org/jira/browse/CASSANDRA-7939 Project: Cassandra Issue Type: Bug Components: Core Reporter: Brandon Williams Assignee: Brandon Williams Priority: Minor Fix For: 2.0.11, 2.1.1 Attachments: 7939-2.1.txt, 7939.txt If you fail a bootstrap, then immediately retry it, cFEC erroneously tells you to replace it: {noformat} ERROR 00:04:50 Exception encountered during startup java.lang.RuntimeException: A node with address bw-3/10.208.8.63 already exists, cancelling join. Use cassandra.replace_address if you want to replace this node. at org.apache.cassandra.service.StorageService.checkForEndpointCollision(StorageService.java:453) ~[main/:na] at org.apache.cassandra.service.StorageService.prepareToJoin(StorageService.java:666) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:614) ~[main/:na] at org.apache.cassandra.service.StorageService.initServer(StorageService.java:507) ~[main/:na] at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:338) [main/:na] at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:457) [main/:na] at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:546) [main/:na] {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-7940) Gossip only node removal can race with FD.convict
[ https://issues.apache.org/jira/browse/CASSANDRA-7940?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brandon Williams updated CASSANDRA-7940: Attachment: 7940.txt Simple check to ignore conviction if we don't have the state. Gossip only node removal can race with FD.convict - Key: CASSANDRA-7940 URL: https://issues.apache.org/jira/browse/CASSANDRA-7940 Project: Cassandra Issue Type: Bug Components: Core Reporter: Brandon Williams Assignee: Brandon Williams Priority: Minor Fix For: 2.0.11, 2.1.1 Attachments: 7940.txt {noformat} INFO 00:04:48 FatClient /10.208.8.63 has been silent for 3ms, removing from gossip INFO 00:04:49 Handshaking version with /10.208.8.63 ERROR 00:04:53 Exception in thread Thread[GossipStage:1,5,main] java.lang.NullPointerException: null at org.apache.cassandra.gms.Gossiper.convict(Gossiper.java:301) ~[main/:na] at org.apache.cassandra.gms.FailureDetector.forceConviction(FailureDetector.java:251) ~[main/:na] at org.apache.cassandra.gms.GossipShutdownVerbHandler.doVerb(GossipShutdownVerbHandler.java:37) ~[main/:na] at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:62) ~[main/:na] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_60] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_60] at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_60] {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7523) add date and time types
[ https://issues.apache.org/jira/browse/CASSANDRA-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136054#comment-14136054 ] Benedict commented on CASSANDRA-7523: - bq. I'd prefer to keep the complexity of dealing with / preparing for a constraint of byte-order comparability Well, it's already a beneficial characteristic, as it results in faster comparator operation in 2.1, so it's not about preparation for a future constraint. It also doesn't in any way change how you serialize, it only requires that you change your base value calculation, which is completely arbitrary (you've picked zero; if you pick MIN_VALUE and use ByteBufferUtil.compare() instead of LongType.compare(), everything suddenly works). You can still delegate serialization to the primitive types, so this isn't really any added complexity, it's just making things better off the bat for zero extra cost. As icing on top it avoids needing to do any future conversion to deliver byte order comparisons (which is an unnecessary cost). TL;DR: we shouldn't be perpetuating prior mistakes in new code when we can avoid them for free. add date and time types --- Key: CASSANDRA-7523 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523 Project: Cassandra Issue Type: New Feature Components: API Reporter: Jonathan Ellis Assignee: Joshua McKenzie Priority: Minor Fix For: 2.1.1, 3.0 http://www.postgresql.org/docs/9.1/static/datatype-datetime.html (we already have timestamp; interval is out of scope for now, and see CASSANDRA-6350 for discussion on timestamp-with-time-zone. but date/time should be pretty easy to add.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-7523) add date and time types
[ https://issues.apache.org/jira/browse/CASSANDRA-7523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14136070#comment-14136070 ] Benedict commented on CASSANDRA-7523: - bq. Do we need to support empty values on new types? seems to me we could explicitly forbid them, or would thrift clients still expect to be able to set this to empty? What's to stop is introducing semantics for new types that prevent this, so we can start stamping it out? bq. Good question. I went with an implementation that was consistent with the rest of the code-base but can see the argument either way. [~slebresne] [~iamaleksey] any thoughts on this? add date and time types --- Key: CASSANDRA-7523 URL: https://issues.apache.org/jira/browse/CASSANDRA-7523 Project: Cassandra Issue Type: New Feature Components: API Reporter: Jonathan Ellis Assignee: Joshua McKenzie Priority: Minor Fix For: 2.1.1, 3.0 http://www.postgresql.org/docs/9.1/static/datatype-datetime.html (we already have timestamp; interval is out of scope for now, and see CASSANDRA-6350 for discussion on timestamp-with-time-zone. but date/time should be pretty easy to add.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[2/3] git commit: cassandra-stress: fix support for NetworkTopologyStrategy
cassandra-stress: fix support for NetworkTopologyStrategy patch by benedict; reviewed by yukim for CASSANDRA-7945 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/109313c3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/109313c3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/109313c3 Branch: refs/heads/trunk Commit: 109313c3ed3f7b2d8a79318e532e5f90a1e26414 Parents: b319b40 Author: Benedict Elliott Smith bened...@apache.org Authored: Tue Sep 16 20:48:29 2014 +0100 Committer: Benedict Elliott Smith bened...@apache.org Committed: Tue Sep 16 20:48:29 2014 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/stress/settings/OptionReplication.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f89cc6d..1764a20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945) * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java -- diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java index 06ec9b8..8b65587 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java @@ -51,7 +51,8 @@ class OptionReplication extends OptionMulti public MapString, String getOptions() { MapString, String options = extraOptions(); -options.put(replication_factor, factor.value()); +if (!options.containsKey(replication_factor) (strategy.value().equals(org.apache.cassandra.locator.SimpleStrategy) || factor.setByUser())) +options.put(replication_factor, factor.value()); return options; }
[1/3] git commit: cassandra-stress: fix support for NetworkTopologyStrategy
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 b319b406b - 109313c3e refs/heads/trunk 61a27af49 - 8215744ff cassandra-stress: fix support for NetworkTopologyStrategy patch by benedict; reviewed by yukim for CASSANDRA-7945 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/109313c3 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/109313c3 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/109313c3 Branch: refs/heads/cassandra-2.1 Commit: 109313c3ed3f7b2d8a79318e532e5f90a1e26414 Parents: b319b40 Author: Benedict Elliott Smith bened...@apache.org Authored: Tue Sep 16 20:48:29 2014 +0100 Committer: Benedict Elliott Smith bened...@apache.org Committed: Tue Sep 16 20:48:29 2014 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/stress/settings/OptionReplication.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index f89cc6d..1764a20 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.1 + * cassandra-stress: fix support for NetworkTopologyStrategy (CASSANDRA-7945) * Fix saving caches when a table is dropped (CASSANDRA-7784) * Add better error checking of new stress profile (CASSANDRA-7716) * Use ThreadLocalRandom and remove FBUtilities.threadLocalRandom (CASSANDRA-7934) http://git-wip-us.apache.org/repos/asf/cassandra/blob/109313c3/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java -- diff --git a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java index 06ec9b8..8b65587 100644 --- a/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java +++ b/tools/stress/src/org/apache/cassandra/stress/settings/OptionReplication.java @@ -51,7 +51,8 @@ class OptionReplication extends OptionMulti public MapString, String getOptions() { MapString, String options = extraOptions(); -options.put(replication_factor, factor.value()); +if (!options.containsKey(replication_factor) (strategy.value().equals(org.apache.cassandra.locator.SimpleStrategy) || factor.setByUser())) +options.put(replication_factor, factor.value()); return options; }