[jira] [Assigned] (CASSANDRA-12513) IOException (No such file or directory) closing MessagingService's server socket (locally)
[ https://issues.apache.org/jira/browse/CASSANDRA-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ariel Weisberg reassigned CASSANDRA-12513: -- Assignee: Ariel Weisberg (was: Robert Stupp) > IOException (No such file or directory) closing MessagingService's server > socket (locally) > -- > > Key: CASSANDRA-12513 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12513 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Ariel Weisberg >Priority: Minor > > _Sometimes_ the {{RemoveTest}} fails with the following exception. It's not > related to the test itself. > The exception is risen in > {{ServerSocketChannelImpl.implCloseSelectableChannel}} where it checks that a > thread ID is non-zero. The {{thread}} instance field is set inside its accept > and poll methods. It looks like this is caused by some race condition - i.e. > stopping in debugger at certain points prevents it from being triggered. > I could not find any misuse in the code base - but want to document this > issue. > No difference between 8u92 and 8u102 > {code} > INFO [ACCEPT-/127.0.0.1] 2016-08-22 08:35:16,606 ?:? - MessagingService has > terminated the accept() thread > java.io.IOError: java.io.IOException: No such file or directory > at > org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:914) > at org.apache.cassandra.service.RemoveTest.tearDown(RemoveTest.java:103) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) > at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) > at org.junit.runners.ParentRunner.run(ParentRunner.java:220) > at org.junit.runner.JUnitCore.run(JUnitCore.java:159) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) > Caused by: java.io.IOException: No such file or directory > at sun.nio.ch.NativeThread.signal(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292) > at > java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234) > at > java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115) > at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137) > at > org.apache.cassandra.net.MessagingService$SocketThread.close(MessagingService.java:1249) > at > org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:904) > ... 22 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-13115) Read repair is not blocking repair to finish in foreground repair
[ https://issues.apache.org/jira/browse/CASSANDRA-13115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15819814#comment-15819814 ] Xiaolong Jiang edited comment on CASSANDRA-13115 at 1/12/17 1:33 AM: - [~rha]Please check this https://issues.apache.org/jira/browse/CASSANDRA-10726 for more context and also see Jonathan's comments. was (Author: xiaolong...@gmail.com): [~rha]Please check this https://issues.apache.org/jira/browse/CASSANDRA-10726 for more context and also see Jonathan comments. > Read repair is not blocking repair to finish in foreground repair > - > > Key: CASSANDRA-13115 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13115 > Project: Cassandra > Issue Type: Bug > Environment: ccm on OSX >Reporter: Xiaolong Jiang > > The code trying to wait(block) for repair result to come back in 3.X is below: > {code:title= DataResolver.java|borderStyle=solid} > public void close() > { > try > { > FBUtilities.waitOnFutures(repairResults, > DatabaseDescriptor.getWriteRpcTimeout()); > } > catch (TimeoutException ex) > { > // We got all responses, but timed out while repairing > int blockFor = consistency.blockFor(keyspace); > if (Tracing.isTracing()) > Tracing.trace("Timed out while read-repairing after > receiving all {} data and digest responses", blockFor); > else > logger.debug("Timeout while read-repairing after > receiving all {} data and digest responses", blockFor); > throw new ReadTimeoutException(consistency, blockFor-1, > blockFor, true); > } > } > {code} > in DataResolver class, but this close method is never called and it's also > not auto close(RepairMergeListener is not extending from > AutoCloseable/CloseableIterator) which means we never wait for repair to > finish before returning final result. > The steps to reproduce: > 1. create some keyspace/table with RF = 2 > 2. start 2 nodes using ccm > 3. stop node2 > 4. disable node1 hinted hand off > 5. write some data to node1 with consistency level one > 6. start node2 > 7. query some data from node1 > This should trigger read repair. I put some log in above close method, and > can not see log print put. > So this bug will basically violate "monotonic quorum reads " guarantee. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Comment Edited] (CASSANDRA-12844) nodetool drain causing mutiple nodes crashing with hint file corruption in Cassandra 3.9
[ https://issues.apache.org/jira/browse/CASSANDRA-12844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15819815#comment-15819815 ] Harikrishnan edited comment on CASSANDRA-12844 at 1/12/17 1:33 AM: --- Hi, We reproduced this two times , we were trying to bring down a node by issuing nodetool drain. One interesting aspect is there were lot mutation drops and hint replay was happening to most of the nodes while drain is being issued.Will try to reproduce it again . was (Author: hari708): Hi, We reproduced this two times , we were trying to bring down a node by issuing nodetool drain. One interesting aspect is there were lot mutation drops and hint replay was happening to most of the nodes while drain is being issued. > nodetool drain causing mutiple nodes crashing with hint file corruption in > Cassandra 3.9 > > > Key: CASSANDRA-12844 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12844 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Harikrishnan >Priority: Critical > Labels: hints > > The steps are as follows. > we have 4/4 node cassandra running in 3.9 version. > In one node made some changes to cassanra.yaml. issued a nodetool drain > killed the cassandra process and restarted the node. After sometime nodetool > status reported multiple nodes are down in that DC. > Went and check the system.log of all the files and found the hint corruption > occuring(CASSANDRA-12728). nodetool drain causing this corruption and > bringing multiple nodes down is a big concern. > ERROR [HintsDispatcher:2] 2016-10-26 12:17:59,361 > HintsDispatchExecutor.java:225 - Failed to dispatch hints file > 4d1362f0-053c-4042-80a7-bfc85a26c90f-1477509190999-1.hints: file is corrupted > ({}) > org.apache.cassandra.io.FSReadError: java.io.EOFException > at > org.apache.cassandra.hints.HintsReader$BuffersIterator.computeNext(HintsReader.java:284) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsReader$BuffersIterator.computeNext(HintsReader.java:254) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.sendHints(HintsDispatcher.java:156) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.sendHintsAndAwait(HintsDispatcher.java:137) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.dispatch(HintsDispatcher.java:119) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.dispatch(HintsDispatcher.java:91) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.deliver(HintsDispatchExecutor.java:259) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.dispatch(HintsDispatchExecutor.java:242) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.dispatch(HintsDispatchExecutor.java:220) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.run(HintsDispatchExecutor.java:199) > [apache-cassandra-3.9.jar:3.9] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [na:1.8.0_102] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > [na:1.8.0_102] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [na:1.8.0_102] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_102] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13115) Read repair is not blocking repair to finish in foreground repair
[ https://issues.apache.org/jira/browse/CASSANDRA-13115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15819814#comment-15819814 ] Xiaolong Jiang commented on CASSANDRA-13115: [~rha]Please check this https://issues.apache.org/jira/browse/CASSANDRA-10726 for more context and also see Jonathan comments. > Read repair is not blocking repair to finish in foreground repair > - > > Key: CASSANDRA-13115 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13115 > Project: Cassandra > Issue Type: Bug > Environment: ccm on OSX >Reporter: Xiaolong Jiang > > The code trying to wait(block) for repair result to come back in 3.X is below: > {code:title= DataResolver.java|borderStyle=solid} > public void close() > { > try > { > FBUtilities.waitOnFutures(repairResults, > DatabaseDescriptor.getWriteRpcTimeout()); > } > catch (TimeoutException ex) > { > // We got all responses, but timed out while repairing > int blockFor = consistency.blockFor(keyspace); > if (Tracing.isTracing()) > Tracing.trace("Timed out while read-repairing after > receiving all {} data and digest responses", blockFor); > else > logger.debug("Timeout while read-repairing after > receiving all {} data and digest responses", blockFor); > throw new ReadTimeoutException(consistency, blockFor-1, > blockFor, true); > } > } > {code} > in DataResolver class, but this close method is never called and it's also > not auto close(RepairMergeListener is not extending from > AutoCloseable/CloseableIterator) which means we never wait for repair to > finish before returning final result. > The steps to reproduce: > 1. create some keyspace/table with RF = 2 > 2. start 2 nodes using ccm > 3. stop node2 > 4. disable node1 hinted hand off > 5. write some data to node1 with consistency level one > 6. start node2 > 7. query some data from node1 > This should trigger read repair. I put some log in above close method, and > can not see log print put. > So this bug will basically violate "monotonic quorum reads " guarantee. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12844) nodetool drain causing mutiple nodes crashing with hint file corruption in Cassandra 3.9
[ https://issues.apache.org/jira/browse/CASSANDRA-12844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15819815#comment-15819815 ] Harikrishnan commented on CASSANDRA-12844: -- Hi, We reproduced this two times , we were trying to bring down a node by issuing nodetool drain. One interesting aspect is there were lot mutation drops and hint replay was happening to most of the nodes while drain is being issued. > nodetool drain causing mutiple nodes crashing with hint file corruption in > Cassandra 3.9 > > > Key: CASSANDRA-12844 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12844 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Harikrishnan >Priority: Critical > Labels: hints > > The steps are as follows. > we have 4/4 node cassandra running in 3.9 version. > In one node made some changes to cassanra.yaml. issued a nodetool drain > killed the cassandra process and restarted the node. After sometime nodetool > status reported multiple nodes are down in that DC. > Went and check the system.log of all the files and found the hint corruption > occuring(CASSANDRA-12728). nodetool drain causing this corruption and > bringing multiple nodes down is a big concern. > ERROR [HintsDispatcher:2] 2016-10-26 12:17:59,361 > HintsDispatchExecutor.java:225 - Failed to dispatch hints file > 4d1362f0-053c-4042-80a7-bfc85a26c90f-1477509190999-1.hints: file is corrupted > ({}) > org.apache.cassandra.io.FSReadError: java.io.EOFException > at > org.apache.cassandra.hints.HintsReader$BuffersIterator.computeNext(HintsReader.java:284) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsReader$BuffersIterator.computeNext(HintsReader.java:254) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.utils.AbstractIterator.hasNext(AbstractIterator.java:47) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.sendHints(HintsDispatcher.java:156) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.sendHintsAndAwait(HintsDispatcher.java:137) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.dispatch(HintsDispatcher.java:119) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatcher.dispatch(HintsDispatcher.java:91) > ~[apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.deliver(HintsDispatchExecutor.java:259) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.dispatch(HintsDispatchExecutor.java:242) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.dispatch(HintsDispatchExecutor.java:220) > [apache-cassandra-3.9.jar:3.9] > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.run(HintsDispatchExecutor.java:199) > [apache-cassandra-3.9.jar:3.9] > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [na:1.8.0_102] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > [na:1.8.0_102] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [na:1.8.0_102] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_102] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13020) Stuck in LEAVING state (Transferring all hints to null)
[ https://issues.apache.org/jira/browse/CASSANDRA-13020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15819310#comment-15819310 ] Aleksandr Ivanov commented on CASSANDRA-13020: -- Cluster is hosted in Azure and prefer_local is enabled since nodes in own datacenter has internal connectivity. > Stuck in LEAVING state (Transferring all hints to null) > --- > > Key: CASSANDRA-13020 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13020 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: v3.0.9 >Reporter: Aleksandr Ivanov > Labels: decommission, hints > > I tried to decommission one node. > Node sent all data to another node and got stuck in LEAVING state. > Log message shows Exception in HintsDispatcher thread. > Could it be reason of stuck in LEAVING state? > command output: > {noformat} > root@cas-node6:~# time nodetool decommission > error: null > -- StackTrace -- > java.lang.NullPointerException > at > java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106) > at > java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097) > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.run(HintsDispatchExecutor.java:203) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at > java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3566) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.apache.cassandra.hints.HintsDispatchExecutor$TransferHintsTask.transfer(HintsDispatchExecutor.java:168) > at > org.apache.cassandra.hints.HintsDispatchExecutor$TransferHintsTask.run(HintsDispatchExecutor.java:141) > 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:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > real147m7.483s > user0m17.388s > sys 0m1.968s > {noformat} > nodetool netstats: > {noformat} > root@cas-node6:~# nodetool netstats > Mode: LEAVING > Not sending any streams. > Read Repair Statistics: > Attempted: 35082 > Mismatch (Blocking): 18 > Mismatch (Background): 0 > Pool NameActive Pending Completed Dropped > Large messages n/a 1 0 0 > Small messages n/a 0 16109860 112 > Gossip messages n/a 0 287074 0 > {noformat} > Log: > {noformat} > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:52:59,467 > StorageService.java:1170 - LEAVING: sleeping 3 ms for batch processing > and pending range setup > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,455 > StorageService.java:1170 - LEAVING: replaying batch log and streaming data to > other nodes > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,910 > StreamResultFuture.java:87 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Executing streaming plan for Unbootstrap > INFO [StreamConnectionEstablisher:1] 2016-12-07 12:53:39,911 > StreamSession.java:239 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Starting streaming to /10.10.10.17 > INFO [StreamConnectionEstablisher:2] 2016-12-07 12:53:39,911 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [StreamConnectionEstablisher:3] 2016-12-07 12:53:39,912 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [StreamConnectionEstablisher:4] 2016-12-07 12:53:39,912 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,912 > StorageService.java:1170 - LEAVING: streaming hints to other nodes > INFO [StreamConnectionEstablisher:2]
[jira] [Created] (CASSANDRA-13119) dtest failure upgrade_tests.upgrade_supercolumns_test.TestSCUpgrade.upgrade_super_columns_through_all_versions_test
Ariel Weisberg created CASSANDRA-13119: -- Summary: dtest failure upgrade_tests.upgrade_supercolumns_test.TestSCUpgrade.upgrade_super_columns_through_all_versions_test Key: CASSANDRA-13119 URL: https://issues.apache.org/jira/browse/CASSANDRA-13119 Project: Cassandra Issue Type: Bug Components: Core, Testing Reporter: Ariel Weisberg Assignee: Ariel Weisberg Priority: Critical Fix For: 3.0.x, 3.x, 4.x The test complains about unreadable sstables version ka and lb during upgrade which is 2.1 and 2.2. These tables look like system tables not user tables. I looked and I can't find any place where system tables are upgraded on upgrade. You can specify them explicitly by name with nodetool, but nodetool defaults to only upgrading user tables and doesn't have a flag to upgrade all tables. These tables probably need to be removed if unused or upgraded if in use. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13017) DISTINCT queries on partition keys and static column might not return all the results
[ https://issues.apache.org/jira/browse/CASSANDRA-13017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer updated CASSANDRA-13017: --- Resolution: Fixed Fix Version/s: (was: 2.2.x) (was: 2.1.x) 2.2.9 2.1.17 Reproduced In: 2.2.8, 2.1.13 (was: 2.1.13, 2.2.8) Status: Resolved (was: Ready to Commit) Committed into 2.1 at 70e8b39b021b0abae69009c4a034657e2518e09e and merged into 2.2 > DISTINCT queries on partition keys and static column might not return all the > results > - > > Key: CASSANDRA-13017 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13017 > Project: Cassandra > Issue Type: Bug > Components: CQL >Reporter: Benjamin Lerer >Assignee: Benjamin Lerer > Fix For: 2.1.17, 2.2.9 > > > In {{2.1}} and {{2.2}}, a {{DISTINCT}} query on partition keys and static > columns might not return all the data if some rows have no data and the > static columns have also no values. > The problem can be reproduced using the Java driver with the following code: > {code} > session = cluster.connect(); > session.execute("CREATE KEYSPACE IF NOT EXISTS test WITH REPLICATION > = {'class' : 'SimpleStrategy', 'replication_factor' : '1'}"); > session.execute("USE test"); > session.execute("DROP TABLE IF EXISTS test"); > session.execute("CREATE TABLE test (pk int, c int, v int, s int > static, primary key(pk, c))"); > PreparedStatement prepare = session.prepare("INSERT INTO test (pk, c, > v, s) VALUES (?, ?, ?, ?)"); > for (int i = 0; i < 10; i++) > for (int j = 0; j < 1; j++) > session.execute(prepare.bind(i, j, null, null)); > for (Row row : session.execute(new SimpleStatement("SELECT DISTINCT > token(pk), pk, s FROM test").setFetchSize(2))) > { > System.out.println(row); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[4/7] cassandra git commit: Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883)
Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5774d8e2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5774d8e2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5774d8e2 Branch: refs/heads/trunk Commit: 5774d8e23556b09b11f9f756d93a619ae41a3630 Parents: 219f6ee Author: Benjamin LererAuthored: Wed Jan 11 21:23:48 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:23:48 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5774d8e2/conf/cassandra-env.ps1 -- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index f037b56..d3a0a87 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -198,42 +198,6 @@ Function CalculateHeapSizes } #- -Function SetJsr223Env -{ -$cp = $env:CLASSPATH -foreach ($jsrDir in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223") -{ -foreach ($file in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223\$jsrDir\*.jar") -{ -$file = $file -replace "\\", "/" -$cp = $cp + ";" + """$file""" -} -} -$env:CLASSPATH=$cp - -# JSR223/JRuby - set ruby lib directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\ruby") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djruby.lib=$env:CASSANDRA_HOME\lib\jsr223\jruby" -} -# JSR223/JRuby - set ruby JNI libraries root directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\jni") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djffi.boot.library.path=$env:CASSANDRA_HOME\lib\jsr223\jruby\jni" -} -# JSR223/Jython - set python.home system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jython\jython.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dpython.home=$env:CASSANDRA_HOME\lib\jsr223\jython" -} -# JSR223/Scala - necessary system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\scala\scala-compiler.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dscala.usejavacp=true" -} -} - -#- Function ParseJVMInfo { # grab info about the JVM @@ -317,7 +281,6 @@ Function SetCassandraEnvironment SetCassandraMain BuildClassPath -SetJsr223Env # Override these to set the amount of memory to allocate to the JVM at # start-up. For production use you may wish to adjust this for your
[3/7] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0
Merge branch cassandra-2.2 into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/219f6ee8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/219f6ee8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/219f6ee8 Branch: refs/heads/trunk Commit: 219f6ee825f968420e34ed4e3ce0a7571495e975 Parents: 15b5280 b45cb10 Author: Benjamin LererAuthored: Wed Jan 11 21:11:15 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:11:22 2017 +0100 -- --
[6/7] cassandra git commit: Merge branch cassandra-3.11 into cassandra-3.X
Merge branch cassandra-3.11 into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3bcdbd66 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3bcdbd66 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3bcdbd66 Branch: refs/heads/trunk Commit: 3bcdbd66fedd271323338af6302a133e9da3640c Parents: 0d81317 9c2ab25 Author: Benjamin LererAuthored: Wed Jan 11 21:29:40 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:29:55 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) --
[1/7] cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/trunk 2d56fee4f -> 05106f078 Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/trunk Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[5/7] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11
Merge branch cassandra-3.0 into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c2ab255 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c2ab255 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c2ab255 Branch: refs/heads/trunk Commit: 9c2ab25556fad06a6a4d58f4bb652719a8a1bc27 Parents: 1553d86 5774d8e Author: Benjamin LererAuthored: Wed Jan 11 21:27:28 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:28:21 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c2ab255/conf/cassandra-env.ps1 --
[7/7] cassandra git commit: Merge branch cassandra-3.X into trunk
Merge branch cassandra-3.X into trunk Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/05106f07 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/05106f07 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/05106f07 Branch: refs/heads/trunk Commit: 05106f0780798f7c9bf1c492d268be0c0437f864 Parents: 2d56fee 3bcdbd6 Author: Benjamin LererAuthored: Wed Jan 11 21:30:59 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:31:07 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/05106f07/conf/cassandra-env.ps1 --
[2/7] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Merge branch cassandra-2.1 into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b45cb104 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b45cb104 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b45cb104 Branch: refs/heads/trunk Commit: b45cb10445731fdef67b720ab216a038b9499928 Parents: 2acc15b 70e8b39 Author: Benjamin LererAuthored: Wed Jan 11 21:08:01 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:09:29 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/CHANGES.txt -- diff --cc CHANGES.txt index a7e89ed,414d6ed..4f769a1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,9 +1,34 @@@ -2.1.17 +2.2.9 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883) + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) + * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) + * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) + * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) + * Fix Util.spinAssertEquals (CASSANDRA-12283) + * Fix potential NPE for compactionstats (CASSANDRA-12462) + * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813) + * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754) + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) + * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-7) + * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) + * Fix merkle tree depth calculation (CASSANDRA-12580) + * Make Collections deserialization more robust (CASSANDRA-12618) + * Better handle invalid system roles table (CASSANDRA-12700) + * Split consistent range movement flag correction (CASSANDRA-12786) + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979) +Merged from 2.1: + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) - * Fix RecoveryManagerTruncateTest (CASSANDRA-12802) * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --cc src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index 8ec9f4c,3ac777e..3b16e0b --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@@ -72,10 -72,10 +72,11 @@@ public class RangeSliceQueryPager exten protected List queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestExecutionException { -SliceQueryFilter sf = (SliceQueryFilter)columnFilter; +SliceQueryFilter rawFilter = (SliceQueryFilter)columnFilter; +SliceQueryFilter sf = rawFilter.withUpdatedCount(Math.min(rawFilter.count, pageSize)); AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); - Composite
[3/6] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0
Merge branch cassandra-2.2 into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/219f6ee8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/219f6ee8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/219f6ee8 Branch: refs/heads/cassandra-3.X Commit: 219f6ee825f968420e34ed4e3ce0a7571495e975 Parents: 15b5280 b45cb10 Author: Benjamin LererAuthored: Wed Jan 11 21:11:15 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:11:22 2017 +0100 -- --
[5/6] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11
Merge branch cassandra-3.0 into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c2ab255 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c2ab255 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c2ab255 Branch: refs/heads/cassandra-3.X Commit: 9c2ab25556fad06a6a4d58f4bb652719a8a1bc27 Parents: 1553d86 5774d8e Author: Benjamin LererAuthored: Wed Jan 11 21:27:28 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:28:21 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c2ab255/conf/cassandra-env.ps1 --
[1/6] cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/cassandra-3.X 0d813176a -> 3bcdbd66f Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/cassandra-3.X Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[2/6] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Merge branch cassandra-2.1 into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b45cb104 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b45cb104 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b45cb104 Branch: refs/heads/cassandra-3.X Commit: b45cb10445731fdef67b720ab216a038b9499928 Parents: 2acc15b 70e8b39 Author: Benjamin LererAuthored: Wed Jan 11 21:08:01 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:09:29 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/CHANGES.txt -- diff --cc CHANGES.txt index a7e89ed,414d6ed..4f769a1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,9 +1,34 @@@ -2.1.17 +2.2.9 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883) + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) + * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) + * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) + * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) + * Fix Util.spinAssertEquals (CASSANDRA-12283) + * Fix potential NPE for compactionstats (CASSANDRA-12462) + * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813) + * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754) + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) + * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-7) + * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) + * Fix merkle tree depth calculation (CASSANDRA-12580) + * Make Collections deserialization more robust (CASSANDRA-12618) + * Better handle invalid system roles table (CASSANDRA-12700) + * Split consistent range movement flag correction (CASSANDRA-12786) + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979) +Merged from 2.1: + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) - * Fix RecoveryManagerTruncateTest (CASSANDRA-12802) * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --cc src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index 8ec9f4c,3ac777e..3b16e0b --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@@ -72,10 -72,10 +72,11 @@@ public class RangeSliceQueryPager exten protected List queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestExecutionException { -SliceQueryFilter sf = (SliceQueryFilter)columnFilter; +SliceQueryFilter rawFilter = (SliceQueryFilter)columnFilter; +SliceQueryFilter sf = rawFilter.withUpdatedCount(Math.min(rawFilter.count, pageSize)); AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -
[4/6] cassandra git commit: Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883)
Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5774d8e2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5774d8e2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5774d8e2 Branch: refs/heads/cassandra-3.X Commit: 5774d8e23556b09b11f9f756d93a619ae41a3630 Parents: 219f6ee Author: Benjamin LererAuthored: Wed Jan 11 21:23:48 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:23:48 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5774d8e2/conf/cassandra-env.ps1 -- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index f037b56..d3a0a87 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -198,42 +198,6 @@ Function CalculateHeapSizes } #- -Function SetJsr223Env -{ -$cp = $env:CLASSPATH -foreach ($jsrDir in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223") -{ -foreach ($file in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223\$jsrDir\*.jar") -{ -$file = $file -replace "\\", "/" -$cp = $cp + ";" + """$file""" -} -} -$env:CLASSPATH=$cp - -# JSR223/JRuby - set ruby lib directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\ruby") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djruby.lib=$env:CASSANDRA_HOME\lib\jsr223\jruby" -} -# JSR223/JRuby - set ruby JNI libraries root directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\jni") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djffi.boot.library.path=$env:CASSANDRA_HOME\lib\jsr223\jruby\jni" -} -# JSR223/Jython - set python.home system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jython\jython.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dpython.home=$env:CASSANDRA_HOME\lib\jsr223\jython" -} -# JSR223/Scala - necessary system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\scala\scala-compiler.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dscala.usejavacp=true" -} -} - -#- Function ParseJVMInfo { # grab info about the JVM @@ -317,7 +281,6 @@ Function SetCassandraEnvironment SetCassandraMain BuildClassPath -SetJsr223Env # Override these to set the amount of memory to allocate to the JVM at # start-up. For production use you may wish to adjust this for your
[6/6] cassandra git commit: Merge branch cassandra-3.11 into cassandra-3.X
Merge branch cassandra-3.11 into cassandra-3.X Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/3bcdbd66 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/3bcdbd66 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/3bcdbd66 Branch: refs/heads/cassandra-3.X Commit: 3bcdbd66fedd271323338af6302a133e9da3640c Parents: 0d81317 9c2ab25 Author: Benjamin LererAuthored: Wed Jan 11 21:29:40 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:29:55 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) --
[2/5] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Merge branch cassandra-2.1 into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b45cb104 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b45cb104 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b45cb104 Branch: refs/heads/cassandra-3.11 Commit: b45cb10445731fdef67b720ab216a038b9499928 Parents: 2acc15b 70e8b39 Author: Benjamin LererAuthored: Wed Jan 11 21:08:01 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:09:29 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/CHANGES.txt -- diff --cc CHANGES.txt index a7e89ed,414d6ed..4f769a1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,9 +1,34 @@@ -2.1.17 +2.2.9 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883) + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) + * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) + * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) + * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) + * Fix Util.spinAssertEquals (CASSANDRA-12283) + * Fix potential NPE for compactionstats (CASSANDRA-12462) + * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813) + * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754) + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) + * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-7) + * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) + * Fix merkle tree depth calculation (CASSANDRA-12580) + * Make Collections deserialization more robust (CASSANDRA-12618) + * Better handle invalid system roles table (CASSANDRA-12700) + * Split consistent range movement flag correction (CASSANDRA-12786) + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979) +Merged from 2.1: + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) - * Fix RecoveryManagerTruncateTest (CASSANDRA-12802) * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --cc src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index 8ec9f4c,3ac777e..3b16e0b --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@@ -72,10 -72,10 +72,11 @@@ public class RangeSliceQueryPager exten protected List queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestExecutionException { -SliceQueryFilter sf = (SliceQueryFilter)columnFilter; +SliceQueryFilter rawFilter = (SliceQueryFilter)columnFilter; +SliceQueryFilter sf = rawFilter.withUpdatedCount(Math.min(rawFilter.count, pageSize)); AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -
[4/5] cassandra git commit: Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883)
Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5774d8e2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5774d8e2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5774d8e2 Branch: refs/heads/cassandra-3.11 Commit: 5774d8e23556b09b11f9f756d93a619ae41a3630 Parents: 219f6ee Author: Benjamin LererAuthored: Wed Jan 11 21:23:48 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:23:48 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5774d8e2/conf/cassandra-env.ps1 -- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index f037b56..d3a0a87 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -198,42 +198,6 @@ Function CalculateHeapSizes } #- -Function SetJsr223Env -{ -$cp = $env:CLASSPATH -foreach ($jsrDir in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223") -{ -foreach ($file in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223\$jsrDir\*.jar") -{ -$file = $file -replace "\\", "/" -$cp = $cp + ";" + """$file""" -} -} -$env:CLASSPATH=$cp - -# JSR223/JRuby - set ruby lib directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\ruby") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djruby.lib=$env:CASSANDRA_HOME\lib\jsr223\jruby" -} -# JSR223/JRuby - set ruby JNI libraries root directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\jni") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djffi.boot.library.path=$env:CASSANDRA_HOME\lib\jsr223\jruby\jni" -} -# JSR223/Jython - set python.home system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jython\jython.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dpython.home=$env:CASSANDRA_HOME\lib\jsr223\jython" -} -# JSR223/Scala - necessary system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\scala\scala-compiler.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dscala.usejavacp=true" -} -} - -#- Function ParseJVMInfo { # grab info about the JVM @@ -317,7 +281,6 @@ Function SetCassandraEnvironment SetCassandraMain BuildClassPath -SetJsr223Env # Override these to set the amount of memory to allocate to the JVM at # start-up. For production use you may wish to adjust this for your
[1/5] cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/cassandra-3.11 1553d864b -> 9c2ab2555 Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/cassandra-3.11 Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[5/5] cassandra git commit: Merge branch cassandra-3.0 into cassandra-3.11
Merge branch cassandra-3.0 into cassandra-3.11 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/9c2ab255 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/9c2ab255 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/9c2ab255 Branch: refs/heads/cassandra-3.11 Commit: 9c2ab25556fad06a6a4d58f4bb652719a8a1bc27 Parents: 1553d86 5774d8e Author: Benjamin LererAuthored: Wed Jan 11 21:27:28 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:28:21 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/9c2ab255/conf/cassandra-env.ps1 --
[3/5] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0
Merge branch cassandra-2.2 into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/219f6ee8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/219f6ee8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/219f6ee8 Branch: refs/heads/cassandra-3.11 Commit: 219f6ee825f968420e34ed4e3ce0a7571495e975 Parents: 15b5280 b45cb10 Author: Benjamin LererAuthored: Wed Jan 11 21:11:15 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:11:22 2017 +0100 -- --
cassandra git commit: Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883)
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 219f6ee82 -> 5774d8e23 Removes SetJsr223Env from cassandra-env.ps1 (Follow up CASSANDRA-12883) Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/5774d8e2 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/5774d8e2 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/5774d8e2 Branch: refs/heads/cassandra-3.0 Commit: 5774d8e23556b09b11f9f756d93a619ae41a3630 Parents: 219f6ee Author: Benjamin LererAuthored: Wed Jan 11 21:23:48 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:23:48 2017 +0100 -- conf/cassandra-env.ps1 | 37 - 1 file changed, 37 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/5774d8e2/conf/cassandra-env.ps1 -- diff --git a/conf/cassandra-env.ps1 b/conf/cassandra-env.ps1 index f037b56..d3a0a87 100644 --- a/conf/cassandra-env.ps1 +++ b/conf/cassandra-env.ps1 @@ -198,42 +198,6 @@ Function CalculateHeapSizes } #- -Function SetJsr223Env -{ -$cp = $env:CLASSPATH -foreach ($jsrDir in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223") -{ -foreach ($file in Get-ChildItem -Path "$env:CASSANDRA_HOME\lib\jsr223\$jsrDir\*.jar") -{ -$file = $file -replace "\\", "/" -$cp = $cp + ";" + """$file""" -} -} -$env:CLASSPATH=$cp - -# JSR223/JRuby - set ruby lib directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\ruby") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djruby.lib=$env:CASSANDRA_HOME\lib\jsr223\jruby" -} -# JSR223/JRuby - set ruby JNI libraries root directory -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jruby\jni") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Djffi.boot.library.path=$env:CASSANDRA_HOME\lib\jsr223\jruby\jni" -} -# JSR223/Jython - set python.home system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\jython\jython.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dpython.home=$env:CASSANDRA_HOME\lib\jsr223\jython" -} -# JSR223/Scala - necessary system property -if (Test-Path "$env:CASSANDRA_HOME\lib\jsr223\scala\scala-compiler.jar") -{ -$env:CASSANDRA_PARAMS=$env:CASSANDRA_PARAMS + " -Dscala.usejavacp=true" -} -} - -#- Function ParseJVMInfo { # grab info about the JVM @@ -317,7 +281,6 @@ Function SetCassandraEnvironment SetCassandraMain BuildClassPath -SetJsr223Env # Override these to set the amount of memory to allocate to the JVM at # start-up. For production use you may wish to adjust this for your
[3/3] cassandra git commit: Merge branch cassandra-2.2 into cassandra-3.0
Merge branch cassandra-2.2 into cassandra-3.0 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/219f6ee8 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/219f6ee8 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/219f6ee8 Branch: refs/heads/cassandra-3.0 Commit: 219f6ee825f968420e34ed4e3ce0a7571495e975 Parents: 15b5280 b45cb10 Author: Benjamin LererAuthored: Wed Jan 11 21:11:15 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:11:22 2017 +0100 -- --
[1/3] cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/cassandra-3.0 15b52809f -> 219f6ee82 Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/cassandra-3.0 Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[2/3] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Merge branch cassandra-2.1 into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b45cb104 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b45cb104 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b45cb104 Branch: refs/heads/cassandra-3.0 Commit: b45cb10445731fdef67b720ab216a038b9499928 Parents: 2acc15b 70e8b39 Author: Benjamin LererAuthored: Wed Jan 11 21:08:01 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:09:29 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/CHANGES.txt -- diff --cc CHANGES.txt index a7e89ed,414d6ed..4f769a1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,9 +1,34 @@@ -2.1.17 +2.2.9 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883) + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) + * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) + * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) + * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) + * Fix Util.spinAssertEquals (CASSANDRA-12283) + * Fix potential NPE for compactionstats (CASSANDRA-12462) + * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813) + * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754) + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) + * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-7) + * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) + * Fix merkle tree depth calculation (CASSANDRA-12580) + * Make Collections deserialization more robust (CASSANDRA-12618) + * Better handle invalid system roles table (CASSANDRA-12700) + * Split consistent range movement flag correction (CASSANDRA-12786) + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979) +Merged from 2.1: + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) - * Fix RecoveryManagerTruncateTest (CASSANDRA-12802) * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --cc src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index 8ec9f4c,3ac777e..3b16e0b --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@@ -72,10 -72,10 +72,11 @@@ public class RangeSliceQueryPager exten protected List queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestExecutionException { -SliceQueryFilter sf = (SliceQueryFilter)columnFilter; +SliceQueryFilter rawFilter = (SliceQueryFilter)columnFilter; +SliceQueryFilter sf = rawFilter.withUpdatedCount(Math.min(rawFilter.count, pageSize)); AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -
[1/2] cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/cassandra-2.2 2acc15ba3 -> b45cb1044 Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/cassandra-2.2 Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[2/2] cassandra git commit: Merge branch cassandra-2.1 into cassandra-2.2
Merge branch cassandra-2.1 into cassandra-2.2 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/b45cb104 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/b45cb104 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/b45cb104 Branch: refs/heads/cassandra-2.2 Commit: b45cb10445731fdef67b720ab216a038b9499928 Parents: 2acc15b 70e8b39 Author: Benjamin LererAuthored: Wed Jan 11 21:08:01 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:09:29 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/CHANGES.txt -- diff --cc CHANGES.txt index a7e89ed,414d6ed..4f769a1 --- a/CHANGES.txt +++ b/CHANGES.txt @@@ -1,33 -1,9 +1,34 @@@ -2.1.17 +2.2.9 + * Remove support for non-JavaScript UDFs (CASSANDRA-12883) + * Fix DynamicEndpointSnitch noop in multi-datacenter situations (CASSANDRA-13074) + * cqlsh copy-from: encode column names to avoid primary key parsing errors (CASSANDRA-12909) + * Temporarily fix bug that creates commit log when running offline tools (CASSANDRA-8616) + * Reduce granuality of OpOrder.Group during index build (CASSANDRA-12796) + * Test bind parameters and unset parameters in InsertUpdateIfConditionTest (CASSANDRA-12980) + * Do not specify local address on outgoing connection when listen_on_broadcast_address is set (CASSANDRA-12673) + * Use saved tokens when setting local tokens on StorageService.joinRing (CASSANDRA-12935) + * cqlsh: fix DESC TYPES errors (CASSANDRA-12914) + * Fix leak on skipped SSTables in sstableupgrade (CASSANDRA-12899) + * Avoid blocking gossip during pending range calculation (CASSANDRA-12281) + * Fix purgeability of tombstones with max timestamp (CASSANDRA-12792) + * Fail repair if participant dies during sync or anticompaction (CASSANDRA-12901) + * cqlsh COPY: unprotected pk values before converting them if not using prepared statements (CASSANDRA-12863) + * Fix Util.spinAssertEquals (CASSANDRA-12283) + * Fix potential NPE for compactionstats (CASSANDRA-12462) + * Prepare legacy authenticate statement if credentials table initialised after node startup (CASSANDRA-12813) + * Change cassandra.wait_for_tracing_events_timeout_secs default to 0 (CASSANDRA-12754) + * Clean up permissions when a UDA is dropped (CASSANDRA-12720) + * Limit colUpdateTimeDelta histogram updates to reasonable deltas (CASSANDRA-7) + * Fix leak errors and execution rejected exceptions when draining (CASSANDRA-12457) + * Fix merkle tree depth calculation (CASSANDRA-12580) + * Make Collections deserialization more robust (CASSANDRA-12618) + * Better handle invalid system roles table (CASSANDRA-12700) + * Split consistent range movement flag correction (CASSANDRA-12786) + * CompactionTasks now correctly drops sstables out of compaction when not enough disk space is available (CASSANDRA-12979) +Merged from 2.1: + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) - * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) - * Fix RecoveryManagerTruncateTest (CASSANDRA-12802) * Don't skip sstables based on maxLocalDeletionTime (CASSANDRA-12765) http://git-wip-us.apache.org/repos/asf/cassandra/blob/b45cb104/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --cc src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index 8ec9f4c,3ac777e..3b16e0b --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@@ -72,10 -72,10 +72,11 @@@ public class RangeSliceQueryPager exten protected List queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestExecutionException { -SliceQueryFilter sf = (SliceQueryFilter)columnFilter; +SliceQueryFilter rawFilter = (SliceQueryFilter)columnFilter; +SliceQueryFilter sf = rawFilter.withUpdatedCount(Math.min(rawFilter.count, pageSize)); AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -
cassandra git commit: Fix paging for DISTINCT queries on partition keys and static columns
Repository: cassandra Updated Branches: refs/heads/cassandra-2.1 47f7d9c6a -> 70e8b39b0 Fix paging for DISTINCT queries on partition keys and static columns patch by Benjamin Lerer; reviewed by Tyler Hobbs for CASSANDRA-13017 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/70e8b39b Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/70e8b39b Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/70e8b39b Branch: refs/heads/cassandra-2.1 Commit: 70e8b39b021b0abae69009c4a034657e2518e09e Parents: 47f7d9c Author: Benjamin LererAuthored: Wed Jan 11 21:05:37 2017 +0100 Committer: Benjamin Lerer Committed: Wed Jan 11 21:05:37 2017 +0100 -- CHANGES.txt | 1 + .../org/apache/cassandra/service/pager/RangeSliceQueryPager.java | 3 ++- test/unit/org/apache/cassandra/service/QueryPagerTest.java| 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/CHANGES.txt -- diff --git a/CHANGES.txt b/CHANGES.txt index 23fd12a..414d6ed 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.17 + * Fix paging for DISTINCT queries on partition keys and static columns (CASSANDRA-13017) * Fix race causing infinite loop if Thrift server is stopped before it starts listening (CASSANDRA-12856) * cqlsh copy-from: sort user type fields in csv (CASSANDRA-12959) * Fix missed signal when commit log segments are recycled (CASSANDRA-13037) http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java -- diff --git a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java index caa146a..3ac777e 100644 --- a/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java +++ b/src/java/org/apache/cassandra/service/pager/RangeSliceQueryPager.java @@ -74,7 +74,8 @@ public class RangeSliceQueryPager extends AbstractQueryPager { SliceQueryFilter sf = (SliceQueryFilter)columnFilter; AbstractBounds keyRange = lastReturnedKey == null ? command.keyRange : makeIncludingKeyBounds(lastReturnedKey); -Composite start = lastReturnedName == null ? sf.start() : lastReturnedName; +// For DISTINCT queries we can and must ignore the lastReturnedName (see CASSANDRA-13017) +Composite start = lastReturnedName == null || isDistinct() ? sf.start() : lastReturnedName; PagedRangeCommand pageCmd = new PagedRangeCommand(command.keyspace, command.columnFamily, command.timestamp, http://git-wip-us.apache.org/repos/asf/cassandra/blob/70e8b39b/test/unit/org/apache/cassandra/service/QueryPagerTest.java -- diff --git a/test/unit/org/apache/cassandra/service/QueryPagerTest.java b/test/unit/org/apache/cassandra/service/QueryPagerTest.java index c78412f..1939c4a 100644 --- a/test/unit/org/apache/cassandra/service/QueryPagerTest.java +++ b/test/unit/org/apache/cassandra/service/QueryPagerTest.java @@ -146,7 +146,7 @@ public class QueryPagerTest extends SchemaLoader private static RangeSliceCommand rangeSliceQuery(AbstractBounds range, int count, String start, String end) { SliceQueryFilter filter = new SliceQueryFilter(CellNames.simpleDense(bytes(start)), CellNames.simpleDense(bytes(end)), false, Integer.MAX_VALUE); -return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, count); +return new RangeSliceCommand(KS, CF, System.currentTimeMillis(), filter, range, null, count, true, false); } private static void assertRow(Row r, String key, String... names)
[jira] [Commented] (CASSANDRA-10145) Change protocol to allow sending key space independent of query string
[ https://issues.apache.org/jira/browse/CASSANDRA-10145?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818965#comment-15818965 ] Joshua McKenzie commented on CASSANDRA-10145: - [~thobbs] - what's our status here? > Change protocol to allow sending key space independent of query string > -- > > Key: CASSANDRA-10145 > URL: https://issues.apache.org/jira/browse/CASSANDRA-10145 > Project: Cassandra > Issue Type: Improvement >Reporter: Vishy Kasar >Assignee: Sandeep Tamhankar > Fix For: 4.0 > > Attachments: 10145-trunk.txt > > > Currently keyspace is either embedded in the query string or set through "use > keyspace" on a connection by client driver. > There are practical use cases where client user has query and keyspace > independently. In order for that scenario to work, they will have to create > one client session per keyspace or have to resort to some string replace > hackery. > It will be nice if protocol allowed sending keyspace separately from the > query. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12888) Incremental repairs broken for MVs and CDC
[ https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818955#comment-15818955 ] Benjamin Roth commented on CASSANDRA-12888: --- Hi Victor, We use MVs in Production with billions of records without known data loss. Painful + slow refers to repairs and range movements (e.g. bootstrap + decommission). Also (as mentioned in this ticket) incremental repairs dont work, so full repair creates some overhead. Until 3.10 there are bugs leading to write timeouts, even to NPEs and completely blocked mutation stages. This could even bring your cluster down. In 3.10 some issues have been resolved - actually we use a patched trunk version which is 1-2 months old. Depending on your model, MVs can help a lot from a developer perspective. Some cases are very resource intensive to manage without MVs, requiring distributed locks and/or CAS. For append-only workloads, it may be simpler to NOT use MVs at the moment. They aren't very complex and MVs wont help that much compared to the problems that may raise with them. Painful scenarios: There is no recipe for that. You may or may not encounter performance issues, depending on your model and your workload. I'd recommend not to use MVs that use a different partition key on the MV than on the base table as this requires inter-node communication for EVERY write operation. So you can easily kill your cluster with bulk operations (like in streaming). At the moment our cluster runs stable but it took months to find all the bottlenecks, race conditions, resume from failures and so on. So my recommendation: You can get it work but you need time and you should not start with critical data, at least if it is not backed by another stable storage. And you should use 3.10 when it is finally released or build your own version from trunk. I would not recommend to use < 3.10 for MVs. Btw.: Our own patched version does some dirty tricks, that may lead to inconsistencies in some situations but we prefer some possible inconsistencies (we can deal with) over performance bottlenecks. I created several tickets to improve MV performance in some streaming situations but it will take some time to really improve that situation. Does this answer your question? -- Benjamin Roth Prokurist Jaumo GmbH · www.jaumo.com Wehrstraße 46 · 73035 Göppingen · Germany Phone +49 7161 304880-6 · Fax +49 7161 304880-1 AG Ulm · HRB 731058 · Managing Director: Jens Kammerer > Incremental repairs broken for MVs and CDC > -- > > Key: CASSANDRA-12888 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12888 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Stefan Podkowinski >Assignee: Benjamin Roth >Priority: Critical > Fix For: 3.0.x, 3.x > > > SSTables streamed during the repair process will first be written locally and > afterwards either simply added to the pool of existing sstables or, in case > of existing MVs or active CDC, replayed on mutation basis: > As described in {{StreamReceiveTask.OnCompletionRunnable}}: > {quote} > We have a special path for views and for CDC. > For views, since the view requires cleaning up any pre-existing state, we > must put all partitions through the same write path as normal mutations. This > also ensures any 2is are also updated. > For CDC-enabled tables, we want to ensure that the mutations are run through > the CommitLog so they can be archived by the CDC process on discard. > {quote} > Using the regular write path turns out to be an issue for incremental > repairs, as we loose the {{repaired_at}} state in the process. Eventually the > streamed rows will end up in the unrepaired set, in contrast to the rows on > the sender site moved to the repaired set. The next repair run will stream > the same data back again, causing rows to bounce on and on between nodes on > each repair. > See linked dtest on steps to reproduce. An example for reproducing this > manually using ccm can be found > [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12888) Incremental repairs broken for MVs and CDC
[ https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818832#comment-15818832 ] victor commented on CASSANDRA-12888: Hey Benjamin, thanks for your feedback. At least you refer to "slow" and "painful", but not "massive failure / data loss", right? ;) Still the measure on the complexity to handle is not clear to me. Is it more complex than handling "manually denormalized tables"? How much more and in which and in which aspects, if I may ask? I'm not a Cassandra expert, so I can't say I have deeper understanding of Tables than MVs. From what I interpret of your comment, MVs seem to be at least more complex to operate in a production cluster than normal tables. From a developer perspective, they are very appealing and remove some burden on the code. Are you aware of any description on how to deal with these "painful" scenarios? Thanks a lot! > Incremental repairs broken for MVs and CDC > -- > > Key: CASSANDRA-12888 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12888 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Stefan Podkowinski >Assignee: Benjamin Roth >Priority: Critical > Fix For: 3.0.x, 3.x > > > SSTables streamed during the repair process will first be written locally and > afterwards either simply added to the pool of existing sstables or, in case > of existing MVs or active CDC, replayed on mutation basis: > As described in {{StreamReceiveTask.OnCompletionRunnable}}: > {quote} > We have a special path for views and for CDC. > For views, since the view requires cleaning up any pre-existing state, we > must put all partitions through the same write path as normal mutations. This > also ensures any 2is are also updated. > For CDC-enabled tables, we want to ensure that the mutations are run through > the CommitLog so they can be archived by the CDC process on discard. > {quote} > Using the regular write path turns out to be an issue for incremental > repairs, as we loose the {{repaired_at}} state in the process. Eventually the > streamed rows will end up in the unrepaired set, in contrast to the rows on > the sender site moved to the repaired set. The next repair run will stream > the same data back again, causing rows to bounce on and on between nodes on > each repair. > See linked dtest on steps to reproduce. An example for reproducing this > manually using ccm can be found > [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13090) Coalescing strategy sleep too much and should be enabled by default
[ https://issues.apache.org/jira/browse/CASSANDRA-13090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ariel Weisberg updated CASSANDRA-13090: --- Summary: Coalescing strategy sleep too much and should be enabled by default (was: Coalescing strategy sleep too much) > Coalescing strategy sleep too much and should be enabled by default > --- > > Key: CASSANDRA-13090 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13090 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Corentin Chary > Fix For: 3.x > > Attachments: 0001-Fix-wait-time-coalescing-CASSANDRA-13090-2.patch, > 0001-Fix-wait-time-coalescing-CASSANDRA-13090.patch > > > With the current code maybeSleep is called even if we managed to take > maxItems out of the backlog. In this case we should really avoid sleeping > because it means that backlog is building up. > I'll send a patch shortly. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12888) Incremental repairs broken for MVs and CDC
[ https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818766#comment-15818766 ] Benjamin Roth commented on CASSANDRA-12888: --- It depends ;) there are known issues. Mostly related to repair and streaming. MV basically work and do what you expect of them. But maintenance jobs may be slow and or painful. So the good old saying is true: you can use them if you understand them and know what you are doing. But don't expect them to be like plug and play > Incremental repairs broken for MVs and CDC > -- > > Key: CASSANDRA-12888 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12888 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Stefan Podkowinski >Assignee: Benjamin Roth >Priority: Critical > Fix For: 3.0.x, 3.x > > > SSTables streamed during the repair process will first be written locally and > afterwards either simply added to the pool of existing sstables or, in case > of existing MVs or active CDC, replayed on mutation basis: > As described in {{StreamReceiveTask.OnCompletionRunnable}}: > {quote} > We have a special path for views and for CDC. > For views, since the view requires cleaning up any pre-existing state, we > must put all partitions through the same write path as normal mutations. This > also ensures any 2is are also updated. > For CDC-enabled tables, we want to ensure that the mutations are run through > the CommitLog so they can be archived by the CDC process on discard. > {quote} > Using the regular write path turns out to be an issue for incremental > repairs, as we loose the {{repaired_at}} state in the process. Eventually the > streamed rows will end up in the unrepaired set, in contrast to the rows on > the sender site moved to the repaired set. The next repair run will stream > the same data back again, causing rows to bounce on and on between nodes on > each repair. > See linked dtest on steps to reproduce. An example for reproducing this > manually using ccm can be found > [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-9425) Make node-local schema fully immutable
[ https://issues.apache.org/jira/browse/CASSANDRA-9425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818764#comment-15818764 ] Aleksey Yeschenko commented on CASSANDRA-9425: -- Thanks. I have incorporated both yours and Robert's changes, and rebased against most recent trunk. Rerunning the tests now. Will address your other suggestions once I get the current branch to green test state again. > Make node-local schema fully immutable > -- > > Key: CASSANDRA-9425 > URL: https://issues.apache.org/jira/browse/CASSANDRA-9425 > Project: Cassandra > Issue Type: Sub-task >Reporter: Aleksey Yeschenko >Assignee: Aleksey Yeschenko > Fix For: 4.0 > > > The way we handle schema changes currently is inherently racy. > All of our {{SchemaAlteringStatement}} s perform validation on a schema state > that's won't necessarily be there when the statement gets executed and > mutates schema. > We should make all the *Metadata classes ({{KeyspaceMetadata, > TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently > snapshottable, with a single top-level {{AtomicReference}} to the current > snapshot. Have DDL statements perform validation and transformation on the > same state. > In pseudo-code, think > {code} > public interface DDLStatement > { > /** > * Validates that the DDL statement can be applied to the provided schema > snapshot. > * > * @param schema snapshot of schema before executing CREATE KEYSPACE > */ > void validate(SchemaSnapshot schema); > > /** > * Applies the DDL statement to the provided schema snapshot. > * Implies that validate() has already been called on the provided > snapshot. > * > * @param schema snapshot of schema before executing the statement > * @return snapshot of schema as it would be after executing the statement > */ > SchemaSnapshot transform(SchemaSnapshot schema); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12653) In-flight shadow round requests
[ https://issues.apache.org/jira/browse/CASSANDRA-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joel Knighton updated CASSANDRA-12653: -- Fix Version/s: 4.x 3.x 3.0.x 2.2.x > In-flight shadow round requests > --- > > Key: CASSANDRA-12653 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12653 > Project: Cassandra > Issue Type: Bug > Components: Distributed Metadata >Reporter: Stefan Podkowinski >Assignee: Stefan Podkowinski >Priority: Minor > Fix For: 2.2.x, 3.0.x, 3.x, 4.x > > Attachments: 12653-2.2.patch, 12653-3.0.patch, 12653-trunk.patch > > > Bootstrapping or replacing a node in the cluster requires to gather and check > some host IDs or tokens by doing a gossip "shadow round" once before joining > the cluster. This is done by sending a gossip SYN to all seeds until we > receive a response with the cluster state, from where we can move on in the > bootstrap process. Receiving a response will call the shadow round done and > calls {{Gossiper.resetEndpointStateMap}} for cleaning up the received state > again. > The issue here is that at this point there might be other in-flight requests > and it's very likely that shadow round responses from other seeds will be > received afterwards, while the current state of the bootstrap process doesn't > expect this to happen (e.g. gossiper may or may not be enabled). > One side effect will be that MigrationTasks are spawned for each shadow round > reply except the first. Tasks might or might not execute based on whether at > execution time {{Gossiper.resetEndpointStateMap}} had been called, which > effects the outcome of {{FailureDetector.instance.isAlive(endpoint))}} at > start of the task. You'll see error log messages such as follows when this > happend: > {noformat} > INFO [SharedPool-Worker-1] 2016-09-08 08:36:39,255 Gossiper.java:993 - > InetAddress /xx.xx.xx.xx is now UP > ERROR [MigrationStage:1]2016-09-08 08:36:39,255 FailureDetector.java:223 > - unknown endpoint /xx.xx.xx.xx > {noformat} > Although is isn't pretty, I currently don't see any serious harm from this, > but it would be good to get a second opinion (feel free to close as "wont > fix"). > /cc [~Stefania] [~thobbs] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-12653) In-flight shadow round requests
[ https://issues.apache.org/jira/browse/CASSANDRA-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Joel Knighton updated CASSANDRA-12653: -- Status: Patch Available (was: Awaiting Feedback) > In-flight shadow round requests > --- > > Key: CASSANDRA-12653 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12653 > Project: Cassandra > Issue Type: Bug > Components: Distributed Metadata >Reporter: Stefan Podkowinski >Assignee: Stefan Podkowinski >Priority: Minor > Attachments: 12653-2.2.patch, 12653-3.0.patch, 12653-trunk.patch > > > Bootstrapping or replacing a node in the cluster requires to gather and check > some host IDs or tokens by doing a gossip "shadow round" once before joining > the cluster. This is done by sending a gossip SYN to all seeds until we > receive a response with the cluster state, from where we can move on in the > bootstrap process. Receiving a response will call the shadow round done and > calls {{Gossiper.resetEndpointStateMap}} for cleaning up the received state > again. > The issue here is that at this point there might be other in-flight requests > and it's very likely that shadow round responses from other seeds will be > received afterwards, while the current state of the bootstrap process doesn't > expect this to happen (e.g. gossiper may or may not be enabled). > One side effect will be that MigrationTasks are spawned for each shadow round > reply except the first. Tasks might or might not execute based on whether at > execution time {{Gossiper.resetEndpointStateMap}} had been called, which > effects the outcome of {{FailureDetector.instance.isAlive(endpoint))}} at > start of the task. You'll see error log messages such as follows when this > happend: > {noformat} > INFO [SharedPool-Worker-1] 2016-09-08 08:36:39,255 Gossiper.java:993 - > InetAddress /xx.xx.xx.xx is now UP > ERROR [MigrationStage:1]2016-09-08 08:36:39,255 FailureDetector.java:223 > - unknown endpoint /xx.xx.xx.xx > {noformat} > Although is isn't pretty, I currently don't see any serious harm from this, > but it would be good to get a second opinion (feel free to close as "wont > fix"). > /cc [~Stefania] [~thobbs] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12653) In-flight shadow round requests
[ https://issues.apache.org/jira/browse/CASSANDRA-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818707#comment-15818707 ] Joel Knighton commented on CASSANDRA-12653: --- Thanks for the quick response; I agree with all the points in your message. My gut instinct is to make the patch as small as possible since we agree that establishing a causal relationship or explicitly separating the shadow gossip round is the proper long-term solution, but the patch isn't particularly large either way, so I'll move forward with the the patch as proposed. I'll give the patches another review for any small fixes. > In-flight shadow round requests > --- > > Key: CASSANDRA-12653 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12653 > Project: Cassandra > Issue Type: Bug > Components: Distributed Metadata >Reporter: Stefan Podkowinski >Assignee: Stefan Podkowinski >Priority: Minor > Attachments: 12653-2.2.patch, 12653-3.0.patch, 12653-trunk.patch > > > Bootstrapping or replacing a node in the cluster requires to gather and check > some host IDs or tokens by doing a gossip "shadow round" once before joining > the cluster. This is done by sending a gossip SYN to all seeds until we > receive a response with the cluster state, from where we can move on in the > bootstrap process. Receiving a response will call the shadow round done and > calls {{Gossiper.resetEndpointStateMap}} for cleaning up the received state > again. > The issue here is that at this point there might be other in-flight requests > and it's very likely that shadow round responses from other seeds will be > received afterwards, while the current state of the bootstrap process doesn't > expect this to happen (e.g. gossiper may or may not be enabled). > One side effect will be that MigrationTasks are spawned for each shadow round > reply except the first. Tasks might or might not execute based on whether at > execution time {{Gossiper.resetEndpointStateMap}} had been called, which > effects the outcome of {{FailureDetector.instance.isAlive(endpoint))}} at > start of the task. You'll see error log messages such as follows when this > happend: > {noformat} > INFO [SharedPool-Worker-1] 2016-09-08 08:36:39,255 Gossiper.java:993 - > InetAddress /xx.xx.xx.xx is now UP > ERROR [MigrationStage:1]2016-09-08 08:36:39,255 FailureDetector.java:223 > - unknown endpoint /xx.xx.xx.xx > {noformat} > Although is isn't pretty, I currently don't see any serious harm from this, > but it would be good to get a second opinion (feel free to close as "wont > fix"). > /cc [~Stefania] [~thobbs] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12513) IOException (No such file or directory) closing MessagingService's server socket (locally)
[ https://issues.apache.org/jira/browse/CASSANDRA-12513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818693#comment-15818693 ] Robert Stupp commented on CASSANDRA-12513: -- What OS is this? > IOException (No such file or directory) closing MessagingService's server > socket (locally) > -- > > Key: CASSANDRA-12513 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12513 > Project: Cassandra > Issue Type: Bug >Reporter: Robert Stupp >Assignee: Robert Stupp >Priority: Minor > > _Sometimes_ the {{RemoveTest}} fails with the following exception. It's not > related to the test itself. > The exception is risen in > {{ServerSocketChannelImpl.implCloseSelectableChannel}} where it checks that a > thread ID is non-zero. The {{thread}} instance field is set inside its accept > and poll methods. It looks like this is caused by some race condition - i.e. > stopping in debugger at certain points prevents it from being triggered. > I could not find any misuse in the code base - but want to document this > issue. > No difference between 8u92 and 8u102 > {code} > INFO [ACCEPT-/127.0.0.1] 2016-08-22 08:35:16,606 ?:? - MessagingService has > terminated the accept() thread > java.io.IOError: java.io.IOException: No such file or directory > at > org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:914) > at org.apache.cassandra.service.RemoveTest.tearDown(RemoveTest.java:103) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) > at > org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) > at > org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:37) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) > at > org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:44) > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180) > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41) > at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173) > at > org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) > at > org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) > at org.junit.runners.ParentRunner.run(ParentRunner.java:220) > at org.junit.runner.JUnitCore.run(JUnitCore.java:159) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:117) > at > com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) > at > com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) > at > com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) > Caused by: java.io.IOException: No such file or directory > at sun.nio.ch.NativeThread.signal(Native Method) > at > sun.nio.ch.ServerSocketChannelImpl.implCloseSelectableChannel(ServerSocketChannelImpl.java:292) > at > java.nio.channels.spi.AbstractSelectableChannel.implCloseChannel(AbstractSelectableChannel.java:234) > at > java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:115) > at sun.nio.ch.ServerSocketAdaptor.close(ServerSocketAdaptor.java:137) > at > org.apache.cassandra.net.MessagingService$SocketThread.close(MessagingService.java:1249) > at > org.apache.cassandra.net.MessagingService.shutdown(MessagingService.java:904) > ... 22 more > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12888) Incremental repairs broken for MVs and CDC
[ https://issues.apache.org/jira/browse/CASSANDRA-12888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818684#comment-15818684 ] victor commented on CASSANDRA-12888: Hi guys, would you guys discourage using MVs until this is fixed? > Incremental repairs broken for MVs and CDC > -- > > Key: CASSANDRA-12888 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12888 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging >Reporter: Stefan Podkowinski >Assignee: Benjamin Roth >Priority: Critical > Fix For: 3.0.x, 3.x > > > SSTables streamed during the repair process will first be written locally and > afterwards either simply added to the pool of existing sstables or, in case > of existing MVs or active CDC, replayed on mutation basis: > As described in {{StreamReceiveTask.OnCompletionRunnable}}: > {quote} > We have a special path for views and for CDC. > For views, since the view requires cleaning up any pre-existing state, we > must put all partitions through the same write path as normal mutations. This > also ensures any 2is are also updated. > For CDC-enabled tables, we want to ensure that the mutations are run through > the CommitLog so they can be archived by the CDC process on discard. > {quote} > Using the regular write path turns out to be an issue for incremental > repairs, as we loose the {{repaired_at}} state in the process. Eventually the > streamed rows will end up in the unrepaired set, in contrast to the rows on > the sender site moved to the repaired set. The next repair run will stream > the same data back again, causing rows to bounce on and on between nodes on > each repair. > See linked dtest on steps to reproduce. An example for reproducing this > manually using ccm can be found > [here|https://gist.github.com/spodkowinski/2d8e0408516609c7ae701f2bf1e515e8] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13118) Cassandra Stress Tool HTML
Brett Kochendorfer created CASSANDRA-13118: -- Summary: Cassandra Stress Tool HTML Key: CASSANDRA-13118 URL: https://issues.apache.org/jira/browse/CASSANDRA-13118 Project: Cassandra Issue Type: Bug Components: Tools Reporter: Brett Kochendorfer Priority: Trivial They key names in the javascript for the stress tool html are incorrect based on the data generated. This is a very simple fix, I pushed up a branch with my change: https://github.com/bkochendorfer/cassandra/tree/fix_key_names https://github.com/bkochendorfer/cassandra/commit/0c1c0d7500850145cbb05753eae81c4869f9f999 Warm Regards, Brett -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12653) In-flight shadow round requests
[ https://issues.apache.org/jira/browse/CASSANDRA-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818621#comment-15818621 ] Stefan Podkowinski commented on CASSANDRA-12653: The firstSynSendAt value is only set while sending the first syn during regular gossip. All ACKs will be ignored that have been received and queued before that point. Please keep in mind that the first SYN is send by GossipTasks by using delayed execution, so it's not enough to simply check if the Gossiper has already been started. You are correct in pointing out that the timestamp of the incoming ACK will be a local nanoTime() value. In-flight ACKs triggered during the shadow round will not be filtered by the timestamp check unless already deserialized. But I'd prefer comparing local timestamps anyways, as they will not require some kind of clock skew tolerance, which would be hard to come up with given the kind of races we like to address. Also this shouldn't be a problem as, like you mentioned, the current handling of empty shadow round ACK replies should be safe. But it's not a very clean solution and I'd rather be able to either have a causal relationship to the corresponding SYN/Gossip round or even a custom ShadowGossipMessage type. But this is probably better taken care of in e.g. CASSANDRA-12345 instead of this bug fix. > In-flight shadow round requests > --- > > Key: CASSANDRA-12653 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12653 > Project: Cassandra > Issue Type: Bug > Components: Distributed Metadata >Reporter: Stefan Podkowinski >Assignee: Stefan Podkowinski >Priority: Minor > Attachments: 12653-2.2.patch, 12653-3.0.patch, 12653-trunk.patch > > > Bootstrapping or replacing a node in the cluster requires to gather and check > some host IDs or tokens by doing a gossip "shadow round" once before joining > the cluster. This is done by sending a gossip SYN to all seeds until we > receive a response with the cluster state, from where we can move on in the > bootstrap process. Receiving a response will call the shadow round done and > calls {{Gossiper.resetEndpointStateMap}} for cleaning up the received state > again. > The issue here is that at this point there might be other in-flight requests > and it's very likely that shadow round responses from other seeds will be > received afterwards, while the current state of the bootstrap process doesn't > expect this to happen (e.g. gossiper may or may not be enabled). > One side effect will be that MigrationTasks are spawned for each shadow round > reply except the first. Tasks might or might not execute based on whether at > execution time {{Gossiper.resetEndpointStateMap}} had been called, which > effects the outcome of {{FailureDetector.instance.isAlive(endpoint))}} at > start of the task. You'll see error log messages such as follows when this > happend: > {noformat} > INFO [SharedPool-Worker-1] 2016-09-08 08:36:39,255 Gossiper.java:993 - > InetAddress /xx.xx.xx.xx is now UP > ERROR [MigrationStage:1]2016-09-08 08:36:39,255 FailureDetector.java:223 > - unknown endpoint /xx.xx.xx.xx > {noformat} > Although is isn't pretty, I currently don't see any serious harm from this, > but it would be good to get a second opinion (feel free to close as "wont > fix"). > /cc [~Stefania] [~thobbs] -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-13117) Dump threads when unit test times out
[ https://issues.apache.org/jira/browse/CASSANDRA-13117?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcus Eriksson updated CASSANDRA-13117: Fix Version/s: 3.x 3.0.x Status: Patch Available (was: Open) https://github.com/krummas/cassandra/commits/marcuse/dumpthreadsjunit uses https://github.com/krummas/jstackjunit to execute {{jstack -l}} on timeout. Example output (Thread.sleep-induced timeout): https://gist.github.com/krummas/af6af79da739837f5509ae3dbb82758c > Dump threads when unit test times out > - > > Key: CASSANDRA-13117 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13117 > Project: Cassandra > Issue Type: Bug > Components: Testing >Reporter: Marcus Eriksson >Assignee: Marcus Eriksson >Priority: Minor > Fix For: 3.0.x, 3.x > > > It would be nice to get a thread dump when unit tests time out -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13117) Dump threads when unit test times out
Marcus Eriksson created CASSANDRA-13117: --- Summary: Dump threads when unit test times out Key: CASSANDRA-13117 URL: https://issues.apache.org/jira/browse/CASSANDRA-13117 Project: Cassandra Issue Type: Bug Components: Testing Reporter: Marcus Eriksson Assignee: Marcus Eriksson Priority: Minor It would be nice to get a thread dump when unit tests time out -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13020) Stuck in LEAVING state (Transferring all hints to null)
[ https://issues.apache.org/jira/browse/CASSANDRA-13020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818454#comment-15818454 ] Stefan Podkowinski commented on CASSANDRA-13020: Is your cluster hosted in EC2 or did you enable the prefer_local option in your cassandra-rackdc.properties? > Stuck in LEAVING state (Transferring all hints to null) > --- > > Key: CASSANDRA-13020 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13020 > Project: Cassandra > Issue Type: Bug > Components: Streaming and Messaging > Environment: v3.0.9 >Reporter: Aleksandr Ivanov > Labels: decommission, hints > > I tried to decommission one node. > Node sent all data to another node and got stuck in LEAVING state. > Log message shows Exception in HintsDispatcher thread. > Could it be reason of stuck in LEAVING state? > command output: > {noformat} > root@cas-node6:~# time nodetool decommission > error: null > -- StackTrace -- > java.lang.NullPointerException > at > java.util.concurrent.ConcurrentHashMap.replaceNode(ConcurrentHashMap.java:1106) > at > java.util.concurrent.ConcurrentHashMap.remove(ConcurrentHashMap.java:1097) > at > org.apache.cassandra.hints.HintsDispatchExecutor$DispatchHintsTask.run(HintsDispatchExecutor.java:203) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) > at > java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) > at > java.util.concurrent.ConcurrentHashMap$ValueSpliterator.forEachRemaining(ConcurrentHashMap.java:3566) > at > java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) > at > java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) > at > java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) > at > java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) > at > java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) > at > java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) > at > org.apache.cassandra.hints.HintsDispatchExecutor$TransferHintsTask.transfer(HintsDispatchExecutor.java:168) > at > org.apache.cassandra.hints.HintsDispatchExecutor$TransferHintsTask.run(HintsDispatchExecutor.java:141) > 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:1142) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at java.lang.Thread.run(Thread.java:745) > real147m7.483s > user0m17.388s > sys 0m1.968s > {noformat} > nodetool netstats: > {noformat} > root@cas-node6:~# nodetool netstats > Mode: LEAVING > Not sending any streams. > Read Repair Statistics: > Attempted: 35082 > Mismatch (Blocking): 18 > Mismatch (Background): 0 > Pool NameActive Pending Completed Dropped > Large messages n/a 1 0 0 > Small messages n/a 0 16109860 112 > Gossip messages n/a 0 287074 0 > {noformat} > Log: > {noformat} > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:52:59,467 > StorageService.java:1170 - LEAVING: sleeping 3 ms for batch processing > and pending range setup > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,455 > StorageService.java:1170 - LEAVING: replaying batch log and streaming data to > other nodes > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,910 > StreamResultFuture.java:87 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Executing streaming plan for Unbootstrap > INFO [StreamConnectionEstablisher:1] 2016-12-07 12:53:39,911 > StreamSession.java:239 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Starting streaming to /10.10.10.17 > INFO [StreamConnectionEstablisher:2] 2016-12-07 12:53:39,911 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [StreamConnectionEstablisher:3] 2016-12-07 12:53:39,912 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [StreamConnectionEstablisher:4] 2016-12-07 12:53:39,912 > StreamSession.java:232 - [Stream #2cc874c0-bc7c-11e6-b0df-e7f1ecd3dcfb] > Session does not have any tasks. > INFO [RMI TCP Connection(58)-127.0.0.1] 2016-12-07 12:53:39,912 > StorageService.java:1170 - LEAVING: streaming hints to other nodes > INFO [StreamConnectionEstablisher:2]
[jira] [Comment Edited] (CASSANDRA-13058) dtest failure in hintedhandoff_test.TestHintedHandoff.hintedhandoff_decom_test
[ https://issues.apache.org/jira/browse/CASSANDRA-13058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818371#comment-15818371 ] Stefan Podkowinski edited comment on CASSANDRA-13058 at 1/11/17 1:52 PM: - The test is passing because hint delivery is not resumable in 3.0 (CASSANDRA-6230). This has only been fixed lately in 3.10 (CASSANDRA-11960). As due to the missing reply messages addressed in the patch, node2 would never respond, while handling non-local hints. That will in turn cause all callbacks on node1 to time out and the HintDispatcher will retry hint delievery. At this point, the FailureDetector is correctly reporting the node as alive and the dispatch process will not be aborted but simply try to consume the next hints from a now empty iterator and terminate with a successful return value afterwards. The log file will contain a "Finished hinted handoff of file [].hints to endpoint []", which is technically correct, but is probably a bit misleading in case all writes just timed out. Even with the FailureDetector reporting the target node as unavailable and running into the ABORT case, we'd still get the Exception reported in CASSANDRA-11960. All things considered chances are high that hints will be lost in 3.0 in case of any errors during delivery. was (Author: spo...@gmail.com): The test is passing because hint delivery is not resumable in 3.0 (https://issues.apache.org/jira/browse/CASSANDRA-6230). This has only been fixed lately in 3.10 (CASSANDRA-11960). As due to the missing reply messages addressed in the patch, node2 would never respond, while handling non-local hints. That will in turn cause all callbacks on node1 to time out and the HintDispatcher will retry hint delievery. At this point, the FailureDetector is correctly reporting the node as alive and the dispatch process will not be aborted but simply try to consume the next hints from a now empty iterator and terminate with a successful return value afterwards. The log file will contain a "Finished hinted handoff of file [].hints to endpoint []", which is technically correct, but is probably a bit misleading in case all writes just timed out. Even with the FailureDetector reporting the target node as unavailable and running into the ABORT case, we'd still get the Exception reported in CASSANDRA-11960. All things considered chances are high that hints will be lost in 3.0 in case of any errors during delivery. > dtest failure in hintedhandoff_test.TestHintedHandoff.hintedhandoff_decom_test > -- > > Key: CASSANDRA-13058 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13058 > Project: Cassandra > Issue Type: Test > Components: Testing >Reporter: Sean McCarthy >Assignee: Stefan Podkowinski >Priority: Blocker > Labels: dtest, test-failure > Fix For: 3.10 > > Attachments: 13058-3.x.patch, node1.log, node1_debug.log, > node1_gc.log, node2.log, node2_debug.log, node2_gc.log, node3.log, > node3_debug.log, node3_gc.log, node4.log, node4_debug.log, node4_gc.log > > > example failure: > http://cassci.datastax.com/job/cassandra-3.X_novnode_dtest/16/testReport/hintedhandoff_test/TestHintedHandoff/hintedhandoff_decom_test/ > {code} > Error Message > Subprocess ['nodetool', '-h', 'localhost', '-p', '7100', ['decommission']] > exited with non-zero status; exit status: 2; > stderr: error: Error while decommissioning node: Failed to transfer all hints > to 59f20b4f-0215-4e18-be1b-7e00f2901629 > {code}{code} > Stacktrace > File "/usr/lib/python2.7/unittest/case.py", line 329, in run > testMethod() > File "/home/automaton/cassandra-dtest/hintedhandoff_test.py", line 167, in > hintedhandoff_decom_test > node1.decommission() > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 1314, in > decommission > self.nodetool("decommission") > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 783, in > nodetool > return handle_external_tool_process(p, ['nodetool', '-h', 'localhost', > '-p', str(self.jmx_port), cmd.split()]) > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 1993, in > handle_external_tool_process > raise ToolError(cmd_args, rc, out, err) > {code}{code} > java.lang.RuntimeException: Error while decommissioning node: Failed to > transfer all hints to 59f20b4f-0215-4e18-be1b-7e00f2901629 > at > org.apache.cassandra.service.StorageService.decommission(StorageService.java:3924) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at >
[jira] [Commented] (CASSANDRA-13058) dtest failure in hintedhandoff_test.TestHintedHandoff.hintedhandoff_decom_test
[ https://issues.apache.org/jira/browse/CASSANDRA-13058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15818371#comment-15818371 ] Stefan Podkowinski commented on CASSANDRA-13058: The test is passing because hint delivery is not resumable in 3.0 (https://issues.apache.org/jira/browse/CASSANDRA-6230). This has only been fixed lately in 3.10 (CASSANDRA-11960). As due to the missing reply messages addressed in the patch, node2 would never respond, while handling non-local hints. That will in turn cause all callbacks on node1 to time out and the HintDispatcher will retry hint delievery. At this point, the FailureDetector is correctly reporting the node as alive and the dispatch process will not be aborted but simply try to consume the next hints from a now empty iterator and terminate with a successful return value afterwards. The log file will contain a "Finished hinted handoff of file [].hints to endpoint []", which is technically correct, but is probably a bit misleading in case all writes just timed out. Even with the FailureDetector reporting the target node as unavailable and running into the ABORT case, we'd still get the Exception reported in CASSANDRA-11960. All things considered chances are high that hints will be lost in 3.0 in case of any errors during delivery. > dtest failure in hintedhandoff_test.TestHintedHandoff.hintedhandoff_decom_test > -- > > Key: CASSANDRA-13058 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13058 > Project: Cassandra > Issue Type: Test > Components: Testing >Reporter: Sean McCarthy >Assignee: Stefan Podkowinski >Priority: Blocker > Labels: dtest, test-failure > Fix For: 3.10 > > Attachments: 13058-3.x.patch, node1.log, node1_debug.log, > node1_gc.log, node2.log, node2_debug.log, node2_gc.log, node3.log, > node3_debug.log, node3_gc.log, node4.log, node4_debug.log, node4_gc.log > > > example failure: > http://cassci.datastax.com/job/cassandra-3.X_novnode_dtest/16/testReport/hintedhandoff_test/TestHintedHandoff/hintedhandoff_decom_test/ > {code} > Error Message > Subprocess ['nodetool', '-h', 'localhost', '-p', '7100', ['decommission']] > exited with non-zero status; exit status: 2; > stderr: error: Error while decommissioning node: Failed to transfer all hints > to 59f20b4f-0215-4e18-be1b-7e00f2901629 > {code}{code} > Stacktrace > File "/usr/lib/python2.7/unittest/case.py", line 329, in run > testMethod() > File "/home/automaton/cassandra-dtest/hintedhandoff_test.py", line 167, in > hintedhandoff_decom_test > node1.decommission() > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 1314, in > decommission > self.nodetool("decommission") > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 783, in > nodetool > return handle_external_tool_process(p, ['nodetool', '-h', 'localhost', > '-p', str(self.jmx_port), cmd.split()]) > File "/usr/local/lib/python2.7/dist-packages/ccmlib/node.py", line 1993, in > handle_external_tool_process > raise ToolError(cmd_args, rc, out, err) > {code}{code} > java.lang.RuntimeException: Error while decommissioning node: Failed to > transfer all hints to 59f20b4f-0215-4e18-be1b-7e00f2901629 > at > org.apache.cassandra.service.StorageService.decommission(StorageService.java:3924) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:275) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) > at > com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) > at > com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) > at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) > at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) > at > com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) > at >
[jira] [Comment Edited] (CASSANDRA-13115) Read repair is not blocking repair to finish in foreground repair
[ https://issues.apache.org/jira/browse/CASSANDRA-13115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15817856#comment-15817856 ] Romain Hardouin edited comment on CASSANDRA-13115 at 1/11/17 10:03 AM: --- I don't understand why you say it violates quorum reads, with RF=2 {{QUORUM == 2}} i.e. like {{ALL}}. But you read with {{ONE / LOCAL_ONE}} when doing {{7. query some data from node1}}, don't you? bq. This should trigger read repair. Background read repair because of CL {{ONE}}, right? Did you set {{dclocal_read_repair_chance/read_repair_chance = 1.0}}? was (Author: rha): I don't understand why you say it violates quorum reads, with RF=2 {{QUORUM == 2}} i.e. like {{ALL}}. You read with {{ONE / LOCAL_ONE}} when doing {{7. query some data from node1}}, don't you? bq. This should trigger read repair. Did you set {{dclocal_read_repair_chance/read_repair_chance = 1.0}}? > Read repair is not blocking repair to finish in foreground repair > - > > Key: CASSANDRA-13115 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13115 > Project: Cassandra > Issue Type: Bug > Environment: ccm on OSX >Reporter: Xiaolong Jiang > > The code trying to wait(block) for repair result to come back in 3.X is below: > {code:title= DataResolver.java|borderStyle=solid} > public void close() > { > try > { > FBUtilities.waitOnFutures(repairResults, > DatabaseDescriptor.getWriteRpcTimeout()); > } > catch (TimeoutException ex) > { > // We got all responses, but timed out while repairing > int blockFor = consistency.blockFor(keyspace); > if (Tracing.isTracing()) > Tracing.trace("Timed out while read-repairing after > receiving all {} data and digest responses", blockFor); > else > logger.debug("Timeout while read-repairing after > receiving all {} data and digest responses", blockFor); > throw new ReadTimeoutException(consistency, blockFor-1, > blockFor, true); > } > } > {code} > in DataResolver class, but this close method is never called and it's also > not auto close(RepairMergeListener is not extending from > AutoCloseable/CloseableIterator) which means we never wait for repair to > finish before returning final result. > The steps to reproduce: > 1. create some keyspace/table with RF = 2 > 2. start 2 nodes using ccm > 3. stop node2 > 4. disable node1 hinted hand off > 5. write some data to node1 with consistency level one > 6. start node2 > 7. query some data from node1 > This should trigger read repair. I put some log in above close method, and > can not see log print put. > So this bug will basically violate "monotonic quorum reads " guarantee. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-13115) Read repair is not blocking repair to finish in foreground repair
[ https://issues.apache.org/jira/browse/CASSANDRA-13115?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15817856#comment-15817856 ] Romain Hardouin commented on CASSANDRA-13115: - I don't understand why you say it violates quorum reads, with RF=2 {{QUORUM == 2}} i.e. like {{ALL}}. You read with {{ONE / LOCAL_ONE}} when doing {{7. query some data from node1}}, don't you? bq. This should trigger read repair. Did you set {{dclocal_read_repair_chance/read_repair_chance = 1.0}}? > Read repair is not blocking repair to finish in foreground repair > - > > Key: CASSANDRA-13115 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13115 > Project: Cassandra > Issue Type: Bug > Environment: ccm on OSX >Reporter: Xiaolong Jiang > > The code trying to wait(block) for repair result to come back in 3.X is below: > {code:title= DataResolver.java|borderStyle=solid} > public void close() > { > try > { > FBUtilities.waitOnFutures(repairResults, > DatabaseDescriptor.getWriteRpcTimeout()); > } > catch (TimeoutException ex) > { > // We got all responses, but timed out while repairing > int blockFor = consistency.blockFor(keyspace); > if (Tracing.isTracing()) > Tracing.trace("Timed out while read-repairing after > receiving all {} data and digest responses", blockFor); > else > logger.debug("Timeout while read-repairing after > receiving all {} data and digest responses", blockFor); > throw new ReadTimeoutException(consistency, blockFor-1, > blockFor, true); > } > } > {code} > in DataResolver class, but this close method is never called and it's also > not auto close(RepairMergeListener is not extending from > AutoCloseable/CloseableIterator) which means we never wait for repair to > finish before returning final result. > The steps to reproduce: > 1. create some keyspace/table with RF = 2 > 2. start 2 nodes using ccm > 3. stop node2 > 4. disable node1 hinted hand off > 5. write some data to node1 with consistency level one > 6. start node2 > 7. query some data from node1 > This should trigger read repair. I put some log in above close method, and > can not see log print put. > So this bug will basically violate "monotonic quorum reads " guarantee. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (CASSANDRA-13116) Don't allow changing the primary key from int to varint
[ https://issues.apache.org/jira/browse/CASSANDRA-13116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer resolved CASSANDRA-13116. Resolution: Duplicate {{ALTER TYPE}} can cause a lot of problems. The plan is to remove it in CASSANDRA-12443. > Don't allow changing the primary key from int to varint > --- > > Key: CASSANDRA-13116 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13116 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Tom van der Woerdt >Priority: Critical > > Simply put : > {code} > cqlsh> create table foo (id int primary key, value text); > [some inserts] > cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, > 16777216, 2147483647); > id | value > +--- > 1 | test > 128 | test > 256 | test > 65535 | test > 65536 | test >16777215 | test >16777216 | test > 2147483647 | test > (8 rows) > cqlsh> alter table foo alter id TYPE varint; > cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, > 16777216, 2147483647); > id | value > +--- >16777215 | test >16777216 | test > 2147483647 | test > (3 rows) > cqlsh> select * from foo; > id | value > +--- > 128 | test >16777216 | test > 1 | test > 2147483647 | test >16777215 | test > 256 | test > 65535 | test > 65536 | test > {code} > This could really ruin someone's day... -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Assigned] (CASSANDRA-13111) Unsupported unset value for column
[ https://issues.apache.org/jira/browse/CASSANDRA-13111?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Benjamin Lerer reassigned CASSANDRA-13111: -- Assignee: Benjamin Lerer > Unsupported unset value for column > -- > > Key: CASSANDRA-13111 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13111 > Project: Cassandra > Issue Type: Bug > Components: CQL > Environment: Ubuntu 16.04 >Reporter: Alexander Nabatchikov >Assignee: Benjamin Lerer >Priority: Minor > > I have table like this: > create table test_table > ( > pkey1 int, > pkey2 int, > pkey3 int, > ccol1 int, > ccol2 int, > col int, > PRIMARY KEY ((pkey1,pkey2,pkey3), ccol1, ccol2) > ); > And this CQL won't work: > SELECT * FROM test_table WHERE pkey1 = ? AND pkey2 = ? AND pkey3 = ? AND > ccol1 = ? AND col = ? ALLOW FILTERING; > It throws message: Unsupported unset value for column col. > But if execute just: "SELECT * FROM test_table WHERE col = ? ALLOW > FILTERING;" all is OK. > P.S reproduces only with prepared statements -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (CASSANDRA-12203) AssertionError on compaction after upgrade (2.1.9 -> 3.7)
[ https://issues.apache.org/jira/browse/CASSANDRA-12203?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15817798#comment-15817798 ] Sylvain Lebresne commented on CASSANDRA-12203: -- Actually, wait, I think I got that whole logic wrong more than we though and the patch don't fully fix it. As said above, the assertion is a sanity check that we have {{!hasClosingMarkerBefore(tombstone))}} since that's a state assumption of this {{openNew()}} method. However, {noformat} !hasClosingMarkerBefore(tombstone)) == openTombstones.isEmpty() || !comparator.compare(openTombstones.first().stop.bound, tombstone.clustering()) < 0 {noformat} and as we're in a branch where we know {{!openTombstones.isEmpty()}}, then {noformat} !hasClosingMarkerBefore(tombstone)) == !comparator.compare(openTombstones.first().stop.bound, tombstone.clustering()) < 0 == comparator.compare(openTombstones.first().stop.bound, tombstone.clustering()) >= 0 == comparator.compare(tombstone.clustering(), openTombstones.first().stop.bound) <= 0 {noformat} So, knowing that {{tombstone.clustering()}} above is equal to {{tombstone.start.bound}} in practice, the assertion in {{openNew}} this ticket is concerned above should be: {noformat} assert metadata.comparator.compare(tombstone.start.bound, first.stop.bound) <= 0; {noformat} and not {noformat} assert metadata.comparator.compare(tombstone.start.bound, first.stop.bound) > 0; {noformat} as is currently the case, nor even {noformat} assert metadata.comparator.compare(tombstone.start.bound, first.stop.bound) >= 0; {noformat} as the patch above changes it. > AssertionError on compaction after upgrade (2.1.9 -> 3.7) > - > > Key: CASSANDRA-12203 > URL: https://issues.apache.org/jira/browse/CASSANDRA-12203 > Project: Cassandra > Issue Type: Bug > Components: Core > Environment: Cassandra 3.7 (upgrade from 2.1.9) > Java version "1.8.0_91" > Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-83-generic x86_64) >Reporter: Roman S. Borschel >Assignee: Yuki Morishita >Priority: Critical > Fix For: 3.0.x, 3.x > > > After upgrading a Cassandra cluster from 2.1.9 to 3.7, one column family > (using SizeTieredCompaction) repeatedly and continuously failed compaction > (and thus also repair) across the cluster, with all nodes producing the > following errors in the logs: > {noformat} > 016-07-14T09:29:47.96855 |srv=cassandra|ERROR: Exception in thread > Thread[CompactionExecutor:3,1,main] > 2016-07-14T09:29:47.96858 |srv=cassandra|java.lang.AssertionError: null > 2016-07-14T09:29:47.96859 |srv=cassandra| at > org.apache.cassandra.db.UnfilteredDeserializer$OldFormatDeserializer$TombstoneTracker.openNew(UnfilteredDeserializer.java:650) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96860 |srv=cassandra| at > org.apache.cassandra.db.UnfilteredDeserializer$OldFormatDeserializer$UnfilteredIterator.hasNext(UnfilteredDeserializer.java:423) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96860 |srv=cassandra| at > org.apache.cassandra.db.UnfilteredDeserializer$OldFormatDeserializer.hasNext(UnfilteredDeserializer.java:298) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96860 |srv=cassandra| at > org.apache.cassandra.io.sstable.SSTableSimpleIterator$OldFormatIterator.readStaticRow(SSTableSimpleIterator.java:133) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96861 |srv=cassandra| at > org.apache.cassandra.io.sstable.SSTableIdentityIterator.(SSTableIdentityIterator.java:57) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96861 |srv=cassandra| at > org.apache.cassandra.io.sstable.format.big.BigTableScanner$KeyScanningIterator$1.initializeIterator(BigTableScanner.java:334) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96862 |srv=cassandra| at > org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.maybeInit(LazilyInitializedUnfilteredRowIterator.java:48) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96862 |srv=cassandra| at > org.apache.cassandra.db.rows.LazilyInitializedUnfilteredRowIterator.isReverseOrder(LazilyInitializedUnfilteredRowIterator.java:70) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96863 |srv=cassandra| at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$1.reduce(UnfilteredPartitionIterators.java:109) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96863 |srv=cassandra| at > org.apache.cassandra.db.partitions.UnfilteredPartitionIterators$1.reduce(UnfilteredPartitionIterators.java:100) > ~[apache-cassandra-3.7.jar:3.7] > 2016-07-14T09:29:47.96864 |srv=cassandra| at >
[jira] [Updated] (CASSANDRA-13116) Don't allow changing the primary key from int to varint
[ https://issues.apache.org/jira/browse/CASSANDRA-13116?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tom van der Woerdt updated CASSANDRA-13116: --- Description: Simply put : {code} cqlsh> create table foo (id int primary key, value text); [some inserts] cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 1 | test 128 | test 256 | test 65535 | test 65536 | test 16777215 | test 16777216 | test 2147483647 | test (8 rows) cqlsh> alter table foo alter id TYPE varint; cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 16777215 | test 16777216 | test 2147483647 | test (3 rows) cqlsh> select * from foo; id | value +--- 128 | test 16777216 | test 1 | test 2147483647 | test 16777215 | test 256 | test 65535 | test 65536 | test {code} This could really ruin someone's day... was: Simply put : {code} cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 1 | test 128 | test 256 | test 65535 | test 65536 | test 16777215 | test 16777216 | test 2147483647 | test (8 rows) cqlsh> alter table foo alter id TYPE varint; cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 16777215 | test 16777216 | test 2147483647 | test (3 rows) cqlsh> select * from foo; id | value +--- 128 | test 16777216 | test 1 | test 2147483647 | test 16777215 | test 256 | test 65535 | test 65536 | test {code} This could really ruin someone's day... > Don't allow changing the primary key from int to varint > --- > > Key: CASSANDRA-13116 > URL: https://issues.apache.org/jira/browse/CASSANDRA-13116 > Project: Cassandra > Issue Type: Bug > Components: Core >Reporter: Tom van der Woerdt >Priority: Critical > > Simply put : > {code} > cqlsh> create table foo (id int primary key, value text); > [some inserts] > cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, > 16777216, 2147483647); > id | value > +--- > 1 | test > 128 | test > 256 | test > 65535 | test > 65536 | test >16777215 | test >16777216 | test > 2147483647 | test > (8 rows) > cqlsh> alter table foo alter id TYPE varint; > cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, > 16777216, 2147483647); > id | value > +--- >16777215 | test >16777216 | test > 2147483647 | test > (3 rows) > cqlsh> select * from foo; > id | value > +--- > 128 | test >16777216 | test > 1 | test > 2147483647 | test >16777215 | test > 256 | test > 65535 | test > 65536 | test > {code} > This could really ruin someone's day... -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (CASSANDRA-13116) Don't allow changing the primary key from int to varint
Tom van der Woerdt created CASSANDRA-13116: -- Summary: Don't allow changing the primary key from int to varint Key: CASSANDRA-13116 URL: https://issues.apache.org/jira/browse/CASSANDRA-13116 Project: Cassandra Issue Type: Bug Components: Core Reporter: Tom van der Woerdt Priority: Critical Simply put : {code} cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 1 | test 128 | test 256 | test 65535 | test 65536 | test 16777215 | test 16777216 | test 2147483647 | test (8 rows) cqlsh> alter table foo alter id TYPE varint; cqlsh> select * from foo where id in (1, 128, 256, 65535, 65536, 16777215, 16777216, 2147483647); id | value +--- 16777215 | test 16777216 | test 2147483647 | test (3 rows) cqlsh> select * from foo; id | value +--- 128 | test 16777216 | test 1 | test 2147483647 | test 16777215 | test 256 | test 65535 | test 65536 | test {code} This could really ruin someone's day... -- This message was sent by Atlassian JIRA (v6.3.4#6332)