[jira] [Commented] (CASSANDRA-13853) nodetool describecluster should be more informative
[ https://issues.apache.org/jira/browse/CASSANDRA-13853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16305039#comment-16305039 ] Preetika Tyagi commented on CASSANDRA-13853: Yes, I plan to work on that now. I will need to follow some process for pushing the patch. Will keep posted. Thanks! > nodetool describecluster should be more informative > --- > > Key: CASSANDRA-13853 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13853 > Project: Cassandra > Issue Type: Improvement > Components: Observability, Tools >Reporter: Jon Haddad >Assignee: Preetika Tyagi >Priority: Minor > Labels: lhf > > Additional information we should be displaying: > * Total node count > * List of datacenters, RF, with number of nodes per dc, how many are down, > * Version(s) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
cassandra git commit: Fixed changes to reflect CASSANDRA-13391
Repository: cassandra Updated Branches: refs/heads/trunk b3d2940a0 -> e2e28a02e Fixed changes to reflect CASSANDRA-13391 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/e2e28a02 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/e2e28a02 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/e2e28a02 Branch: refs/heads/trunk Commit: e2e28a02e8d77d925b72e435146d938ca102cacb Parents: b3d2940 Author: Jon HaddadAuthored: Wed Dec 27 18:50:42 2017 -0800 Committer: Jon Haddad Committed: Wed Dec 27 18:50:42 2017 -0800 -- CHANGES.txt | 1 + 1 file changed, 1 insertion(+) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/e2e28a02/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 3826190..ba0f842 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -172,6 +172,7 @@ * Anticompaction can cause noisy log messages (CASSANDRA-13684) * Switch to client init for sstabledump (CASSANDRA-13683) * CQLSH: Don't pause when capturing data (CASSANDRA-13743) + * nodetool clearsnapshot requires --all to clear all snapshots (CASSANDRA-13391) 3.11.2 - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Resolved] (CASSANDRA-13391) nodetool clearsnapshot should require --all to clear all snapshots
[ https://issues.apache.org/jira/browse/CASSANDRA-13391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jon Haddad resolved CASSANDRA-13391. Resolution: Fixed Merged to trunk as b3d2940a07. > nodetool clearsnapshot should require --all to clear all snapshots > -- > > Key: CASSANDRA-13391 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13391 > Project: Cassandra > Issue Type: Improvement >Reporter: Jon Haddad > Fix For: 4.0 > > > Deleting all snapshots by default is insanely dangerous. It would be like if > rm's default was -rf /. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
cassandra git commit: Added --all to ClearSnapshot command, so entering the command without a parameter will now throw an exception instead of deleting all the snapshots.
Repository: cassandra Updated Branches: refs/heads/trunk 702d9f1f0 -> b3d2940a0 Added --all to ClearSnapshot command, so entering the command without a parameter will now throw an exception instead of deleting all the snapshots. Patch by Barak Merimovich, Review by Jon Haddad for CASSANDRA-13391. Closes #182. Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b3d2940a Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b3d2940a Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b3d2940a Branch: refs/heads/trunk Commit: b3d2940a073f98c7776e1d0a391749b44df04ace Parents: 702d9f1 Author: Jon HaddadAuthored: Wed Dec 27 18:46:49 2017 -0800 Committer: Jon Haddad Committed: Wed Dec 27 18:46:49 2017 -0800 -- .../service/EmbeddedCassandraService.java | 5 + .../cassandra/tools/nodetool/ClearSnapshot.java | 13 +- .../cassandra/tools/ClearSnapshotTest.java | 119 +++ 3 files changed, 136 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3d2940a/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java -- diff --git a/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java b/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java index 9dc92d7..9172eab 100644 --- a/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java +++ b/src/java/org/apache/cassandra/service/EmbeddedCassandraService.java @@ -50,4 +50,9 @@ public class EmbeddedCassandraService cassandraDaemon.init(null); cassandraDaemon.start(); } + +public void stop() +{ +cassandraDaemon.stop(); +} } http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3d2940a/src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java -- diff --git a/src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java b/src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java index 10a8117..12322d0 100644 --- a/src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java +++ b/src/java/org/apache/cassandra/tools/nodetool/ClearSnapshot.java @@ -40,9 +40,18 @@ public class ClearSnapshot extends NodeToolCmd @Option(title = "snapshot_name", name = "-t", description = "Remove the snapshot with a given name") private String snapshotName = EMPTY; +@Option(title = "clear_all_snapshots", name = "--all", description = "Removes all snapshots") +private boolean clearAllSnapshots = false; + @Override public void execute(NodeProbe probe) { +if(snapshotName.isEmpty() && !clearAllSnapshots) +throw new RuntimeException("Specify snapshot name or --all"); + +if(!snapshotName.isEmpty() && clearAllSnapshots) +throw new RuntimeException("Specify only one of snapshot name or --all"); + StringBuilder sb = new StringBuilder(); sb.append("Requested clearing snapshot(s) for "); @@ -52,7 +61,9 @@ public class ClearSnapshot extends NodeToolCmd else sb.append("[").append(join(keyspaces, ", ")).append("]"); -if (!snapshotName.isEmpty()) +if (snapshotName.isEmpty()) +sb.append(" with [all snapshots]"); +else sb.append(" with snapshot name [").append(snapshotName).append("]"); System.out.println(sb.toString()); http://git-wip-us.apache.org/repos/asf/cassandra/blob/b3d2940a/test/unit/org/apache/cassandra/tools/ClearSnapshotTest.java -- diff --git a/test/unit/org/apache/cassandra/tools/ClearSnapshotTest.java b/test/unit/org/apache/cassandra/tools/ClearSnapshotTest.java new file mode 100644 index 000..6b132ab --- /dev/null +++ b/test/unit/org/apache/cassandra/tools/ClearSnapshotTest.java @@ -0,0 +1,119 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + *
[jira] [Commented] (CASSANDRA-13391) nodetool clearsnapshot should require --all to clear all snapshots
[ https://issues.apache.org/jira/browse/CASSANDRA-13391?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16305004#comment-16305004 ] ASF GitHub Bot commented on CASSANDRA-13391: Github user asfgit closed the pull request at: https://github.com/apache/cassandra/pull/182 > nodetool clearsnapshot should require --all to clear all snapshots > -- > > Key: CASSANDRA-13391 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13391 > Project: Cassandra > Issue Type: Improvement >Reporter: Jon Haddad > Fix For: 4.0 > > > Deleting all snapshots by default is insanely dangerous. It would be like if > rm's default was -rf /. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-13391) nodetool clearsnapshot should require --all to clear all snapshots
[ https://issues.apache.org/jira/browse/CASSANDRA-13391?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jon Haddad updated CASSANDRA-13391: --- Reviewer: Jon Haddad Fix Version/s: 4.0 > nodetool clearsnapshot should require --all to clear all snapshots > -- > > Key: CASSANDRA-13391 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13391 > Project: Cassandra > Issue Type: Improvement >Reporter: Jon Haddad > Fix For: 4.0 > > > Deleting all snapshots by default is insanely dangerous. It would be like if > rm's default was -rf /. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13853) nodetool describecluster should be more informative
[ https://issues.apache.org/jira/browse/CASSANDRA-13853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16304990#comment-16304990 ] Jon Haddad commented on CASSANDRA-13853: Looks pretty good, mind putting up a Github PR / patch? > nodetool describecluster should be more informative > --- > > Key: CASSANDRA-13853 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13853 > Project: Cassandra > Issue Type: Improvement > Components: Observability, Tools >Reporter: Jon Haddad >Assignee: Preetika Tyagi >Priority: Minor > Labels: lhf > > Additional information we should be displaying: > * Total node count > * List of datacenters, RF, with number of nodes per dc, how many are down, > * Version(s) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14141) Enable CDC unittest
[ https://issues.apache.org/jira/browse/CASSANDRA-14141?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16304978#comment-16304978 ] Jay Zhuang commented on CASSANDRA-14141: Here is the patch, please review: | Branch | uTest | | [14141-3.11|https://github.com/cooldoger/cassandra/tree/14141-3.11] | [!https://circleci.com/gh/cooldoger/cassandra/tree/14141-3.11.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/14141-3.11] | | [14141-trunk|https://github.com/cooldoger/cassandra/tree/14141-trunk] | [!https://circleci.com/gh/cooldoger/cassandra/tree/14141-trunk.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/14141-trunk] | Tested with both {{$ ant test}} and {{$ ant test-cdc}}. > Enable CDC unittest > --- > > Key: CASSANDRA-14141 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14141 > Project: Cassandra > Issue Type: Test > Components: Testing >Reporter: Jay Zhuang >Assignee: Jay Zhuang >Priority: Minor > Labels: CDC, testing > > Follow up for CASSANDRA-14066 > 2 CDC unittests are skipped in the normal test run, it has to be {{$ ant > test-cdc}} to run the cdc test. > The fix enables them in normal {{$ ant test}} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14141) Enable CDC unittest
[ https://issues.apache.org/jira/browse/CASSANDRA-14141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jay Zhuang updated CASSANDRA-14141: --- Status: Patch Available (was: Open) > Enable CDC unittest > --- > > Key: CASSANDRA-14141 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14141 > Project: Cassandra > Issue Type: Test > Components: Testing >Reporter: Jay Zhuang >Assignee: Jay Zhuang >Priority: Minor > Labels: CDC, testing > > Follow up for CASSANDRA-14066 > 2 CDC unittests are skipped in the normal test run, it has to be {{$ ant > test-cdc}} to run the cdc test. > The fix enables them in normal {{$ ant test}} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-13853) nodetool describecluster should be more informative
[ https://issues.apache.org/jira/browse/CASSANDRA-13853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16304972#comment-16304972 ] Preetika Tyagi commented on CASSANDRA-13853: @Jon Haddad: Below is the sample output I'm generating now. Stats for all nodes: Live: 1 Joining nodes: 0 Moving nodes: 0 Leaving nodes: 0 Unreachable nodes: 0 Data Centers: datacenter1 #Nodes: 1 #Down: 0 Keyspaces: system_schema RF: 1 system RF: 1 system_auth RF: 1 system_distributed RF: 3 system_traces RF: 2 Cluster Information: Name: Test Cluster Snitch: org.apache.cassandra.locator.DynamicEndpointSnitch Partitioner: org.apache.cassandra.dht.Murmur3Partitioner Schema versions: 59a1610b-0384-337c-a2c5-9c8efaba12be: [127.0.0.1] Let me know your feedback. Thanks! > nodetool describecluster should be more informative > --- > > Key: CASSANDRA-13853 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13853 > Project: Cassandra > Issue Type: Improvement > Components: Observability, Tools >Reporter: Jon Haddad >Assignee: Preetika Tyagi >Priority: Minor > Labels: lhf > > Additional information we should be displaying: > * Total node count > * List of datacenters, RF, with number of nodes per dc, how many are down, > * Version(s) -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-14141) Enable CDC unittest
Jay Zhuang created CASSANDRA-14141: -- Summary: Enable CDC unittest Key: CASSANDRA-14141 URL: https://issues.apache.org/jira/browse/CASSANDRA-14141 Project: Cassandra Issue Type: Test Components: Testing Reporter: Jay Zhuang Assignee: Jay Zhuang Priority: Minor Follow up for CASSANDRA-14066 2 CDC unittests are skipped in the normal test run, it has to be {{$ ant test-cdc}} to run the cdc test. The fix enables them in normal {{$ ant test}} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14140) Add unittest
[ https://issues.apache.org/jira/browse/CASSANDRA-14140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jay Zhuang updated CASSANDRA-14140: --- Status: Patch Available (was: Open) > Add unittest > > > Key: CASSANDRA-14140 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14140 > Project: Cassandra > Issue Type: Sub-task > Components: Testing >Reporter: Jay Zhuang >Assignee: Jay Zhuang >Priority: Minor > Labels: testing > > It's a fairly big change, would be better to have a few unittest. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-14140) Add unittest
[ https://issues.apache.org/jira/browse/CASSANDRA-14140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jay Zhuang updated CASSANDRA-14140: --- Labels: testing (was: ) Fix Version/s: (was: 3.11.2) Component/s: (was: Coordination) (was: Distributed Metadata) Testing > Add unittest > > > Key: CASSANDRA-14140 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14140 > Project: Cassandra > Issue Type: Sub-task > Components: Testing >Reporter: Jay Zhuang >Assignee: Jay Zhuang >Priority: Minor > Labels: testing > > It's a fairly big change, would be better to have a few unittest. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-14140) Add unittest
[ https://issues.apache.org/jira/browse/CASSANDRA-14140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16304879#comment-16304879 ] Jay Zhuang commented on CASSANDRA-14140: Added unittests for the cdc schema migration issue, please review: | Branch | uTest | | [14140-3.11|https://github.com/cooldoger/cassandra/tree/14140-3.11] | [!https://circleci.com/gh/cooldoger/cassandra/tree/14140-3.11.svg?style=svg!|https://circleci.com/gh/cooldoger/cassandra/tree/14140-3.11] | The tests are not needed for 4.0. > Add unittest > > > Key: CASSANDRA-14140 > URL: https://issues.apache.org/jira/browse/CASSANDRA-14140 > Project: Cassandra > Issue Type: Sub-task > Components: Coordination, Distributed Metadata >Reporter: Jay Zhuang >Assignee: Jay Zhuang >Priority: Minor > Fix For: 3.11.2 > > > It's a fairly big change, would be better to have a few unittest. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-14140) Add unittest
Jay Zhuang created CASSANDRA-14140: -- Summary: Add unittest Key: CASSANDRA-14140 URL: https://issues.apache.org/jira/browse/CASSANDRA-14140 Project: Cassandra Issue Type: Sub-task Reporter: Jay Zhuang Assignee: Jay Zhuang Priority: Minor It's a fairly big change, would be better to have a few unittest. -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-14139) Avoid races during compaction strategy reload
Paulo Motta created CASSANDRA-14139: --- Summary: Avoid races during compaction strategy reload Key: CASSANDRA-14139 URL: https://issues.apache.org/jira/browse/CASSANDRA-14139 Project: Cassandra Issue Type: Bug Reporter: Paulo Motta Assignee: Paulo Motta There are a few methods in {{CompactionStrategyManager}} accessing the repaired/unrepaired compaction strategy lists without using the read lock, what could cause issues like the one below: {noformat} ERROR [CompactionExecutor:1] 2017-12-22 12:17:12,320 CassandraDaemon.java:141 - Exception in thread Thread[CompactionExecutor:1,5,main] java.lang.IndexOutOfBoundsException: Index: 0, Size: 1 at java.util.ArrayList.rangeCheck(ArrayList.java:657) at java.util.ArrayList.get(ArrayList.java:433) at org.apache.cassandra.db.compaction.CompactionStrategyManager.supportsEarlyOpen(CompactionStrategyManager.java:1262) at org.apache.cassandra.db.ColumnFamilyStore.supportsEarlyOpen(ColumnFamilyStore.java:558) at org.apache.cassandra.io.sstable.SSTableRewriter.construct(SSTableRewriter.java:119) at org.apache.cassandra.db.compaction.writers.CompactionAwareWriter.(CompactionAwareWriter.java:91) at org.apache.cassandra.db.compaction.writers.DefaultCompactionWriter.(DefaultCompactionWriter.java:57) at org.apache.cassandra.db.compaction.CompactionTask.getCompactionAwareWriter(CompactionTask.java:293) at org.apache.cassandra.db.compaction.CompactionTask.runMayThrow(CompactionTask.java:200) at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28) at org.apache.cassandra.db.compaction.CompactionTask.executeInternal(CompactionTask.java:90) at org.apache.cassandra.db.compaction.AbstractCompactionTask.execute(AbstractCompactionTask.java:101) at org.apache.cassandra.db.compaction.CompactionManager$BackgroundCompactionCandidate.run(CompactionManager.java:310) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:81) at java.lang.Thread.run(Thread.java:748) {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org