[jira] [Updated] (CASSANDRA-12346) Gossip 2.0 - introduce a Peer Sampling Service for partial cluster views
[ https://issues.apache.org/jira/browse/CASSANDRA-12346?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Jirsa updated CASSANDRA-12346: --- Description: A [Peer Sampling Service|http://infoscience.epfl.ch/record/83409/files/neg--1184036295all.pdf] is a module that provides a partial view of a cluster to dependent modules. A node's partial view, combined with all other nodes' partial views, combine to create a fully-connected mesh over the cluster. This way, a given node does not need to have direct connections to every other node in the cluster, and can be much more efficient in terms of resource management as well as information dissemination. Peer Sampling Services by their nature must be self-healing and self-balancing to maintain the fully-connected mesh. I propose we use an algorithm based on [HyParView|http://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf], which is a concrete algorithm for a Peer Sampling Service. HyParView has a clearly defined protocol, and is reasonably simple to implement. was: A [Peer Sampling Service|infoscience.epfl.ch/record/83409/files/neg--1184036295all.pdf] is a module that provides a partial view of a cluster to dependent modules. A node's partial view, combined with all other nodes' partial views, combine to create a fully-connected mesh over the cluster. This way, a given node does not need to have direct connections to every other node in the cluster, and can be much more efficient in terms of resource management as well as information dissemination. Peer Sampling Services by their nature must be self-healing and self-balancing to maintain the fully-connected mesh. I propose we use an algorithm based on [HyParView (http://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf], which is a concrete algorithm for a Peer Sampling Service. HyParView has a clearly defined protocol, and is reasonably simple to implement. > Gossip 2.0 - introduce a Peer Sampling Service for partial cluster views > > > Key: CASSANDRA-12346 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12346 > Project: Cassandra > Issue Type: Improvement > Components: Core >Reporter: Jason Brown >Assignee: Jason Brown > Labels: gossip > > A [Peer Sampling > Service|http://infoscience.epfl.ch/record/83409/files/neg--1184036295all.pdf] > is a module that provides a partial view of a cluster to dependent modules. A > node's partial view, combined with all other nodes' partial views, combine to > create a fully-connected mesh over the cluster. This way, a given node does > not need to have direct connections to every other node in the cluster, and > can be much more efficient in terms of resource management as well as > information dissemination. Peer Sampling Services by their nature must be > self-healing and self-balancing to maintain the fully-connected mesh. > I propose we use an algorithm based on > [HyParView|http://asc.di.fct.unl.pt/~jleitao/pdf/dsn07-leitao.pdf], which is > a concrete algorithm for a Peer Sampling Service. HyParView has a clearly > defined protocol, and is reasonably simple to implement. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12181) Include table name in "Cannot get comparator" exception
[ https://issues.apache.org/jira/browse/CASSANDRA-12181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-12181: - Resolution: Fixed Status: Resolved (was: Patch Available) +1 Committed as [1823c84b827ff5f38862757db58001105f1d753f|https://github.com/apache/cassandra/commit/1823c84b827ff5f38862757db58001105f1d753f] to [cassandra-3.0|https://github.com/apache/cassandra/tree/cassandra-3.0] and merged to 3.9 and trunk. > Include table name in "Cannot get comparator" exception > --- > > Key: CASSANDRA-12181 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12181 > Project: Cassandra > Issue Type: Improvement >Reporter: sankalp kohli >Assignee: sankalp kohli >Priority: Trivial > Attachments: CASSANDRA-12181-3.0_v2.txt, CASSANDRA-12181_3.0-v3.txt, > CASSANDRA-12181_3.0.txt > > > Having table name will help in debugging the following exception. > ERROR [MutationStage:xx] CassandraDaemon.java (line 199) Exception in thread > Thread[MutationStage:3788,5,main] > clusterName=itms8shared20 > java.lang.RuntimeException: Cannot get comparator 2 in > org.apache.cassandra.db.marshal.CompositeType(org.apache.cassandra.db.marshal.UTF8Type,org.apache.cassandra.db.marshal.UTF8Type). > > This might be due to a mismatch between the schema and the data read -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[6/6] cassandra git commit: Merge branch 'cassandra-3.9' into trunk
Merge branch 'cassandra-3.9' into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/4ad33534 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/4ad33534 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/4ad33534 Branch: refs/heads/trunk Commit: 4ad335348677c2ff3c80cf58bcd21715abbf4a2b Parents: a123e98 5fb6f95 Author: Robert Stupp Authored: Sat Jul 30 11:32:49 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:32:49 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 27 +--- 1 file changed, 18 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/4ad33534/src/java/org/apache/cassandra/db/ColumnFamilyStore.java --
[1/6] cassandra git commit: Include table name in "Cannot get comparator" exception
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 8868b744c -> 1823c84b8 refs/heads/cassandra-3.9 8e775eaaf -> 5fb6f9585 refs/heads/trunk a123e984c -> 4ad335348 Include table name in "Cannot get comparator" exception patch by sankalp kohli; reviewed by Robert Stupp for CASSANDRA-12181 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1823c84b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1823c84b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1823c84b Branch: refs/heads/cassandra-3.0 Commit: 1823c84b827ff5f38862757db58001105f1d753f Parents: 8868b74 Author: sankalp kohli Authored: Sat Jul 30 11:30:01 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:30:01 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 24 ++-- 1 file changed, 17 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1823c84b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 1e52b13..400fd36 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1225,13 +1225,23 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean { long start = System.nanoTime(); Memtable mt = data.getMemtableFor(opGroup, replayPosition); -long timeDelta = mt.put(update, indexer, opGroup); -DecoratedKey key = update.partitionKey(); -maybeUpdateRowCache(key); -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); -metric.writeLatency.addNano(System.nanoTime() - start); -if(timeDelta < Long.MAX_VALUE) -metric.colUpdateTimeDeltaHistogram.update(timeDelta); +try +{ +long timeDelta = mt.put(update, indexer, opGroup); +DecoratedKey key = update.partitionKey(); +maybeUpdateRowCache(key); +metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); +metric.writeLatency.addNano(System.nanoTime() - start); +if(timeDelta < Long.MAX_VALUE) +metric.colUpdateTimeDeltaHistogram.update(timeDelta); +} +catch (RuntimeException e) +{ +throw new RuntimeException(e.getMessage() + + " for ks: " + + keyspace.getName() + ", table: " + name, e); +} + } /**
[2/6] cassandra git commit: Include table name in "Cannot get comparator" exception
Include table name in "Cannot get comparator" exception patch by sankalp kohli; reviewed by Robert Stupp for CASSANDRA-12181 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1823c84b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1823c84b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1823c84b Branch: refs/heads/cassandra-3.9 Commit: 1823c84b827ff5f38862757db58001105f1d753f Parents: 8868b74 Author: sankalp kohli Authored: Sat Jul 30 11:30:01 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:30:01 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 24 ++-- 1 file changed, 17 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1823c84b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 1e52b13..400fd36 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1225,13 +1225,23 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean { long start = System.nanoTime(); Memtable mt = data.getMemtableFor(opGroup, replayPosition); -long timeDelta = mt.put(update, indexer, opGroup); -DecoratedKey key = update.partitionKey(); -maybeUpdateRowCache(key); -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); -metric.writeLatency.addNano(System.nanoTime() - start); -if(timeDelta < Long.MAX_VALUE) -metric.colUpdateTimeDeltaHistogram.update(timeDelta); +try +{ +long timeDelta = mt.put(update, indexer, opGroup); +DecoratedKey key = update.partitionKey(); +maybeUpdateRowCache(key); +metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); +metric.writeLatency.addNano(System.nanoTime() - start); +if(timeDelta < Long.MAX_VALUE) +metric.colUpdateTimeDeltaHistogram.update(timeDelta); +} +catch (RuntimeException e) +{ +throw new RuntimeException(e.getMessage() + + " for ks: " + + keyspace.getName() + ", table: " + name, e); +} + } /**
[3/6] cassandra git commit: Include table name in "Cannot get comparator" exception
Include table name in "Cannot get comparator" exception patch by sankalp kohli; reviewed by Robert Stupp for CASSANDRA-12181 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/1823c84b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/1823c84b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/1823c84b Branch: refs/heads/trunk Commit: 1823c84b827ff5f38862757db58001105f1d753f Parents: 8868b74 Author: sankalp kohli Authored: Sat Jul 30 11:30:01 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:30:01 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 24 ++-- 1 file changed, 17 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/1823c84b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 1e52b13..400fd36 100644 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@ -1225,13 +1225,23 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean { long start = System.nanoTime(); Memtable mt = data.getMemtableFor(opGroup, replayPosition); -long timeDelta = mt.put(update, indexer, opGroup); -DecoratedKey key = update.partitionKey(); -maybeUpdateRowCache(key); -metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); -metric.writeLatency.addNano(System.nanoTime() - start); -if(timeDelta < Long.MAX_VALUE) -metric.colUpdateTimeDeltaHistogram.update(timeDelta); +try +{ +long timeDelta = mt.put(update, indexer, opGroup); +DecoratedKey key = update.partitionKey(); +maybeUpdateRowCache(key); +metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); +metric.writeLatency.addNano(System.nanoTime() - start); +if(timeDelta < Long.MAX_VALUE) +metric.colUpdateTimeDeltaHistogram.update(timeDelta); +} +catch (RuntimeException e) +{ +throw new RuntimeException(e.getMessage() + + " for ks: " + + keyspace.getName() + ", table: " + name, e); +} + } /**
[5/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.9
Merge branch 'cassandra-3.0' into cassandra-3.9 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5fb6f958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5fb6f958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5fb6f958 Branch: refs/heads/cassandra-3.9 Commit: 5fb6f95859f3b08e1037439ce1fe1475434af1dd Parents: 8e775ea 1823c84 Author: Robert Stupp Authored: Sat Jul 30 11:32:45 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:32:45 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 27 +--- 1 file changed, 18 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5fb6f958/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 62914a2,400fd36..9d31b60 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@@ -1337,15 -1224,24 +1337,24 @@@ public class ColumnFamilyStore implemen { long start = System.nanoTime(); - Memtable mt = data.getMemtableFor(opGroup, commitLogPosition); - long timeDelta = mt.put(update, indexer, opGroup); - DecoratedKey key = update.partitionKey(); - invalidateCachedPartition(key); - metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); - StorageHook.instance.reportWrite(metadata.cfId, update); - metric.writeLatency.addNano(System.nanoTime() - start); - if(timeDelta < Long.MAX_VALUE) - metric.colUpdateTimeDeltaHistogram.update(timeDelta); -Memtable mt = data.getMemtableFor(opGroup, replayPosition); + try + { ++Memtable mt = data.getMemtableFor(opGroup, commitLogPosition); + long timeDelta = mt.put(update, indexer, opGroup); + DecoratedKey key = update.partitionKey(); -maybeUpdateRowCache(key); ++invalidateCachedPartition(key); + metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); ++StorageHook.instance.reportWrite(metadata.cfId, update); + metric.writeLatency.addNano(System.nanoTime() - start); + if(timeDelta < Long.MAX_VALUE) + metric.colUpdateTimeDeltaHistogram.update(timeDelta); + } + catch (RuntimeException e) + { + throw new RuntimeException(e.getMessage() - + " for ks: " - + keyspace.getName() + ", table: " + name, e); ++ + " for ks: " ++ + keyspace.getName() + ", table: " + name, e); + } - } /**
[4/6] cassandra git commit: Merge branch 'cassandra-3.0' into cassandra-3.9
Merge branch 'cassandra-3.0' into cassandra-3.9 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5fb6f958 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5fb6f958 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5fb6f958 Branch: refs/heads/trunk Commit: 5fb6f95859f3b08e1037439ce1fe1475434af1dd Parents: 8e775ea 1823c84 Author: Robert Stupp Authored: Sat Jul 30 11:32:45 2016 +0200 Committer: Robert Stupp Committed: Sat Jul 30 11:32:45 2016 +0200 -- .../apache/cassandra/db/ColumnFamilyStore.java | 27 +--- 1 file changed, 18 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5fb6f958/src/java/org/apache/cassandra/db/ColumnFamilyStore.java -- diff --cc src/java/org/apache/cassandra/db/ColumnFamilyStore.java index 62914a2,400fd36..9d31b60 --- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java +++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java @@@ -1337,15 -1224,24 +1337,24 @@@ public class ColumnFamilyStore implemen { long start = System.nanoTime(); - Memtable mt = data.getMemtableFor(opGroup, commitLogPosition); - long timeDelta = mt.put(update, indexer, opGroup); - DecoratedKey key = update.partitionKey(); - invalidateCachedPartition(key); - metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); - StorageHook.instance.reportWrite(metadata.cfId, update); - metric.writeLatency.addNano(System.nanoTime() - start); - if(timeDelta < Long.MAX_VALUE) - metric.colUpdateTimeDeltaHistogram.update(timeDelta); -Memtable mt = data.getMemtableFor(opGroup, replayPosition); + try + { ++Memtable mt = data.getMemtableFor(opGroup, commitLogPosition); + long timeDelta = mt.put(update, indexer, opGroup); + DecoratedKey key = update.partitionKey(); -maybeUpdateRowCache(key); ++invalidateCachedPartition(key); + metric.samplers.get(Sampler.WRITES).addSample(key.getKey(), key.hashCode(), 1); ++StorageHook.instance.reportWrite(metadata.cfId, update); + metric.writeLatency.addNano(System.nanoTime() - start); + if(timeDelta < Long.MAX_VALUE) + metric.colUpdateTimeDeltaHistogram.update(timeDelta); + } + catch (RuntimeException e) + { + throw new RuntimeException(e.getMessage() - + " for ks: " - + keyspace.getName() + ", table: " + name, e); ++ + " for ks: " ++ + keyspace.getName() + ", table: " + name, e); + } - } /**
[jira] [Updated] (CASSANDRA-12343) Make 'static final boolean' easier to optimize for Hotspot
[ https://issues.apache.org/jira/browse/CASSANDRA-12343?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-12343: - Status: Patch Available (was: Open) > Make 'static final boolean' easier to optimize for Hotspot > -- > > Key: CASSANDRA-12343 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12343 > Project: Cassandra > Issue Type: Improvement >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Trivial > Fix For: 3.x > > > Hotspot is able to optimize condition checks on `static final` fields. But > the compiler can only optimize if the referenced "constant" is the first > condition to check. (If I understood the optimization in Hotspot correctly.) > I.e. the first {{if}} block can be "eliminated" whereas the second cannot: > {code} > class Foo { > static final boolean CONST = /* some fragment evaluating to false */; > > public void doSomeStuff(boolean param) { > if (!CONST) { > // this code block can be eliminated > } > if (!CONST && param) { > // this code block can be eliminated > } > if (param && !CONST) { > // this code block cannot be eliminated due to some compiler logic > } > > } > } > {code} > Linked patch changes the order in some {{if}} statements and migrates a few > methods to static final fields. > ||trunk|[branch|https://github.com/apache/cassandra/compare/trunk...snazy:boolean-hotspot]|[testall|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-boolean-hotspot-testall/lastSuccessfulBuild/]|[dtest|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-boolean-hotspot-dtest/lastSuccessfulBuild/] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12342) CLibrary improvements
[ https://issues.apache.org/jira/browse/CASSANDRA-12342?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Robert Stupp updated CASSANDRA-12342: - Status: Patch Available (was: Open) > CLibrary improvements > - > > Key: CASSANDRA-12342 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12342 > Project: Cassandra > Issue Type: Improvement >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > Fix For: 3.x > > > {{CLibrary}} uses {{FBUtilities.getProtectedField}} for each invocation of > {{getfd}} - i.e. {{Class.getDeclaredField}} + {{Field.setAccessible}}. Linked > patch migrates these {{Field}} references to static class fields + adds > constants for the OS. Also adds a tiny optimization for non-linux OSs in > {{trySync}}. > ||trunk|[branch|https://github.com/apache/cassandra/compare/trunk...snazy:CLibrary-opts]|[testall|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-CLibrary-opts-testall/lastSuccessfulBuild/]|[dtest|http://cassci.datastax.com/view/Dev/view/snazy/job/snazy-CLibrary-opts-dtest/lastSuccessfulBuild/] -- This message was sent by Atlassian JIRA (v6.3.4#6332)