[jira] [Comment Edited] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread David Capwell (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085332#comment-17085332
 ] 

David Capwell edited comment on CASSANDRA-15737 at 4/17/20, 12:28 AM:
--

Since you said it, a test would be good =), though don't need to be in-jvm 
dtest as this could be done in a unit test (in-jvm doesn't support jmx so you 
would just be calling the function, which you can do in a normal test).


was (Author: dcapwell):
Since you said it, a test would be good =)

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread David Capwell (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085332#comment-17085332
 ] 

David Capwell commented on CASSANDRA-15737:
---

Since you said it, a test would be good =)

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread David Capwell (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085329#comment-17085329
 ] 

David Capwell commented on CASSANDRA-15737:
---

Patch LGTM, [~jrwest] can you link a build?  I am +1, but will also run the 
build.

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread David Capwell (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Capwell updated CASSANDRA-15737:
--
Reviewers: David Capwell, David Capwell  (was: David Capwell)
   David Capwell, David Capwell
   Status: Review In Progress  (was: Patch Available)

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15733) jvm dtest builder should be provided to the factory and expose state

2020-04-16 Thread David Capwell (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085300#comment-17085300
 ] 

David Capwell commented on CASSANDRA-15733:
---

fixed 2 of the comments and replied back to the other one about where configs 
should be generated.

> jvm dtest builder should be provided to the factory and expose state
> 
>
> Key: CASSANDRA-15733
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15733
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Test/dtest
>Reporter: David Capwell
>Assignee: David Capwell
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> Currently the builder is rather heavy and creates configs plus call the 
> factory with specific fields only, this isn’t that flexible and makes it 
> harder to have custom cluster definitions which require additional fields to 
> be defined.  To solve this we should make the builder be sent to the factory 
> and expose the state so the factory can get all the fields it needs, the 
> factory should also be in charge of creating the configs



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14825) Expose table schema for drivers

2020-04-16 Thread Dinesh Joshi (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dinesh Joshi updated CASSANDRA-14825:
-
Reviewers: Benjamin Lerer, Dinesh Joshi  (was: Benjamin Lerer)

> Expose table schema for drivers
> ---
>
> Key: CASSANDRA-14825
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14825
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Legacy/CQL
>Reporter: Chris Lohfink
>Assignee: Robert Stupp
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0
>
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> Currently the drivers recreate the CQL for the tables by putting together the 
> system table values. This is very difficult to keep up to date and buggy 
> enough that its only even supported in Java and Python drivers. Cassandra 
> already has some limited output available for snapshots that we could provide 
> in a virtual table or new query that the drivers can fetch. This can greatly 
> reduce the complexity of drivers while also reducing bugs like 
> CASSANDRA-14822 as the underlying schema and properties change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15690) Single partition queries can mistakenly omit partition deletions and resurrect data

2020-04-16 Thread Sam Tunnicliffe (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Tunnicliffe updated CASSANDRA-15690:

  Since Version: 3.0 alpha 1
Source Control Link: 
https://github.com/apache/cassandra/commit/092915ad19d25c1ba93f7968210b88fb6e4b9180
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Thanks, committed to 3.0 in {{092915ad19d25c1ba93f7968210b88fb6e4b9180}} and 
merged to 3.11 and trunk.

> Single partition queries can mistakenly omit partition deletions and 
> resurrect data
> ---
>
> Key: CASSANDRA-15690
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15690
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Coordination
>Reporter: Aleksey Yeschenko
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0-alpha
>
>
> We have logic that allows us to exclude sstables with partition deletions 
> that are older than the minimum collected timestamp in a local request. 
> However, it’s possible that another node could have rows that aren’t known to 
> the local node that are in turn older than the excluded partition deletion. 
> In such a scenario, those will be mistakenly resurrected, which is a 
> correctness issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15601) Ensure repaired data tracking reads a consistent amount of data across replicas

2020-04-16 Thread Sam Tunnicliffe (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sam Tunnicliffe updated CASSANDRA-15601:

  Since Version: 4.0-alpha
Source Control Link: 
https://github.com/apache/cassandra/commit/a8e7cfbc0e146ea82154654ba43b613b058f99d1
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Thanks, committed to trunk in {{a8e7cfbc0e146ea82154654ba43b613b058f99d1}}

> Ensure repaired data tracking reads a consistent amount of data across 
> replicas
> ---
>
> Key: CASSANDRA-15601
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15601
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Repair
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> When generating a digest for repaired data tracking, the amount of repaired 
> data that needs to be read may depend on the unrepaired data on the replica. 
> As this may vary between replicas, digest mismatches can be reported even 
> though the repaired data may actually be in sync.
> For example, two replicas, A & B and a table like
> {code}
> CREATE TABLE t  (pk int, ck int, PRIMARY KEY (pk, ck)) WITH CLUSTERING ORDER 
> BY ck DESC; 
> Unrepaired
> ===
> Instance A
> (0, 5)
> Instance B
> (0, 6)
> (0, 5)
> Repaired (Both A & B)
> =
> (0, 4)
> (0, 3)
> (0, 2)
> (0, 1)
> (0, 0)
> SELECT * FROM tbl WHERE pk = 0 LIMIT 3;
> {code}
> Instance A would read (0, 5) from the unrepaired set and (0, 4) (0, 3) from 
> the repaired set. 
>  Instance B would read (0, 6) (0, 5) from its unrepaired set and just (0, 4) 
> from repaired data.
> Unrepaired row/range/partition tombstones shadowing repaired data and present 
> on some replicas but not others will have the opposite effect, with more 
> repaired data being read in comparison.
>  To fix this, when repaired data tracking is in effect each replica needs to 
> overread during a full data read. Replicas should read up to {{LIMIT}} (i.e. 
> the {{DataLimit}} of the {{ReadCommand}}) from the repaired set, regardless 
> of how much is read from the unrepaired data. At the point where that amount 
> of repaired data has been read, replica should stop updating the digest. So 
> if unrepaired tombstones cause more than {{LIMIT}} repaired data to be read, 
> the digest is only calculated over the first {{LIMIT}}-worth of repaired data.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] 01/02: Merge branch 'cassandra-3.11' into trunk

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit b3ecbf38a3b9bd7dbcafb5caccacda4bc7d356a0
Merge: 781e486 d6beb01
Author: Sam Tunnicliffe 
AuthorDate: Thu Apr 16 18:29:05 2020 +0100

Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt|   1 +
 src/java/org/apache/cassandra/config/Config.java   |   6 +
 .../cassandra/config/DatabaseDescriptor.java   |  10 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  83 +++---
 .../apache/cassandra/repair/RepairRunnable.java|  76 +-
 .../cassandra/service/SnapshotVerbHandler.java |  67 +
 .../org/apache/cassandra/service/StorageProxy.java |  18 ++
 .../cassandra/service/StorageProxyMBean.java   |   4 +
 .../cassandra/service/reads/DataResolver.java  |   2 +-
 .../service/reads/repair/RepairedDataVerifier.java |  80 +-
 .../distributed/test/PreviewRepairTest.java| 106 +++-
 .../distributed/test/RepairDigestTrackingTest.java | 285 ++---
 .../distributed/test/SimpleReadWriteTest.java  | 101 
 .../reads/repair/RepairedDataVerifierTest.java |   4 +-
 14 files changed, 697 insertions(+), 146 deletions(-)

diff --cc CHANGES.txt
index 8f19c2a,dbdb779..96eeed4
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,53 -1,9 +1,54 @@@
 -3.11.7
 +4.0-alpha4
 + * Fix CQLSH to avoid arguments being evaluated (CASSANDRA-15660)
 + * Correct Visibility and Improve Safety of Methods in LatencyMetrics 
(CASSANDRA-15597)
 + * Allow cqlsh to run with Python2.7/Python3.6+ 
(CASSANDRA-15659,CASSANDRA-15573)
 + * Improve logging around incremental repair (CASSANDRA-15599)
 + * Do not check cdc_raw_directory filesystem space if CDC disabled 
(CASSANDRA-15688)
 + * Replace array iterators with get by index (CASSANDRA-15394)
 + * Minimize BTree iterator allocations (CASSANDRA-15389)
 + * Add client request size server metrics (CASSANDRA-15704)
 + * Add additional logging around FileUtils and compaction leftover cleanup 
(CASSANDRA-15705)
 + * Mark system_views/system_virtual_schema as non-alterable keyspaces in 
cqlsh (CASSANDRA-15711)
 + * Fail incremental repair if an old version sstable is involved 
(CASSANDRA-15612)
 + * Fix overflows on StreamingTombstoneHistogramBuilder produced by large 
deletion times (CASSANDRA-14773)
 + * Mark system_views/system_virtual_schema as system keyspaces in cqlsh 
(CASSANDRA-15706)
 + * Avoid unnecessary collection/iterator allocations during btree 
construction (CASSANDRA-15390)
 + * Repair history tables should have TTL and TWCS (CASSANDRA-12701)
 + * Fix cqlsh erroring out on Python 3.7 due to webbrowser module being absent 
(CASSANDRA-15572)
 + * Fix IMH#acquireCapacity() to return correct Outcome when endpoint reserve 
runs out (CASSANDRA-15607)
 + * Fix nodetool describering output (CASSANDRA-15682)
 + * Only track ideal CL failure when request CL met (CASSANDRA-15696)
 + * Fix flaky CoordinatorMessagingTest and docstring in OutboundSink and 
ConsistentSession (CASSANDRA-15672)
 + * Fix force compaction of wrapping ranges (CASSANDRA-15664)
 + * Expose repair streaming metrics (CASSANDRA-15656)
 + * Set now in seconds in the future for validation repairs (CASSANDRA-15655)
 + * Emit metric on preview repair failure (CASSANDRA-15654)
 + * Use more appropriate logging levels (CASSANDRA-15661)
 + * Fixed empty check in TrieMemIndex due to potential state inconsistency in 
ConcurrentSkipListMap (CASSANDRA-15526)
 + * Added UnleveledSSTables global and table level metric (CASSANDRA-15620)
 + * Added Virtual Table exposing Cassandra relevant system properties 
(CASSANDRA-15616, CASSANDRA-15643)
 + * Improve the algorithmic token allocation in case racks = RF 
(CASSANDRA-15600)
 + * Fix ConnectionTest.testAcquireReleaseOutbound (CASSANDRA-15308)
 + * Include finalized pending sstables in preview repair (CASSANDRA-15553)
 + * Reverted to the original behavior of CLUSTERING ORDER on CREATE TABLE 
(CASSANDRA-15271)
 + * Correct inaccurate logging message (CASSANDRA-15549)
 + * Unset GREP_OPTIONS (CASSANDRA-14487)
 + * Update to Python driver 3.21 for cqlsh (CASSANDRA-14872)
 + * Fix missing Keyspaces in cqlsh describe output (CASSANDRA-15576)
 + * Fix multi DC nodetool status output (CASSANDRA-15305)
 + * updateCoordinatorWriteLatencyTableMetric can produce misleading metrics 
(CASSANDRA-15569)
 + * Make cqlsh and cqlshlib Python 2 & 3 compatible (CASSANDRA-10190)
 + * Improve the description of nodetool listsnapshots command (CASSANDRA-14587)
 + * allow embedded cassandra launched from a one-jar or uno-jar 
(CASSANDRA-15494)
 + * Update hppc library to version 0.8.1 (CASSANDRA-12995)
 + * Limit the dependencies used by UDFs/UDAs (CASSANDRA-14737)
 + * Make native_transport_max_concurrent_requests_in_bytes updatable 
(CASSANDRA-15519)
 + * Cleanup and improvements to IndexInfo/ColumnIndex (CASSANDRA-15469)
 + * Potential 

[cassandra] 02/02: Ensure repaired data tracking reads a consistent amount of data across replicas

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit a8e7cfbc0e146ea82154654ba43b613b058f99d1
Author: Sam Tunnicliffe 
AuthorDate: Tue Feb 11 09:59:31 2020 +

Ensure repaired data tracking reads a consistent amount of data across 
replicas

Patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for CASSANDRA-15601
---
 CHANGES.txt|   1 +
 src/java/org/apache/cassandra/db/ReadCommand.java  | 310 ---
 .../org/apache/cassandra/db/RepairedDataInfo.java  | 336 +
 .../apache/cassandra/metrics/KeyspaceMetrics.java  |  12 +
 .../org/apache/cassandra/metrics/TableMetrics.java |  18 +-
 .../distributed/test/RepairDigestTrackingTest.java | 169 ++-
 .../org/apache/cassandra/db/ReadCommandTest.java   | 120 +++-
 .../apache/cassandra/db/RepairedDataInfoTest.java  | 303 +++
 8 files changed, 1003 insertions(+), 266 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 96eeed4..4586c71 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0-alpha4
+ * Ensure repaired data tracking reads a consistent amount of data across 
replicas (CASSANDRA-15601)
  * Fix CQLSH to avoid arguments being evaluated (CASSANDRA-15660)
  * Correct Visibility and Improve Safety of Methods in LatencyMetrics 
(CASSANDRA-15597)
  * Allow cqlsh to run with Python2.7/Python3.6+ 
(CASSANDRA-15659,CASSANDRA-15573)
diff --git a/src/java/org/apache/cassandra/db/ReadCommand.java 
b/src/java/org/apache/cassandra/db/ReadCommand.java
index 4f8ea3e..4c4c833 100644
--- a/src/java/org/apache/cassandra/db/ReadCommand.java
+++ b/src/java/org/apache/cassandra/db/ReadCommand.java
@@ -23,6 +23,7 @@ import java.util.*;
 import java.util.concurrent.TimeUnit;
 import java.util.function.BiFunction;
 import java.util.function.LongPredicate;
+import java.util.function.Function;
 
 import javax.annotation.Nullable;
 
@@ -62,12 +63,12 @@ import org.apache.cassandra.schema.TableMetadata;
 import org.apache.cassandra.service.ActiveRepairService;
 import org.apache.cassandra.service.ClientWarn;
 import org.apache.cassandra.tracing.Tracing;
-import org.apache.cassandra.utils.ByteBufferUtil;
 import org.apache.cassandra.utils.FBUtilities;
 
 import static com.google.common.collect.Iterables.any;
 import static com.google.common.collect.Iterables.filter;
 import static org.apache.cassandra.utils.MonotonicClock.approxTime;
+import static 
org.apache.cassandra.db.partitions.UnfilteredPartitionIterators.MergeListener.NOOP;
 
 /**
  * General interface for storage-engine read commands (common to both range and
@@ -91,17 +92,7 @@ public abstract class ReadCommand extends AbstractReadQuery
 // for data queries, coordinators may request information on the repaired 
data used in constructing the response
 private boolean trackRepairedStatus = false;
 // tracker for repaired data, initialized to singleton null object
-private static final RepairedDataInfo NULL_REPAIRED_DATA_INFO = new 
RepairedDataInfo()
-{
-void trackPartitionKey(DecoratedKey key){}
-void trackDeletion(DeletionTime deletion){}
-void trackRangeTombstoneMarker(RangeTombstoneMarker marker){}
-void trackRow(Row row){}
-boolean isConclusive(){ return true; }
-ByteBuffer getDigest(){ return ByteBufferUtil.EMPTY_BYTE_BUFFER; }
-};
-
-private RepairedDataInfo repairedDataInfo = NULL_REPAIRED_DATA_INFO;
+private RepairedDataInfo repairedDataInfo = 
RepairedDataInfo.NULL_REPAIRED_DATA_INFO;
 
 int oldestUnrepairedTombstone = Integer.MAX_VALUE;
 
@@ -450,7 +441,13 @@ public abstract class ReadCommand extends AbstractReadQuery
 }
 
 if (isTrackingRepairedStatus())
-repairedDataInfo = new RepairedDataInfo();
+{
+final DataLimits.Counter repairedReadCount = 
limits().newCounter(nowInSec(),
+ 
false,
+ 
selectsFullPartition(),
+ 
metadata().enforceStrictLiveness()).onlyCount();
+repairedDataInfo = new RepairedDataInfo(repairedReadCount);
+}
 
 UnfilteredPartitionIterator iterator = (null == searcher) ? 
queryStorage(cfs, executionController) : searcher.search(executionController);
 iterator = RTBoundValidator.validate(iterator, Stage.MERGED, false);
@@ -475,7 +472,22 @@ public abstract class ReadCommand extends AbstractReadQuery
 
 // apply the limits/row counter; this transformation is stopping 
and would close the iterator as soon
 // as the count is observed; if that happens in the middle of an 
open RT, its end bound will not be included.
-iterator = 

[cassandra] branch trunk updated (781e486 -> a8e7cfb)

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 781e486  Fix CQLSH to avoid arguments being evaluated
 new 092915a  Don't skip sstables with partition deletes
 new d6beb01  Merge branch 'cassandra-3.0' into cassandra-3.11
 new b3ecbf3  Merge branch 'cassandra-3.11' into trunk
 new a8e7cfb  Ensure repaired data tracking reads a consistent amount of 
data across replicas

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|   2 +
 src/java/org/apache/cassandra/config/Config.java   |   6 +
 .../cassandra/config/DatabaseDescriptor.java   |  10 +
 src/java/org/apache/cassandra/db/ReadCommand.java  | 310 +++
 .../org/apache/cassandra/db/RepairedDataInfo.java  | 336 
 .../cassandra/db/SinglePartitionReadCommand.java   |  83 ++--
 .../apache/cassandra/metrics/KeyspaceMetrics.java  |  12 +
 .../org/apache/cassandra/metrics/TableMetrics.java |  18 +-
 .../apache/cassandra/repair/RepairRunnable.java|  76 +++-
 .../cassandra/service/SnapshotVerbHandler.java |  67 
 .../org/apache/cassandra/service/StorageProxy.java |  18 +
 .../cassandra/service/StorageProxyMBean.java   |   4 +
 .../cassandra/service/reads/DataResolver.java  |   2 +-
 .../service/reads/repair/RepairedDataVerifier.java |  80 +++-
 .../distributed/test/PreviewRepairTest.java| 106 -
 .../distributed/test/RepairDigestTrackingTest.java | 440 +
 .../distributed/test/SimpleReadWriteTest.java  | 101 +
 .../org/apache/cassandra/db/ReadCommandTest.java   | 120 +-
 .../apache/cassandra/db/RepairedDataInfoTest.java  | 303 ++
 .../reads/repair/RepairedDataVerifierTest.java |   4 +-
 20 files changed, 1693 insertions(+), 405 deletions(-)
 create mode 100644 src/java/org/apache/cassandra/db/RepairedDataInfo.java
 create mode 100644 test/unit/org/apache/cassandra/db/RepairedDataInfoTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cassandra-3.0 updated: Don't skip sstables with partition deletes

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-3.0 by this push:
 new 092915a  Don't skip sstables with partition deletes
092915a is described below

commit 092915ad19d25c1ba93f7968210b88fb6e4b9180
Author: Sam Tunnicliffe 
AuthorDate: Tue Apr 7 16:35:50 2020 +0100

Don't skip sstables with partition deletes

Patch by Sam Tunnicliffe; reviewed by Aleksey Yeschenko for CASSANDRA-15690
---
 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   | 103 +
 .../distributed/test/SimpleReadWriteTest.java  | 101 
 3 files changed, 148 insertions(+), 57 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 5af0ef3..91b8241 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 3.0.21
+ * Don't skip sstables in slice queries based only on local min/max/deletion 
timestamp (CASSANDRA-15690)
  * Memtable memory allocations may deadlock (CASSANDRA-15367)
  * Run evictFromMembership in GossipStage (CASSANDRA-15592)
 Merged from 2.2:
diff --git a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java 
b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
index 15b74d8..2e014ba 100644
--- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
+++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
@@ -705,92 +705,81 @@ public class SinglePartitionReadCommand extends 
ReadCommand
  * We can't eliminate full sstables based on the timestamp of what 
we've already read like
  * in collectTimeOrderedData, but we still want to eliminate 
sstable whose maxTimestamp < mostRecentTombstone
  * we've read. We still rely on the sstable ordering by 
maxTimestamp since if
- *   maxTimestamp_s1 > maxTimestamp_s0,
+ *   maxTimestamp_s1 < maxTimestamp_s0,
  * we're guaranteed that s1 cannot have a row tombstone such that
  *   timestamp(tombstone) > maxTimestamp_s0
  * since we necessarily have
  *   timestamp(tombstone) <= maxTimestamp_s1
- * In other words, iterating in maxTimestamp order allow to do our 
mostRecentPartitionTombstone elimination
- * in one pass, and minimize the number of sstables for which we 
read a partition tombstone.
+ * In other words, iterating in descending maxTimestamp order 
allow to do our mostRecentPartitionTombstone
+ * elimination in one pass, and minimize the number of sstables 
for which we read a partition tombstone.
  */
 Collections.sort(view.sstables, 
SSTableReader.maxTimestampComparator);
-List skippedSSTables = null;
 long mostRecentPartitionTombstone = Long.MIN_VALUE;
-long minTimestamp = Long.MAX_VALUE;
 int nonIntersectingSSTables = 0;
+int includedDueToTombstones = 0;
 SSTableReadMetricsCollector metricsCollector = new 
SSTableReadMetricsCollector();
 
 for (SSTableReader sstable : view.sstables)
 {
-minTimestamp = Math.min(minTimestamp, 
sstable.getMinTimestamp());
 // if we've already seen a partition tombstone with a 
timestamp greater
 // than the most recent update to this sstable, we can skip it
 if (sstable.getMaxTimestamp() < mostRecentPartitionTombstone)
 break;
 
-if (!shouldInclude(sstable))
-{
-nonIntersectingSSTables++;
-// sstable contains no tombstone if maxLocalDeletionTime 
== Integer.MAX_VALUE, so we can safely skip those entirely
-if (sstable.hasTombstones())
-{
-if (skippedSSTables == null)
-skippedSSTables = new ArrayList<>();
-skippedSSTables.add(sstable);
-}
-continue;
-}
-
-if (!sstable.isRepaired())
-oldestUnrepairedTombstone = 
Math.min(oldestUnrepairedTombstone, sstable.getMinLocalDeletionTime());
-
-// 'iter' is added to iterators which is closed on exception, 
or through the closing of the final merged iterator
-@SuppressWarnings("resource")
-UnfilteredRowIterator iter = filter.filter(
-sstable.iterator(partitionKey(),
- columnFilter(),
- filter.isReversed(),
- isForThrift(),
- metricsCollector)
-);
-
-if (isForThrift())
- 

[cassandra] branch cassandra-3.11 updated (53740bc -> d6beb01)

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 53740bc  Merge branch 'cassandra-3.0' into cassandra-3.11
 new 092915a  Don't skip sstables with partition deletes
 new d6beb01  Merge branch 'cassandra-3.0' into cassandra-3.11

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  83 -
 .../distributed/test/SimpleReadWriteTest.java  | 101 +
 3 files changed, 142 insertions(+), 43 deletions(-)


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] 01/01: Merge branch 'cassandra-3.0' into cassandra-3.11

2020-04-16 Thread samt
This is an automated email from the ASF dual-hosted git repository.

samt pushed a commit to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit d6beb0113f43233e4dc8b636328c3159ae61e969
Merge: 53740bc 092915a
Author: Sam Tunnicliffe 
AuthorDate: Thu Apr 16 18:28:33 2020 +0100

Merge branch 'cassandra-3.0' into cassandra-3.11

 CHANGES.txt|   1 +
 .../cassandra/db/SinglePartitionReadCommand.java   |  83 -
 .../distributed/test/SimpleReadWriteTest.java  | 101 +
 3 files changed, 142 insertions(+), 43 deletions(-)

diff --cc CHANGES.txt
index eb15f5f,91b8241..dbdb779
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,8 -1,5 +1,9 @@@
 +3.11.7
 + * Allow sstableloader to use SSL on the native port (CASSANDRA-14904)
 +Merged from 3.0:
 +===
  3.0.21
+  * Don't skip sstables in slice queries based only on local min/max/deletion 
timestamp (CASSANDRA-15690)
   * Memtable memory allocations may deadlock (CASSANDRA-15367)
   * Run evictFromMembership in GossipStage (CASSANDRA-15592)
  Merged from 2.2:
diff --cc src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
index bee4961,2e014ba..3d6559b
--- a/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
+++ b/src/java/org/apache/cassandra/db/SinglePartitionReadCommand.java
@@@ -725,13 -710,13 +725,14 @@@ public class SinglePartitionReadComman
   *   timestamp(tombstone) > maxTimestamp_s0
   * since we necessarily have
   *   timestamp(tombstone) <= maxTimestamp_s1
-  * In other words, iterating in maxTimestamp order allow to do 
our mostRecentPartitionTombstone elimination
-  * in one pass, and minimize the number of sstables for which we 
read a partition tombstone.
-  */
+  * In other words, iterating in descending maxTimestamp order 
allow to do our mostRecentPartitionTombstone
+  * elimination in one pass, and minimize the number of sstables 
for which we read a partition tombstone.
 - */
 -Collections.sort(view.sstables, 
SSTableReader.maxTimestampComparator);
++*/
 +Collections.sort(view.sstables, 
SSTableReader.maxTimestampDescending);
  long mostRecentPartitionTombstone = Long.MIN_VALUE;
  int nonIntersectingSSTables = 0;
- List skippedSSTablesWithTombstones = null;
+ int includedDueToTombstones = 0;
++
  SSTableReadMetricsCollector metricsCollector = new 
SSTableReadMetricsCollector();
  
  for (SSTableReader sstable : view.sstables)
@@@ -746,49 -731,60 +747,45 @@@
  if (!sstable.isRepaired())
  oldestUnrepairedTombstone = 
Math.min(oldestUnrepairedTombstone, sstable.getMinLocalDeletionTime());
  
+ // 'iter' is added to iterators which is closed on 
exception, or through the closing of the final merged iterator
+ @SuppressWarnings("resource")
 -UnfilteredRowIterator iter = 
filter.filter(sstable.iterator(partitionKey(),
 -  
  columnFilter(),
 -  
  filter.isReversed(),
 -  
  isForThrift(),
 -  
  metricsCollector));
 -
 -if (isForThrift())
 -iter = ThriftResultsMerger.maybeWrap(iter, 
nowInSec());
 -
 -iterators.add(RTBoundValidator.validate(iter, 
RTBoundValidator.Stage.SSTABLE, false));
++UnfilteredRowIterator iter = makeIterator(cfs, sstable, 
true, metricsCollector);
 +iterators.add(iter);
- includedDueToTombstones++;
+ mostRecentPartitionTombstone = 
Math.max(mostRecentPartitionTombstone,
+ 
iter.partitionLevelDeletion().markedForDeleteAt());
+ }
+ else
+ {
+ 
+ nonIntersectingSSTables++;
+ // sstable contains no tombstone if maxLocalDeletionTime 
== Integer.MAX_VALUE, so we can safely skip those entirely
 -if (sstable.hasTombstones())
++if (sstable.mayHaveTombstones())
+ {
+ // 'iter' is added to iterators which is closed on 
exception, or through the closing of the final merged iterator
+ @SuppressWarnings("resource")
 -UnfilteredRowIterator iter = 
filter.filter(sstable.iterator(partitionKey(),
 -  
   

[jira] [Updated] (CASSANDRA-15660) Unable to specify -e/--execute flag in cqlsh

2020-04-16 Thread Dinesh Joshi (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dinesh Joshi updated CASSANDRA-15660:
-
  Since Version: 4.0
Source Control Link: 
https://github.com/apache/cassandra/commit/781e4862faab8dd10382ec296b122592edd0f6f0
  (was: [patch|https://github.com/apache/cassandra/pull/502/files] 
[dtest|https://github.com/apache/cassandra-dtest/pull/60/files])
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

Thanks for the patch [~jasonstack]. Committed both cassandra and 
[cassandra-dtest|https://github.com/apache/cassandra-dtest/commit/2b6286b503e1223659ffb9e31b5f73200348e781].

> Unable to specify -e/--execute flag in cqlsh
> 
>
> Key: CASSANDRA-15660
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15660
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/cqlsh
>Reporter: Stefan Miklosovic
>Assignee: ZhaoYang
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> From mailing list:
> [https://lists.apache.org/thread.html/r377099b632c62b641e4feef5b738084fc5369b0c7157fae867853597%40%3Cdev.cassandra.apache.org%3E]
> The bug looks like this:
> {code:java}
> $ /usr/bin/cqlsh -e 'describe keyspaces' -u cassandra -p cassandra 127.0.0.1
> Usage: cqlsh.py [options] [host [port]]cqlsh.py: error: '127.0.0.1' is not a 
> valid port number.
> {code}
> This is working in 3.x releases just fine but fails on 4.
> The workaround for 4.x code as of today is to put these statements into file 
> and use "-f" flag.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch trunk updated: Fix CQLSH to avoid arguments being evaluated

2020-04-16 Thread djoshi
This is an automated email from the ASF dual-hosted git repository.

djoshi pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 781e486  Fix CQLSH to avoid arguments being evaluated
781e486 is described below

commit 781e4862faab8dd10382ec296b122592edd0f6f0
Author: Zhao Yang 
AuthorDate: Tue Mar 31 17:52:43 2020 +0800

Fix CQLSH to avoid arguments being evaluated

Patch By Zhao Yang; reviewed by Dinesh Joshi and Brandon Williams for 
CASSANDRA-15660
---
 CHANGES.txt |  1 +
 bin/cqlsh   | 62 +++--
 2 files changed, 33 insertions(+), 30 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index ecd3562..8f19c2a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 4.0-alpha4
+ * Fix CQLSH to avoid arguments being evaluated (CASSANDRA-15660)
  * Correct Visibility and Improve Safety of Methods in LatencyMetrics 
(CASSANDRA-15597)
  * Allow cqlsh to run with Python2.7/Python3.6+ 
(CASSANDRA-15659,CASSANDRA-15573)
  * Improve logging around incremental repair (CASSANDRA-15599)
diff --git a/bin/cqlsh b/bin/cqlsh
index bce00f8..0774d52 100755
--- a/bin/cqlsh
+++ b/bin/cqlsh
@@ -17,36 +17,39 @@
 
 # shell script to find a suitable Python interpreter and run cqlsh.py
 
-# parse arguments
-PARAMS=""
-
 # Use the Python that is specified in the env
 if [ -n "$CQLSH_PYTHON" ]; then
 USER_SPECIFIED_PYTHON="$CQLSH_PYTHON"
 fi
 
-while [ $# -gt 0 ]; do
-case "$1" in
---python)
-if [ $# -lt 2 ]; then
-echo "You must specify a python interpreter path with the 
--python option"
-exit 1
-fi
-USER_SPECIFIED_PYTHON="$2"
-shift
-shift
-;;
---)
-shift
-break
-;;
-*)
-PARAMS="$PARAMS $1"
-shift
-;;
-esac
+
+# filter "--python" option and its value, and keep remaining arguments as it is
+USER_SPECIFIED_PYTHON_OPTION=false
+for arg do
+  shift
+  case "$arg" in
+--python)
+USER_SPECIFIED_PYTHON_OPTION=true
+;;
+--)
+break
+;;
+*)
+if [ "$USER_SPECIFIED_PYTHON_OPTION" = true ] ; then
+USER_SPECIFIED_PYTHON_OPTION=false
+USER_SPECIFIED_PYTHON="$arg"
+else
+set -- "$@" "$arg"
+fi
+;;
+  esac
 done
 
+if [ "$USER_SPECIFIED_PYTHON_OPTION" = true ] ; then
+echo "You must specify a python interpreter path with the --python option"
+exit 1
+fi
+
 # get a version string for a Python interpreter
 get_python_version() {
 interpreter=$1
@@ -68,14 +71,13 @@ is_supported_version() {
 }
 
 run_if_supported_version() {
-interpreter="$1"
-params="$2"
+# get the interpreter and remove it from argument
+interpreter="$1" shift
+
 version=$(get_python_version "$interpreter")
 if [ -n "$version" ]; then
 if [ "$(is_supported_version "$version")" = "supported" ]; then
-# We need the params to be unquoted, otherwise the shell will just 
interpret it as one giant string
-# shellcheck disable=SC2086
-exec "$interpreter" "$($interpreter -c "import os; 
print(os.path.dirname(os.path.realpath('$0')))")/cqlsh.py" $params
+exec "$interpreter" "$($interpreter -c "import os; 
print(os.path.dirname(os.path.realpath('$0')))")/cqlsh.py" "$@"
 exit
 fi
 fi
@@ -84,11 +86,11 @@ run_if_supported_version() {
 
 if [ "$USER_SPECIFIED_PYTHON" != "" ]; then
 # run a user specified Python interpreter
-run_if_supported_version "$USER_SPECIFIED_PYTHON" "$PARAMS"
+run_if_supported_version "$USER_SPECIFIED_PYTHON" "$@"
 else
 # try unqualified python first, then python3, then python2.7
 for interpreter in python python3 python2.7; do
-run_if_supported_version "$interpreter" "$PARAMS"
+run_if_supported_version "$interpreter" "$@"
 done
 fi
 


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-dtest] branch master updated: Fix CQLSH to avoid arguments being evaluated

2020-04-16 Thread djoshi
This is an automated email from the ASF dual-hosted git repository.

djoshi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/master by this push:
 new 2b6286b  Fix CQLSH to avoid arguments being evaluated
2b6286b is described below

commit 2b6286b503e1223659ffb9e31b5f73200348e781
Author: Zhao Yang 
AuthorDate: Tue Mar 31 18:37:51 2020 +0800

Fix CQLSH to avoid arguments being evaluated

Patch By Zhao Yang; reviewed by Dinesh Joshi and Brandon Williams for 
CASSANDRA-15660
---
 cqlsh_tests/test_cqlsh.py | 21 +
 1 file changed, 21 insertions(+)

diff --git a/cqlsh_tests/test_cqlsh.py b/cqlsh_tests/test_cqlsh.py
index e22097e..1de4fcb 100644
--- a/cqlsh_tests/test_cqlsh.py
+++ b/cqlsh_tests/test_cqlsh.py
@@ -2003,6 +2003,27 @@ Tracing session:""")
 assert 0 == len(stderr), stderr
 assert 0 == len(stdout), stdout
 
+@since('3.0')
+def test_execute_statement(self):
+"""
+Test: cqlsh -e ""
+@jira_ticket CASSANDRA-15660
+"""
+self.cluster.populate(1)
+self.cluster.start(wait_for_binary_proto=True)
+node1, = self.cluster.nodelist()
+session = self.patient_cql_connection(node1)
+
+session.execute("CREATE KEYSPACE ks WITH 
REPLICATION={'class':'SimpleStrategy','replication_factor':1};")
+session.execute("CREATE TABLE ks.cf (id int primary key);")
+
+stdout, stderr = self.run_cqlsh(node1, cmds="", cqlsh_options=['-e', 
'INSERT INTO ks.cf (id) VALUES (0);'])
+
+assert 0 == len(stderr), stderr
+assert 0 == len(stdout), stdout
+
+assert_all(session, "SELECT * FROM ks.cf", [[0]])
+
 def run_cqlsh(self, node, cmds, cqlsh_options=None, env_vars=None):
 """
 Local version of run_cqlsh to open a cqlsh subprocess with


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15660) Unable to specify -e/--execute flag in cqlsh

2020-04-16 Thread Dinesh Joshi (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15660?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dinesh Joshi updated CASSANDRA-15660:
-
Status: Ready to Commit  (was: Review In Progress)

+1

> Unable to specify -e/--execute flag in cqlsh
> 
>
> Key: CASSANDRA-15660
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15660
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/cqlsh
>Reporter: Stefan Miklosovic
>Assignee: ZhaoYang
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> From mailing list:
> [https://lists.apache.org/thread.html/r377099b632c62b641e4feef5b738084fc5369b0c7157fae867853597%40%3Cdev.cassandra.apache.org%3E]
> The bug looks like this:
> {code:java}
> $ /usr/bin/cqlsh -e 'describe keyspaces' -u cassandra -p cassandra 127.0.0.1
> Usage: cqlsh.py [options] [host [port]]cqlsh.py: error: '127.0.0.1' is not a 
> valid port number.
> {code}
> This is working in 3.x releases just fine but fails on 4.
> The workaround for 4.x code as of today is to put these statements into file 
> and use "-f" flag.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CASSANDRA-15737:
---
Labels: pull-request-available  (was: )

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread Jordan West (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jordan West updated CASSANDRA-15737:

Test and Documentation Plan: Manual verification (could add an in-jvm dtest 
if reviewers feel strongly, especially since this area isn't exactly well 
covered right now)
 Status: Patch Available  (was: Open)

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread Jordan West (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jordan West updated CASSANDRA-15737:

Change Category: Operability
 Complexity: Low Hanging Fruit
 Status: Open  (was: Triage Needed)

> Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness 
> threshold
> --
>
> Key: CASSANDRA-15737
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Messaging/Internode
>Reporter: Jordan West
>Assignee: Jordan West
>Priority: Normal
>
> https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
> DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a 
> method to modify badness threshold. This can be useful in operations that 
> also modify severity manually or if operators want to temporarily disable 
> dynamic snitch behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-15737) Add StorageServiceMBean#setDynamicBadnessThreshold to expose dynamic badness threshold

2020-04-16 Thread Jordan West (Jira)
Jordan West created CASSANDRA-15737:
---

 Summary: Add StorageServiceMBean#setDynamicBadnessThreshold to 
expose dynamic badness threshold
 Key: CASSANDRA-15737
 URL: https://issues.apache.org/jira/browse/CASSANDRA-15737
 Project: Cassandra
  Issue Type: Improvement
  Components: Messaging/Internode
Reporter: Jordan West
Assignee: Jordan West


https://issues.apache.org/jira/browse/CASSANDRA-12179 made the 
DynamicEndpointSnitch properties dynamic at runtime but didn’t expose a method 
to modify badness threshold. This can be useful in operations that also modify 
severity manually or if operators want to temporarily disable dynamic snitch 
behavior. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15660) Unable to specify -e/--execute flag in cqlsh

2020-04-16 Thread ZhaoYang (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17085034#comment-17085034
 ] 

ZhaoYang commented on CASSANDRA-15660:
--

[~brandon.williams]/[~djoshi] friendly ping..

> Unable to specify -e/--execute flag in cqlsh
> 
>
> Key: CASSANDRA-15660
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15660
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/cqlsh
>Reporter: Stefan Miklosovic
>Assignee: ZhaoYang
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> From mailing list:
> [https://lists.apache.org/thread.html/r377099b632c62b641e4feef5b738084fc5369b0c7157fae867853597%40%3Cdev.cassandra.apache.org%3E]
> The bug looks like this:
> {code:java}
> $ /usr/bin/cqlsh -e 'describe keyspaces' -u cassandra -p cassandra 127.0.0.1
> Usage: cqlsh.py [options] [host [port]]cqlsh.py: error: '127.0.0.1' is not a 
> valid port number.
> {code}
> This is working in 3.x releases just fine but fails on 4.
> The workaround for 4.x code as of today is to put these statements into file 
> and use "-f" flag.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15730) Batch statement preparation fails if multiple tables and parameters are used

2020-04-16 Thread Bryn Cooke (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryn Cooke updated CASSANDRA-15730:
---
Description: 
Batch statement preparation fails with an assertion error if multiple tables 
and parameters are used.

{{BEGIN BATCH }}
{{ UPDATE tbl1 SET v1 = 1 WHERE k1 = ?}}
{{ UPDATE tbl2 SET v2 = 2 WHERE k2 = ?}}
{{APPLY BATCH}}

The logic for affectsMultipleTables 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
 looks inverted
 This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 

  was:
Batch statement preparation fails with an assertion error if multiple tables 
and parameters are used.

{{ BEGIN BATCH }}
{{ UPDATE tbl1 SET v1 = 1 WHERE k1 = ?}}
{{ UPDATE tbl2 SET v2 = 2 WHERE k2 = ?}}
{{ APPLY BATCH}}

The logic for affectsMultipleTables 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
 looks inverted
 This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 


> Batch statement preparation fails if multiple tables and parameters are used
> 
>
> Key: CASSANDRA-15730
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15730
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Bryn Cooke
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Batch statement preparation fails with an assertion error if multiple tables 
> and parameters are used.
> {{BEGIN BATCH }}
> {{ UPDATE tbl1 SET v1 = 1 WHERE k1 = ?}}
> {{ UPDATE tbl2 SET v2 = 2 WHERE k2 = ?}}
> {{APPLY BATCH}}
> The logic for affectsMultipleTables 
> [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
>  looks inverted
>  This later causes an assertion failure 
> [here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15730) Batch statement preparation fails if multiple tables and parameters are used

2020-04-16 Thread Bryn Cooke (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryn Cooke updated CASSANDRA-15730:
---
Description: 
Batch statement preparation fails with an assertion error if multiple tables 
and parameters are used.

{{ BEGIN BATCH }}
{{ UPDATE tbl1 SET v1 = 1 WHERE k1 = ?}}
{{ UPDATE tbl2 SET v2 = 2 WHERE k2 = ?}}
{{ APPLY BATCH}}

The logic for affectsMultipleTables 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
 looks inverted
 This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 

  was:
Batch statement preparation fails with an assertion error if multiple tables 
and parameters are used.
{{
BEGIN BATCH 
UPDATE tbl1 SET v1 = 1 WHERE k1 = ?
UPDATE tbl2 SET v2 = 2 WHERE k2 = ?
APPLY BATCH
}}

The logic for affectsMultipleTables 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
 looks inverted
This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 


> Batch statement preparation fails if multiple tables and parameters are used
> 
>
> Key: CASSANDRA-15730
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15730
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Bryn Cooke
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Batch statement preparation fails with an assertion error if multiple tables 
> and parameters are used.
> {{ BEGIN BATCH }}
> {{ UPDATE tbl1 SET v1 = 1 WHERE k1 = ?}}
> {{ UPDATE tbl2 SET v2 = 2 WHERE k2 = ?}}
> {{ APPLY BATCH}}
> The logic for affectsMultipleTables 
> [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
>  looks inverted
>  This later causes an assertion failure 
> [here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15730) Batch statement preparation fails if multiple tables and parameters are used

2020-04-16 Thread Bryn Cooke (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryn Cooke updated CASSANDRA-15730:
---
Description: 
Batch statement preparation fails with an assertion error if multiple tables 
and parameters are used.
{{
BEGIN BATCH 
UPDATE tbl1 SET v1 = 1 WHERE k1 = ?
UPDATE tbl2 SET v2 = 2 WHERE k2 = ?
APPLY BATCH
}}

The logic for affectsMultipleTables 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
 looks inverted
This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 

  was:
Currently affectsMultipleTables is true if all statements in a batch are for 
the same table 
[here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
  
 This later causes an assertion failure 
[here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]

 

 


> Batch statement preparation fails if multiple tables and parameters are used
> 
>
> Key: CASSANDRA-15730
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15730
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Bryn Cooke
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Batch statement preparation fails with an assertion error if multiple tables 
> and parameters are used.
> {{
> BEGIN BATCH 
> UPDATE tbl1 SET v1 = 1 WHERE k1 = ?
> UPDATE tbl2 SET v2 = 2 WHERE k2 = ?
> APPLY BATCH
> }}
> The logic for affectsMultipleTables 
> [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
>  looks inverted
> This later causes an assertion failure 
> [here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15728) Setting "cassandra_dir" in pytest.ini has no effect

2020-04-16 Thread Benjamin Lerer (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15728?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084999#comment-17084999
 ] 

Benjamin Lerer commented on CASSANDRA-15728:


Committed into cassandra-dtest master at 
158f084779159e8341c080a90d759a89006f5829

> Setting "cassandra_dir" in pytest.ini has no effect
> ---
>
> Key: CASSANDRA-15728
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15728
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Setting *cassandra_dir* in *pytest.ini* should not require specifying 
> *--cassandra-dir* on the command line:
> {code}
> $ pytest cql_tracing_test.py
> 
>  test session starts 
> =
> platform linux -- Python 3.6.9, pytest-3.6.4, py-1.8.1, pluggy-0.7.1
> rootdir: /home/nastra/Development/pycharm-projects/cassandra-dtest, inifile: 
> pytest.ini
> plugins: timeout-1.3.4, flaky-3.6.1
> timeout: 900.0s
> timeout method: signal
> timeout func_only: False
> collecting 4 items
>   
>   
>
> INTERNALERROR> Traceback (most recent call last):
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 178, 
> in wrap_session
> INTERNALERROR> session.exitstatus = doit(config, session) or 0
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 214, 
> in _main
> INTERNALERROR> config.hook.pytest_collection(session=session)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 224, 
> in pytest_collection
> INTERNALERROR> return session.perform_collect()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 429, 
> in perform_collect
> INTERNALERROR> session=self, config=self.config, items=items
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/Development/pycharm-projects/cassandra-dtest/conftest.py", line 
> 440, in pytest_collection_modifyitems
> 

[jira] [Updated] (CASSANDRA-15730) Batch statement preparation fails if multiple tables and parameters are used

2020-04-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CASSANDRA-15730:
---
Labels: pull-request-available  (was: )

> Batch statement preparation fails if multiple tables and parameters are used
> 
>
> Key: CASSANDRA-15730
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15730
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Bryn Cooke
>Priority: Normal
>  Labels: pull-request-available
>
> Currently affectsMultipleTables is true if all statements in a batch are for 
> the same table 
> [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
>   
>  This later causes an assertion failure 
> [here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15728) Setting "cassandra_dir" in pytest.ini has no effect

2020-04-16 Thread Benjamin Lerer (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-15728:
---
  Since Version: 4.0-alpha
Source Control Link: 
https://github.com/apache/cassandra-dtest/commit/158f084779159e8341c080a90d759a89006f5829
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Setting "cassandra_dir" in pytest.ini has no effect
> ---
>
> Key: CASSANDRA-15728
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15728
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Setting *cassandra_dir* in *pytest.ini* should not require specifying 
> *--cassandra-dir* on the command line:
> {code}
> $ pytest cql_tracing_test.py
> 
>  test session starts 
> =
> platform linux -- Python 3.6.9, pytest-3.6.4, py-1.8.1, pluggy-0.7.1
> rootdir: /home/nastra/Development/pycharm-projects/cassandra-dtest, inifile: 
> pytest.ini
> plugins: timeout-1.3.4, flaky-3.6.1
> timeout: 900.0s
> timeout method: signal
> timeout func_only: False
> collecting 4 items
>   
>   
>
> INTERNALERROR> Traceback (most recent call last):
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 178, 
> in wrap_session
> INTERNALERROR> session.exitstatus = doit(config, session) or 0
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 214, 
> in _main
> INTERNALERROR> config.hook.pytest_collection(session=session)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 224, 
> in pytest_collection
> INTERNALERROR> return session.perform_collect()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 429, 
> in perform_collect
> INTERNALERROR> session=self, config=self.config, items=items
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> 

[cassandra-dtest] branch master updated: Respect cassandra_dir from pytest.ini

2020-04-16 Thread blerer
This is an automated email from the ASF dual-hosted git repository.

blerer pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-dtest.git


The following commit(s) were added to refs/heads/master by this push:
 new 158f084  Respect cassandra_dir from pytest.ini
158f084 is described below

commit 158f084779159e8341c080a90d759a89006f5829
Author: Eduard Tudenhoefner 
AuthorDate: Wed Apr 15 09:37:35 2020 +0200

Respect cassandra_dir from pytest.ini

patch by Eduard Tudenhoefner; reviewed by Berenguer Blasi for
CASSANDRA-15728
---
 README.md | 11 +++
 conftest.py   | 10 --
 dtest_config.py   |  5 +++--
 upgrade_tests/upgrade_manifest.py |  2 +-
 4 files changed, 15 insertions(+), 13 deletions(-)

diff --git a/README.md b/README.md
index 7519925..a6be874 100644
--- a/README.md
+++ b/README.md
@@ -34,9 +34,9 @@ bootstrap your development environment and then use 
[Homebrew](https://brew.sh)
 
 ### Python Dependencies
 There are multiple external Python dependencies required to run DTests. 
-The current Python depenendcy list is maintained in a file named 
+The current Python dependency list is maintained in a file named
 
[requirements.txt](https://github.com/apache/cassandra-dtest/blob/master/requirements.txt)
 
-in the root of the cassandra-dtest repository.
+in the root of the `cassandra-dtest` repository.
 
 The easiest way to install these dependencies is with pip and virtualenv. 
 
@@ -73,7 +73,7 @@ Use ccm ability to download/compile released sources from 
archives.apache.org:
 pytest --cassandra-version=1.0.0
 
 A convenient option if tests are regularly run against the same existing
-directory is to set a `cassandra_dir` in 
`~/path/to/cassandra-dtest/pytest.ini`:
+directory is to set `cassandra_dir` in `~/path/to/cassandra-dtest/pytest.ini`:
 
 [pytest]
 cassandra_dir=~/path/to/cassandra
@@ -98,11 +98,6 @@ To run the upgrade tests, you have must both JDK7 and JDK8 
installed. Paths
 to these installations should be defined in the environment variables
 JAVA7_HOME and JAVA8_HOME, respectively.
 
-Installation Instructions
--
-
-See more detailed instructions in the included [INSTALL 
file](https://github.com/apache/cassandra-dtest/blob/master/INSTALL.md).
-
 Writing Tests
 -
 
diff --git a/conftest.py b/conftest.py
index b46f8b5..0229ae0 100644
--- a/conftest.py
+++ b/conftest.py
@@ -62,6 +62,11 @@ def pytest_addoption(parser):
   "(e.g. the path to the root of a cloned C* git 
directory. Before executing dtests using "
   "this directory you must build C* with 'ant clean 
jar'). If you're doing C* development and "
   "want to run the tests this is almost always going 
to be the correct option.")
+parser.addini("cassandra_dir", default=None,
+  help="The directory containing the built C* artifacts to run 
the tests against. "
+   "(e.g. the path to the root of a cloned C* git 
directory. Before executing dtests using "
+   "this directory you must build C* with 'ant clean 
jar'). If you're doing C* development and "
+   "want to run the tests this is almost always going to 
be the correct option.")
 parser.addoption("--cassandra-version", action="store", default=None,
  help="A specific C* version to run the dtests against. 
The dtest framework will "
   "pull the required artifacts for this version.")
@@ -432,12 +437,13 @@ def pytest_collection_modifyitems(items, config):
 of the test items within the list
 """
 collect_only = config.getoption("--collect-only")
-cassandra_dir = config.getoption("--cassandra-dir")
+cassandra_dir = config.getoption("--cassandra-dir") or 
config.getini("cassandra_dir")
 cassandra_version = config.getoption("--cassandra-version")
 if not collect_only and cassandra_dir is None:
 if  cassandra_version is None:
 raise Exception("Required dtest arguments were missing! You must 
provide either --cassandra-dir "
-"or --cassandra-version. Refer to the 
documentation or invoke the help with --help.")
+"or --cassandra-version. You can also set 
'cassandra_dir' in pytest.ini. "
+"Refer to the documentation or invoke the help 
with --help.")
 
 # Either cassandra_version or cassandra_dir is defined, so figure out the 
version
 CASSANDRA_VERSION = cassandra_version or 
get_version_from_build(cassandra_dir)
diff --git a/dtest_config.py b/dtest_config.py
index 490cd40..358224e 100644
--- a/dtest_config.py
+++ b/dtest_config.py
@@ -29,8 +29,9 @@ class DTestConfig:
 self.data_dir_count = 
request.config.getoption("--data-dir-count-per-instance")
 

[jira] [Updated] (CASSANDRA-15730) Batch statement preparation fails if multiple tables and parameters are used

2020-04-16 Thread Bryn Cooke (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Bryn Cooke updated CASSANDRA-15730:
---
Summary: Batch statement preparation fails if multiple tables and 
parameters are used  (was: Logic for determining if all statements in a batch 
are for the same table is inverted)

> Batch statement preparation fails if multiple tables and parameters are used
> 
>
> Key: CASSANDRA-15730
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15730
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Bryn Cooke
>Priority: Normal
>
> Currently affectsMultipleTables is true if all statements in a batch are for 
> the same table 
> [here|https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/cql3/statements/BatchStatement.java#L144]
>   
>  This later causes an assertion failure 
> [here|https://github.com/apache/cassandra/blob/24c8a21c1c131abd89c6b646343ff098d1b3263b/src/java/org/apache/cassandra/cql3/VariableSpecifications.java#L75]
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15728) Setting "cassandra_dir" in pytest.ini has no effect

2020-04-16 Thread Benjamin Lerer (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Lerer updated CASSANDRA-15728:
---
Status: Ready to Commit  (was: Review In Progress)

> Setting "cassandra_dir" in pytest.ini has no effect
> ---
>
> Key: CASSANDRA-15728
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15728
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Setting *cassandra_dir* in *pytest.ini* should not require specifying 
> *--cassandra-dir* on the command line:
> {code}
> $ pytest cql_tracing_test.py
> 
>  test session starts 
> =
> platform linux -- Python 3.6.9, pytest-3.6.4, py-1.8.1, pluggy-0.7.1
> rootdir: /home/nastra/Development/pycharm-projects/cassandra-dtest, inifile: 
> pytest.ini
> plugins: timeout-1.3.4, flaky-3.6.1
> timeout: 900.0s
> timeout method: signal
> timeout func_only: False
> collecting 4 items
>   
>   
>
> INTERNALERROR> Traceback (most recent call last):
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 178, 
> in wrap_session
> INTERNALERROR> session.exitstatus = doit(config, session) or 0
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 214, 
> in _main
> INTERNALERROR> config.hook.pytest_collection(session=session)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 224, 
> in pytest_collection
> INTERNALERROR> return session.perform_collect()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 429, 
> in perform_collect
> INTERNALERROR> session=self, config=self.config, items=items
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/Development/pycharm-projects/cassandra-dtest/conftest.py", line 
> 440, in pytest_collection_modifyitems
> INTERNALERROR> raise Exception("Required dtest arguments were 

[jira] [Updated] (CASSANDRA-14913) Forbid re-adding static columns as regular and vice versa

2020-04-16 Thread Josh McKenzie (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh McKenzie updated CASSANDRA-14913:
--
Bug Category: Parent values: Correctness(12982)Level 1 values: 
Unrecoverable Corruption / Loss(13161)

> Forbid re-adding static columns as regular and vice versa
> -
>
> Key: CASSANDRA-14913
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14913
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Normal
> Fix For: 4.0
>
>
> Re-adding a dropped column with an incompatible kind (dropped regular 
> re-added as static, or dropped static re-added as regular) can ultimately 
> result in corruption (see CASSANDRA-14843 for more context). In 3.x, 
> unfortunately, we don’t persist enough context when dropping a column. In 
> trunk, however, we do, and it’s trivial to forbid this operation, as we 
> should.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15019) Repaired data tracking isn't working for range queries

2020-04-16 Thread Josh McKenzie (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh McKenzie updated CASSANDRA-15019:
--
Bug Category: Parent values: Correctness(12982)Level 1 values: 
Consistency(12989)

> Repaired data tracking isn't working for range queries
> --
>
> Key: CASSANDRA-15019
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15019
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Coordination, Consistency/Repair, Test/dtest
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 4.0
>
> Attachments: RepairDigestTrackingTest.java
>
>
> CASSANDRA-14145 introduced optional tracking of the repaired dataset used to 
> construct a read response. If enabled, each replica computes a digest for the 
> repaired portion of the data, which the coordinator compares in order to 
> detect divergence between replicas. This isn't working correctly for range 
> reads, as the ReadCommand instance that the DataResolver is intialized with 
> does not have the tracking flag set. This has been undetected up until now as 
> the dtest which should verify it also has a bug in that when the relevant 
> range query is issued the test expectations are being incorrectly set.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15035) C* 3.0 sstables w/ UDTs are corrupted in 3.11 + 4.0

2020-04-16 Thread Josh McKenzie (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15035?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Josh McKenzie updated CASSANDRA-15035:
--
Bug Category: Parent values: Correctness(12982)Level 1 values: 
Unrecoverable Corruption / Loss(13161)

> C* 3.0 sstables w/ UDTs are corrupted in 3.11 + 4.0
> ---
>
> Key: CASSANDRA-15035
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15035
> Project: Cassandra
>  Issue Type: Bug
>  Components: Feature/UDT, Local/SSTable
>Reporter: Robert Stupp
>Assignee: Robert Stupp
>Priority: Urgent
> Fix For: 3.11.6, 4.0
>
>
> OSS C* 3.0 writes incorrect type information for UDTs into the 
> serialization-header of each sstable.
> In C* 3.0, both UDTs and tuple are always frozen. A frozen type must be 
> enclosed in a {{frozen<...>}} via the {{CQL3Type}} hierarchy (resp 
> {{org.apache.cassandra.db.marshal.FrozenType(...)}} via the {{AbstractType}} 
> hierarchy) “bracket” in the schema and serialization-header.
> Since CASSANDRA-7423 (committed to C* 3.6) UDTs can also be non-frozen (= 
> multi-cell).
> Unfortunately, C* 3.0 does not write the 
> {{org.apache.cassandra.db.marshal.FrozenType(...)}} “bracket” for UDTs into 
> the {{SerializationHeader.Component}} in the {{-Stats.db}} sstable component.
> The order in which columns of a row are serialized depends on the concrete 
> {{AbstractType}}. Columns with variable length types (frozen types belong to 
> this category) are serialized before columns with multi-cell types 
> (non-frozen types belong to that category).
> If C* 3.6 (or any newer version) reads an sstable written by C* 3.0 (up to 
> 3.5), it will read the type information “non-frozen UDT” from the 
> serialization header, which is technically correct.
> This means, that upgrades from C* 3.0 to C* 3.11 and 4.0, using a schema that 
> uses UDTs, result in inaccessible data in those sstables. Reads against 3.0 
> sstables as well as attempts to scrub these sstables result in a wide variety 
> of errors/exceptions ({{CorruptSSTableException}}, {{EOFExcepiton}}, 
> {{OutOfMemoryError}}, etc etc), as usual in such cases.
> Mitigation strategy in the proposed patch:
> * Fix the broken serialization-headers automatically when an upgrade from C* 
> 3.0 is detected.
> * Enhance {{sstablescrub}} to verify the serialization-header against the 
> schema and allow {{sstablescrub}} to fix the UDT types according to the 
> information in the schema. This does not apply to "online scrub" (e.g. 
> nodetool scrub). The behavior of {{sstablescrub}} has been changed to first 
> inspect the serialization-header and verify the type information against the 
> schema. 
> Differences between the schema and the sstable serialization-headers cause 
> {{sstablescrub}} to error out and stop - i.e. safety first (there’s a way to 
> opt-out though).
> A new class {{SSTableHeaderFix}} can inspect the serialization-header 
> ({{SerializationHeader.Component}}) in the the {{-Statistics.db}} component 
> and fix the type information in those sstables for UDTs according to the 
> schema information.
> This new class could be used during verify and before sstables are imported. 
> But changes to “verify” and “import” are out of the scope of this ticket, as 
> the patch is already bigger than I originally expected.
> Another issue not tackled by this ticket is that the wrong ‘kind’ is written 
> to the type information in {{system_schema.dropped_columns}} when a 
> non-frozen UDT column is dropped. When a UDT column is dropped, the type of 
> the dropped column is converted from the UDT definition to its 
> “corresponding” tuple type definition. But all versions currently write 
> {{frozen>}}, but for non-frozen UDTs it should actually just be 
> {{tuple<...>}}. Unfortunately, there is nothing that could be done in this 
> ticket to fix (or even consider) the type information of a dropped column. 
> But for correctness, the tuple type should be a multi-cell one (only 
> accessible for dropped UDTs though - not as something that a user can create 
> as a type).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15601) Ensure repaired data tracking reads a consistent amount of data across replicas

2020-04-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-15601:
--
Status: Ready to Commit  (was: Review In Progress)

LGTM (a variant previously returned internally, hence no new suggestions/nits)

> Ensure repaired data tracking reads a consistent amount of data across 
> replicas
> ---
>
> Key: CASSANDRA-15601
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15601
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Repair
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> When generating a digest for repaired data tracking, the amount of repaired 
> data that needs to be read may depend on the unrepaired data on the replica. 
> As this may vary between replicas, digest mismatches can be reported even 
> though the repaired data may actually be in sync.
> For example, two replicas, A & B and a table like
> {code}
> CREATE TABLE t  (pk int, ck int, PRIMARY KEY (pk, ck)) WITH CLUSTERING ORDER 
> BY ck DESC; 
> Unrepaired
> ===
> Instance A
> (0, 5)
> Instance B
> (0, 6)
> (0, 5)
> Repaired (Both A & B)
> =
> (0, 4)
> (0, 3)
> (0, 2)
> (0, 1)
> (0, 0)
> SELECT * FROM tbl WHERE pk = 0 LIMIT 3;
> {code}
> Instance A would read (0, 5) from the unrepaired set and (0, 4) (0, 3) from 
> the repaired set. 
>  Instance B would read (0, 6) (0, 5) from its unrepaired set and just (0, 4) 
> from repaired data.
> Unrepaired row/range/partition tombstones shadowing repaired data and present 
> on some replicas but not others will have the opposite effect, with more 
> repaired data being read in comparison.
>  To fix this, when repaired data tracking is in effect each replica needs to 
> overread during a full data read. Replicas should read up to {{LIMIT}} (i.e. 
> the {{DataLimit}} of the {{ReadCommand}}) from the repaired set, regardless 
> of how much is read from the unrepaired data. At the point where that amount 
> of repaired data has been read, replica should stop updating the digest. So 
> if unrepaired tombstones cause more than {{LIMIT}} repaired data to be read, 
> the digest is only calculated over the first {{LIMIT}}-worth of repaired data.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15601) Ensure repaired data tracking reads a consistent amount of data across replicas

2020-04-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15601?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-15601:
--
Reviewers: Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Status: Review In Progress  (was: Patch Available)

> Ensure repaired data tracking reads a consistent amount of data across 
> replicas
> ---
>
> Key: CASSANDRA-15601
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15601
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Repair
>Reporter: Sam Tunnicliffe
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> When generating a digest for repaired data tracking, the amount of repaired 
> data that needs to be read may depend on the unrepaired data on the replica. 
> As this may vary between replicas, digest mismatches can be reported even 
> though the repaired data may actually be in sync.
> For example, two replicas, A & B and a table like
> {code}
> CREATE TABLE t  (pk int, ck int, PRIMARY KEY (pk, ck)) WITH CLUSTERING ORDER 
> BY ck DESC; 
> Unrepaired
> ===
> Instance A
> (0, 5)
> Instance B
> (0, 6)
> (0, 5)
> Repaired (Both A & B)
> =
> (0, 4)
> (0, 3)
> (0, 2)
> (0, 1)
> (0, 0)
> SELECT * FROM tbl WHERE pk = 0 LIMIT 3;
> {code}
> Instance A would read (0, 5) from the unrepaired set and (0, 4) (0, 3) from 
> the repaired set. 
>  Instance B would read (0, 6) (0, 5) from its unrepaired set and just (0, 4) 
> from repaired data.
> Unrepaired row/range/partition tombstones shadowing repaired data and present 
> on some replicas but not others will have the opposite effect, with more 
> repaired data being read in comparison.
>  To fix this, when repaired data tracking is in effect each replica needs to 
> overread during a full data read. Replicas should read up to {{LIMIT}} (i.e. 
> the {{DataLimit}} of the {{ReadCommand}}) from the repaired set, regardless 
> of how much is read from the unrepaired data. At the point where that amount 
> of repaired data has been read, replica should stop updating the digest. So 
> if unrepaired tombstones cause more than {{LIMIT}} repaired data to be read, 
> the digest is only calculated over the first {{LIMIT}}-worth of repaired data.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15690) Single partition queries can mistakenly omit partition deletions and resurrect data

2020-04-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-15690:
--
Status: Ready to Commit  (was: Review In Progress)

Changes LGTM (previously reviewed internally, re-reviewed again incl. 3.11 and 
trunk branches).

> Single partition queries can mistakenly omit partition deletions and 
> resurrect data
> ---
>
> Key: CASSANDRA-15690
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15690
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Coordination
>Reporter: Aleksey Yeschenko
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0-alpha
>
>
> We have logic that allows us to exclude sstables with partition deletions 
> that are older than the minimum collected timestamp in a local request. 
> However, it’s possible that another node could have rows that aren’t known to 
> the local node that are in turn older than the excluded partition deletion. 
> In such a scenario, those will be mistakenly resurrected, which is a 
> correctness issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15690) Single partition queries can mistakenly omit partition deletions and resurrect data

2020-04-16 Thread Aleksey Yeschenko (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15690?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Aleksey Yeschenko updated CASSANDRA-15690:
--
Reviewers: Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Aleksey Yeschenko, Aleksey Yeschenko  (was: Aleksey Yeschenko)
   Status: Review In Progress  (was: Patch Available)

> Single partition queries can mistakenly omit partition deletions and 
> resurrect data
> ---
>
> Key: CASSANDRA-15690
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15690
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Coordination
>Reporter: Aleksey Yeschenko
>Assignee: Sam Tunnicliffe
>Priority: Normal
> Fix For: 3.0.x, 3.11.x, 4.0-alpha
>
>
> We have logic that allows us to exclude sstables with partition deletions 
> that are older than the minimum collected timestamp in a local request. 
> However, it’s possible that another node could have rows that aren’t known to 
> the local node that are in turn older than the excluded partition deletion. 
> In such a scenario, those will be mistakenly resurrected, which is a 
> correctness issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15674) liveDiskSpaceUsed and totalDiskSpaceUsed get corrupted if IndexSummaryRedistribution gets interrupted

2020-04-16 Thread Marcus Eriksson (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-15674:

Reviewers: Jordan West, Marcus Eriksson  (was: Jordan West)

> liveDiskSpaceUsed and totalDiskSpaceUsed get corrupted if 
> IndexSummaryRedistribution gets interrupted
> -
>
> Key: CASSANDRA-15674
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15674
> Project: Cassandra
>  Issue Type: Bug
>  Components: Local/Compaction, Observability/Metrics
>Reporter: David Capwell
>Assignee: David Capwell
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> IndexSummaryRedistribution is a compaction task and as such extends Holder 
> and supports cancelation by throwing a CompactionInterruptedException.  The 
> issue is that IndexSummaryRedistribution tries to use transactions, but 
> mutates the sstable in-place; transaction is unable to roll back.
> This would be fine (only updates summary) if it wasn’t for the fact the task 
> attempts to also mutate the two metrics liveDiskSpaceUsed and 
> totalDiskSpaceUsed, since these can’t be rolled back any cancelation could 
> corrupt these metrics.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14772) Fix issues in audit / full query log interactions

2020-04-16 Thread Marcus Eriksson (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-14772:

Reviewers: Aleksey Yeschenko, Per Otterström  (was: Aleksey Yeschenko, Per 
Otterström, Vinay Chella)

> Fix issues in audit / full query log interactions
> -
>
> Key: CASSANDRA-14772
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14772
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/CQL, Legacy/Tools
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> There are some problems with the audit + full query log code that need to be 
> resolved before 4.0 is released:
> * Fix performance regression in FQL that makes it less usable than it should 
> be.
> * move full query log specific code to a separate package 
> * do some audit log class renames (I keep reading {{BinLogAuditLogger}} vs 
> {{BinAuditLogger}} wrong for example)
> * avoid parsing the CQL queries twice in {{QueryMessage}} when audit log is 
> enabled.
> * add a new tool to dump audit logs (ie, let fqltool be full query log 
> specific). fqltool crashes when pointed to them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-14772) Fix issues in audit / full query log interactions

2020-04-16 Thread Marcus Eriksson (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-14772?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-14772:

  Fix Version/s: (was: 4.0-rc)
 (was: 4.0)
 4.0-alpha
  Since Version: 4.0-alpha
Source Control Link: 
https://github.com/apache/cassandra/commit/5242f7d4306f034f32e26834df06ff7fc85a3c16
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

committed, thanks!

test runs:
[unit tests|https://circleci.com/gh/krummas/cassandra/3204]
[jvm dtests|https://circleci.com/gh/krummas/cassandra/3205]
[jvm upgrade dtests|https://circleci.com/gh/krummas/cassandra/3209]
[dtests vnodes|https://circleci.com/gh/krummas/cassandra/3206]
[dtests novnodes|https://circleci.com/gh/krummas/cassandra/3207]

> Fix issues in audit / full query log interactions
> -
>
> Key: CASSANDRA-14772
> URL: https://issues.apache.org/jira/browse/CASSANDRA-14772
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/CQL, Legacy/Tools
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> There are some problems with the audit + full query log code that need to be 
> resolved before 4.0 is released:
> * Fix performance regression in FQL that makes it less usable than it should 
> be.
> * move full query log specific code to a separate package 
> * do some audit log class renames (I keep reading {{BinLogAuditLogger}} vs 
> {{BinAuditLogger}} wrong for example)
> * avoid parsing the CQL queries twice in {{QueryMessage}} when audit log is 
> enabled.
> * add a new tool to dump audit logs (ie, let fqltool be full query log 
> specific). fqltool crashes when pointed to them.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Assigned] (CASSANDRA-15731) cassandra-stress fails when we specify a port per node

2020-04-16 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15731?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña reassigned CASSANDRA-15731:
-

Assignee: Andres de la Peña

> cassandra-stress fails when we  specify a port per node
> ---
>
> Key: CASSANDRA-15731
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15731
> Project: Cassandra
>  Issue Type: Bug
>Reporter: Alan Boudreault
>Assignee: Andres de la Peña
>Priority: Normal
> Fix For: 4.0-beta
>
>
> {code}
> $ ./tools/bin/cassandra-stress write n=10 -node 127.0.0.1:9046,127.0.0.1:9048
> ...
> java.lang.RuntimeException: java.lang.IllegalArgumentException: Failed to add 
> contact point: 127.0.0.1:9046
>   at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:148)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:116)
>   at 
> org.apache.cassandra.stress.settings.SettingsSchema.createKeySpaces(SettingsSchema.java:66)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.maybeCreateKeyspaces(StressSettings.java:156)
>   at org.apache.cassandra.stress.StressAction.run(StressAction.java:56)
>   at org.apache.cassandra.stress.Stress.run(Stress.java:143)
>   at org.apache.cassandra.stress.Stress.main(Stress.java:62)
> Caused by: java.lang.IllegalArgumentException: Failed to add contact point: 
> 127.0.0.1:9046
>   at 
> com.datastax.driver.core.Cluster$Builder.addContactPoint(Cluster.java:922)
>   at 
> org.apache.cassandra.stress.util.JavaDriverClient.connect(JavaDriverClient.java:131)
>   at 
> org.apache.cassandra.stress.settings.StressSettings.getJavaDriverClient(StressSettings.java:139)
>   ... 6 more
> Caused by: java.net.UnknownHostException: 127.0.0.1:9046: invalid IPv6 address
>   at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1341)
>   at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1298)
>   at 
> com.datastax.driver.core.Cluster$Builder.addContactPoint(Cluster.java:919)
>   ... 8 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15338) Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest

2020-04-16 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-15338:
--
  Since Version: 4.0-alpha
Source Control Link: 
https://ci-cassandra.apache.org/job/Cassandra-devbranch-test/50/
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

> Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest
> ---
>
> Key: CASSANDRA-15338
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15338
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/unit
>Reporter: David Capwell
>Assignee: Yifan Cai
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
> Attachments: CASS-15338-Docker.zip
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Example failure: 
> [https://circleci.com/gh/dcapwell/cassandra/11#artifacts/containers/1]
>   
> {code:java}
> Testcase: testMessagePurging(org.apache.cassandra.net.ConnectionTest):  FAILED
>  expected:<0> but was:<1>
>  junit.framework.AssertionFailedError: expected:<0> but was:<1>
>    at 
> org.apache.cassandra.net.ConnectionTest.lambda$testMessagePurging$38(ConnectionTest.java:625)
>    at 
> org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:258)
>    at 
> org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:231)
>    at 
> org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:584){code}
>   
>  Looking closer at 
> org.apache.cassandra.net.OutboundConnection.Delivery#stopAndRun it seems that 
> the run method is called before 
> org.apache.cassandra.net.OutboundConnection.Delivery#doRun which may lead to 
> a test race condition where the CountDownLatch completes before executing



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15733) jvm dtest builder should be provided to the factory and expose state

2020-04-16 Thread Alex Petrov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084799#comment-17084799
 ] 

Alex Petrov commented on CASSANDRA-15733:
-

Thank you for the patch; left minor comments on both PRs.

> jvm dtest builder should be provided to the factory and expose state
> 
>
> Key: CASSANDRA-15733
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15733
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Test/dtest
>Reporter: David Capwell
>Assignee: David Capwell
>Priority: Normal
>  Labels: pull-request-available
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Currently the builder is rather heavy and creates configs plus call the 
> factory with specific fields only, this isn’t that flexible and makes it 
> harder to have custom cluster definitions which require additional fields to 
> be defined.  To solve this we should make the builder be sent to the factory 
> and expose the state so the factory can get all the fields it needs, the 
> factory should also be in charge of creating the configs



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15657) Improve zero-copy-streaming containment check by using file sections

2020-04-16 Thread ZhaoYang (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15657?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084797#comment-17084797
 ] 

ZhaoYang commented on CASSANDRA-15657:
--

[~tjake]/[~djoshi] can we merge it?

> Improve zero-copy-streaming containment check by using file sections
> 
>
> Key: CASSANDRA-15657
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15657
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Legacy/Streaming and Messaging
>Reporter: ZhaoYang
>Assignee: ZhaoYang
>Priority: Normal
> Fix For: 4.0
>
>
> Currently zero copy streaming is only enabled for leveled-compaction strategy 
> and it checks if all keys in the sstables are included in the transferred 
> ranges.
> This is very inefficient. The containment check can be improved by checking 
> if transferred sections (the transferred file positions) cover entire sstable.
> I also enabled ZCS for all compaction strategies since the new containment 
> check is very fast..



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-in-jvm-dtest-api] branch master updated: Support for replacing logback with alternate logger config (like log4j2)

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git


The following commit(s) were added to refs/heads/master by this push:
 new 7ddfe52  Support for replacing logback with alternate logger config 
(like log4j2)
7ddfe52 is described below

commit 7ddfe52d51639817c6c5be86c0c8e317e33620eb
Author: Jon Meredith 
AuthorDate: Fri Apr 10 12:04:40 2020 -0600

Support for replacing logback with alternate logger config (like log4j2)

Not all forks use logback, and there is an (prematurely) closed ticket
indicating that it would be valuable CASSANDRA-13212.

Also had to add 'org.w3c.dom' to the InstanceClassLoader so that
log4j2 could load it's configuration.

Patch by Jon Meredith; reviewed by David Capwell and Alex Petrov for 
CASSANDRA-15714.
---
 CHANGELOG.txt   |  4 
 .../java/org/apache/cassandra/distributed/api/ICluster.java | 13 +++--
 2 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
deleted file mode 100644
index 86a9490..000
--- a/CHANGELOG.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-# 0.0.2
-
-CASSANDRA-15684: Improve error codes in NodeToolResult to produce better 
errors and to allow Any style message checks
-CASSANDRA-15713: Make shared class filter for InstanceClassLoader pluggable
diff --git a/src/main/java/org/apache/cassandra/distributed/api/ICluster.java 
b/src/main/java/org/apache/cassandra/distributed/api/ICluster.java
index 6546d95..a586311 100644
--- a/src/main/java/org/apache/cassandra/distributed/api/ICluster.java
+++ b/src/main/java/org/apache/cassandra/distributed/api/ICluster.java
@@ -28,6 +28,8 @@ import java.util.stream.Stream;
 
 public interface ICluster extends AutoCloseable
 {
+public static final String PROPERTY_PREFIX = "cassandra.test";
+
 void startup();
 
 I bootstrap(IInstanceConfig config);
@@ -89,16 +91,15 @@ public interface ICluster extends 
AutoCloseable
 {
 File root = Files.createTempDirectory("in-jvm-dtest").toFile();
 root.deleteOnExit();
-String testConfPath = "test/conf/logback-dtest.xml";
-Path logConfPath = Paths.get(root.getPath(), "/logback-dtest.xml");
-
+String logConfigPropertyName = System.getProperty(PROPERTY_PREFIX 
+ ".logConfigProperty", "logback.configurationFile");
+Path testConfPath = Paths.get(System.getProperty(PROPERTY_PREFIX + 
".logConfigPath", "test/conf/logback-dtest.xml"));
+Path logConfPath = Paths.get(root.getPath(), 
testConfPath.getFileName().toString());
 if (!logConfPath.toFile().exists())
 {
-Files.copy(new File(testConfPath).toPath(),
-   logConfPath);
+Files.copy(testConfPath, logConfPath);
 }
 
-System.setProperty("logback.configurationFile", "file://" + 
logConfPath);
+System.setProperty(logConfigPropertyName, "file://" + logConfPath);
 }
 catch (IOException e)
 {


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-in-jvm-dtest-api] 01/04: Add information about release process

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git

commit b4482d8f657d6fb70fbc407ef2542d10b9772fc6
Author: Alex Petrov 
AuthorDate: Thu Apr 16 12:26:34 2020 +0200

Add information about release process
---
 README.md | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/README.md b/README.md
index 909fd40..665d904 100644
--- a/README.md
+++ b/README.md
@@ -2,3 +2,49 @@
 
 Shared API package for in-JVM distributed tests.
 
+# Releasing
+
+1. Prepare the release:
+
+```
+mvn release:clean
+mvn release:prepare
+mvn release:perform
+```
+
+2. Close staging repository: https://repository.apache.org/#stagingRepositories
+
+3. Issue a vote on developers mailing list. Add your GPG key signature, 
release SHA, and staged artifacts to release information.
+
+## Additional resources:
+
+Parent pom location: https://maven.apache.org/pom/asf/
+Maven distribution docs: 
http://www.apache.org/dev/publishing-maven-artifacts.html
+Creating a new reposotory: https://selfserve.apache.org/
+
+## GPG Key
+
+To generate key, run:
+
+```
+gpg --full-gen-key
+```
+
+To be able to sign releases with this key, make sure your key is:
+
+  * pushed to http://pool.sks-keyservers.net/
+
+```
+gpg --list-sigs ""
+gpg --verbose --send-keys --keyserver hkps://hkps.pool.sks-keyservers.net 

+# to test if it has worked:
+gpg --verbose --recv-keys --keyserver hkps://hkps.pool.sks-keyservers.net 

+```
+
+  * added to KEYS file
+
+```
+svn co --depth files https://dist.apache.org/repos/dist/release/cassandra/ 
release
+(gpg --list-sigs "" && gpg --armor --export "") >> KEYS
+svn commit KEYS -m "Add 's key for releases" # or ask some PMC to 
do this for you by opening CASSANDRA jira, like this one: 
https://issues.apache.org/jira/browse/CASSANDRA-15534
+```
\ No newline at end of file


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-in-jvm-dtest-api] 04/04: Make shared class filter for InstanceClassLoader pluggable

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git

commit d59833f2223a85a4dc3f4ea597384588d5d008df
Author: David Capwell 
AuthorDate: Fri Apr 10 15:27:56 2020 -0700

Make shared class filter for InstanceClassLoader pluggable

Patch by David Capwell; reviewed by Jon Meredith and Alex Petrov for 
CASSANDRA-15713.
---
 CHANGELOG.txt  |  3 +-
 .../distributed/shared/InstanceClassLoader.java| 41 ++
 2 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index bb3d907..86a9490 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -1,3 +1,4 @@
 # 0.0.2
 
-CASSANDRA-15684: improve error codes in NodeToolResult to produce better 
errors and to allow Any style message checks
+CASSANDRA-15684: Improve error codes in NodeToolResult to produce better 
errors and to allow Any style message checks
+CASSANDRA-15713: Make shared class filter for InstanceClassLoader pluggable
diff --git 
a/src/main/java/org/apache/cassandra/distributed/shared/InstanceClassLoader.java
 
b/src/main/java/org/apache/cassandra/distributed/shared/InstanceClassLoader.java
index 4f2fc8a..51cd14a 100644
--- 
a/src/main/java/org/apache/cassandra/distributed/shared/InstanceClassLoader.java
+++ 
b/src/main/java/org/apache/cassandra/distributed/shared/InstanceClassLoader.java
@@ -26,33 +26,46 @@ import java.util.function.Predicate;
 
 public class InstanceClassLoader extends URLClassLoader
 {
-private static final Predicate sharePackage = name ->
-  
name.startsWith("org.apache.cassandra.distributed.api.")
-  || 
name.startsWith("org.apache.cassandra.distributed.shared.")
-  || 
name.startsWith("sun.")
-  || 
name.startsWith("oracle.")
-  || 
name.startsWith("com.intellij.")
-  || 
name.startsWith("com.sun.")
-  || 
name.startsWith("com.oracle.")
-  || 
name.startsWith("java.")
-  || 
name.startsWith("javax.")
-  || 
name.startsWith("jdk.")
-  || 
name.startsWith("netscape.")
-  || 
name.startsWith("org.xml.sax.");
+private static final Predicate DEFAULT_SHARED_PACKAGES =
+  name ->
+  name.startsWith("org.apache.cassandra.distributed.api.")
+  || name.startsWith("org.apache.cassandra.distributed.shared.")
+  || name.startsWith("sun.")
+  || name.startsWith("oracle.")
+  || name.startsWith("com.intellij.")
+  || name.startsWith("com.sun.")
+  || name.startsWith("com.oracle.")
+  || name.startsWith("java.")
+  || name.startsWith("javax.")
+  || name.startsWith("jdk.")
+  || name.startsWith("netscape.")
+  || name.startsWith("org.xml.sax.");
 
 private volatile boolean isClosed = false;
 private final URL[] urls;
 private final int generation; // used to help debug class loader leaks, by 
helping determine which classloaders should have been collected
 private final int id;
 private final ClassLoader sharedClassLoader;
+private final Predicate loadShared;
 
 public InstanceClassLoader(int generation, int id, URL[] urls, ClassLoader 
sharedClassLoader)
 {
+this(generation, id, urls, sharedClassLoader, DEFAULT_SHARED_PACKAGES);
+}
+
+public InstanceClassLoader(int generation, int id, URL[] urls, ClassLoader 
sharedClassLoader, Predicate loadShared)
+{
 super(urls, null);
 this.urls = urls;
 this.sharedClassLoader = sharedClassLoader;
 this.generation = generation;
 this.id = id;
+this.loadShared = loadShared == null ? DEFAULT_SHARED_PACKAGES : 
loadShared;
+}
+
+public static Predicate getDefaultLoadSharedFilter()
+{
+return DEFAULT_SHARED_PACKAGES;
 }
 
 public int getClusterGeneration()
@@ -68,7 +81,7 @@ public class InstanceClassLoader extends URLClassLoader
 @Override
 public Class loadClass(String name) throws ClassNotFoundException
 {
-if (sharePackage.test(name))
+if (loadShared.test(name))
 return sharedClassLoader.loadClass(name);
 
 return loadClassInternal(name);



[cassandra-in-jvm-dtest-api] 03/04: Add information about publishing snapshots

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git

commit 29d055b7cffc66a852505660930c980c185138a1
Author: Alex Petrov 
AuthorDate: Thu Apr 16 12:51:19 2020 +0200

Add information about publishing snapshots
---
 README.md | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/README.md b/README.md
index 665d904..20e24ee 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,13 @@
 
 Shared API package for in-JVM distributed tests.
 
+# Publishing snapshot
+
+```
+mvn versions:set -DnewVersion=0.0.2-`git rev-parse --short HEAD`-SNAPSHOT
+mvn deploy
+```
+
 # Releasing
 
 1. Prepare the release:


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-in-jvm-dtest-api] branch master updated (e620eb3 -> d59833f)

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a change to branch master
in repository 
https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git.


from e620eb3  Reformat code according to Apache Cassandra styleguide
 new b4482d8  Add information about release process
 new ced1ff7  NodeToolResult was modified on trunk to produce better errors 
and to allow Any style message checks for errors, add them here.
 new 29d055b  Add information about publishing snapshots
 new d59833f  Make shared class filter for InstanceClassLoader pluggable

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGELOG.txt  |  4 ++
 README.md  | 53 
 .../cassandra/distributed/api/NodeToolResult.java  | 58 --
 .../distributed/shared/InstanceClassLoader.java| 41 +--
 4 files changed, 137 insertions(+), 19 deletions(-)
 create mode 100644 CHANGELOG.txt


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra-in-jvm-dtest-api] 02/04: NodeToolResult was modified on trunk to produce better errors and to allow Any style message checks for errors, add them here.

2020-04-16 Thread ifesdjeen
This is an automated email from the ASF dual-hosted git repository.

ifesdjeen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-in-jvm-dtest-api.git

commit ced1ff77e6353d9d08f3e3d209a54d66899e3696
Author: David Capwell 
AuthorDate: Thu Apr 2 11:51:39 2020 -0700

NodeToolResult was modified on trunk to produce better errors and to allow 
Any style message checks for errors, add them here.

Patch by David Capwell; reviewed by Benjamin Lerer and Alex Petrov for 
CASSANDRA-15684.
---
 CHANGELOG.txt  |  3 ++
 .../cassandra/distributed/api/NodeToolResult.java  | 58 --
 2 files changed, 56 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.txt b/CHANGELOG.txt
new file mode 100644
index 000..bb3d907
--- /dev/null
+++ b/CHANGELOG.txt
@@ -0,0 +1,3 @@
+# 0.0.2
+
+CASSANDRA-15684: improve error codes in NodeToolResult to produce better 
errors and to allow Any style message checks
diff --git 
a/src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java 
b/src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
index 8b17c3a..2e5c5f0 100644
--- a/src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
+++ b/src/main/java/org/apache/cassandra/distributed/api/NodeToolResult.java
@@ -18,10 +18,14 @@
 
 package org.apache.cassandra.distributed.api;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
 import java.util.Arrays;
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 import java.util.stream.Collectors;
+import java.util.stream.Stream;
 import javax.management.Notification;
 
 import org.apache.cassandra.distributed.shared.AssertUtils;
@@ -70,20 +74,29 @@ public class NodeToolResult
 {
 public Asserts success()
 {
-AssertUtils.assertEquals("nodetool command " + commandAndArgs[0] + 
" was not successful", 0, rc);
+if (rc != 0)
+fail("was not successful");
 return this;
 }
 
 public Asserts failure()
 {
-AssertUtils.assertNotEquals("nodetool command " + 
commandAndArgs[0] + " was successful but not expected to be", 0, rc);
+if (rc == 0)
+fail("was successful but not expected to be");
 return this;
 }
 
 public Asserts errorContains(String msg)
 {
+return errorContainsAny(msg);
+}
+
+public Asserts errorContainsAny(String... messages)
+{
+AssertUtils.assertNotEquals("no error messages defined to check 
against", 0, messages.length);
 AssertUtils.assertNotNull("No exception was found but expected 
one", error);
-AssertUtils.assertTrue("Error message '" + error.getMessage() + "' 
does not contain '" + msg + "'", error.getMessage().contains(msg));
+if (!Stream.of(messages).anyMatch(msg -> 
error.getMessage().contains(msg)))
+fail("Error message '" + error.getMessage() + "' does not 
contain any of " + Arrays.toString(messages));
 return this;
 }
 
@@ -98,7 +111,7 @@ public class NodeToolResult
 return this;
 }
 }
-AssertUtils.fail("Unable to locate message " + msg + " in 
notifications: " + notifications);
+fail("Unable to locate message " + msg + " in notifications: " + 
NodeToolResult.toString(notifications));
 return this; // unreachable
 }
 
@@ -117,9 +130,44 @@ public class NodeToolResult
 }
 }
 }
-AssertUtils.fail("Unable to locate message '" + msg + "' in 
notifications: " + notifications);
+fail("Unable to locate message '" + msg + "' in notifications: " + 
NodeToolResult.toString(notifications));
 return this; // unreachable
 }
+
+private void fail(String message)
+{
+StringBuilder sb = new StringBuilder();
+sb.append("nodetool command 
").append(Arrays.toString(commandAndArgs)).append(" 
").append(message).append("\n");
+sb.append("Notifications:\n");
+for (Notification n : notifications)
+sb.append(NodeToolResult.toString(n)).append("\n");
+if (error != null)
+
sb.append("Error:\n").append(getStackTraceAsString(error)).append("\n");
+throw new AssertionError(sb.toString());
+}
+}
+
+private static String getStackTraceAsString(Throwable throwable) {
+StringWriter stringWriter = new StringWriter();
+throwable.printStackTrace(new PrintWriter(stringWriter));
+return stringWriter.toString();
+}
+
+private static String toString(Collection notifications)
+{
+return 
notifications.stream().map(NodeToolResult::toString).collect(Collectors.joining(",
 "));
+}
+
+private 

[jira] [Updated] (CASSANDRA-15501) Duplicate results with DISTINCT queries in mixed mode 2.1/3.0

2020-04-16 Thread Marcus Eriksson (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marcus Eriksson updated CASSANDRA-15501:

  Fix Version/s: (was: 3.11.x)
 (was: 3.0.x)
 4.0-alpha
 3.11.7
 3.0.21
 2.2.17
  Since Version: 3.0 alpha 1
Source Control Link: 
https://github.com/apache/cassandra/commit/16f639af94f56cdc7145299730278e27a9113e2e
 Resolution: Fixed
 Status: Resolved  (was: Ready to Commit)

committed the duplicate-fix to 3.0 and 3.11 and the dtest + tests to 2.2 and 
trunk, thanks!

> Duplicate results with DISTINCT queries in mixed mode 2.1/3.0
> -
>
> Key: CASSANDRA-15501
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15501
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/Core
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 2.2.17, 3.0.21, 3.11.7, 4.0-alpha
>
>
> When a client switches coordinator from a 2.1 node to a 3.0 node it sends a 
> 2.1 paging state to the 3.0 node. The 2.1 {{PagingState}} does not have 
> {{remainingInPartition}} so on the 3.0 side we default this to 
> Integer.MAX_VALUE. This value is then used to decide if the lastKey should be 
> included in the result.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cassandra-2.2 updated: Duplicate results with DISTINCT queries in mixed mode

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
 new 16f639a  Duplicate results with DISTINCT queries in mixed mode
16f639a is described below

commit 16f639af94f56cdc7145299730278e27a9113e2e
Author: Marcus Eriksson 
AuthorDate: Tue Apr 14 16:26:30 2020 +0200

Duplicate results with DISTINCT queries in mixed mode

Patch by marcuse; reviewed by Aleksey Yeschenko, Sam Tunnicliffe and Alex 
Petrov for CASSANDRA-15501
---
 CHANGES.txt|  1 +
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../cassandra/distributed/impl/Instance.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 29 +++
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 8 files changed, 139 insertions(+), 23 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 56dd315..6913575 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
 2.2.18
+ * Duplicate results with DISTINCT queries in mixed mode (CASSANDRA-15501)
  * Disable JMX rebinding (CASSANDRA-15653)
 Merged from 2.1:
   * Fix parse error in cqlsh COPY FROM and formatting for map of blobs 
(CASSANDRA-15679)
diff --git 
a/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java 
b/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
index 73a3c8a..71f3f8c 100644
--- a/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
+++ b/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
@@ -19,7 +19,9 @@
 package org.apache.cassandra.distributed;
 
 import java.io.File;
+import java.io.IOException;
 import java.util.List;
+import java.util.function.Consumer;
 
 import org.apache.cassandra.distributed.api.IInstanceConfig;
 import org.apache.cassandra.distributed.impl.AbstractCluster;
@@ -69,6 +71,11 @@ public class UpgradeableCluster extends 
AbstractCluster im
 return build(nodeCount).start();
 }
 
+public static UpgradeableCluster create(int nodeCount, Versions.Version 
version, Consumer configUpdater) throws IOException
+{
+return 
build(nodeCount).withConfig(configUpdater).withVersion(version).start();
+}
+
 public static UpgradeableCluster create(int nodeCount, Versions.Version 
version) throws Throwable
 {
 return build(nodeCount).withVersion(version).start();
diff --git 
a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java 
b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
index 05c8af8..f123338 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
@@ -122,6 +122,13 @@ public abstract class AbstractCluster 
implements ICluster 
implements ICluster 
implements ICluster E transfer(E object)
@@ -124,7 +125,7 @@ public abstract class DelegatingInvokableInstance 
implements IInvokableInstance
 @Override
 public void startup(ICluster cluster)
 {
-delegate().startup(cluster);
+delegateForStartup().startup(cluster);
 }
 
 @Override
diff --git 
a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java 
b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
index 1c19bca..7a1c988 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Instance.java
@@ -253,7 +253,7 @@ public class Instance extends IsolatedExecutor implements 
IInvokableInstance
 int toNum = to.config().num();
 return cluster.filters().permitOutbound(fromNum, toNum, 
serializeMessage(message, id,

  broadcastAddress(),
-   
  to.broadcastAddress()));
+   
  to.config().broadcastAddress()));
 }
 
 public boolean allowIncomingMessage(MessageIn message, int id)
diff --git 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairTest.java
 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairTest.java
index e69e38a..fabf172 100644
--- 
a/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairTest.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/upgrade/MixedModeReadRepairTest.java
@@ -21,9 +21,9 @@ package 

[cassandra] 01/01: Merge branch 'cassandra-2.2' into cassandra-3.0

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 577409673e9d52385a7c2c175b0e1ef4e0317cba
Merge: 29c8624 16f639a
Author: Marcus Eriksson 
AuthorDate: Thu Apr 16 12:52:07 2020 +0200

Merge branch 'cassandra-2.2' into cassandra-3.0

 CHANGES.txt|  3 +-
 .../service/pager/PartitionRangeQueryPager.java|  5 +-
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../cassandra/distributed/impl/Instance.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 27 +++---
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 9 files changed, 142 insertions(+), 25 deletions(-)

diff --cc CHANGES.txt
index eb0b66e,6913575..5af0ef3
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,10 -1,10 +1,11 @@@
 -2.2.18
 +3.0.21
 + * Memtable memory allocations may deadlock (CASSANDRA-15367)
 + * Run evictFromMembership in GossipStage (CASSANDRA-15592)
 +Merged from 2.2:
+  * Duplicate results with DISTINCT queries in mixed mode (CASSANDRA-15501)
   * Disable JMX rebinding (CASSANDRA-15653)
  Merged from 2.1:
--  * Fix parse error in cqlsh COPY FROM and formatting for map of blobs 
(CASSANDRA-15679)
 -
 -2.2.17
++ * Fix parse error in cqlsh COPY FROM and formatting for map of blobs 
(CASSANDRA-15679)
   * Fix Commit log replays when static column clustering keys are collections 
(CASSANDRA-14365)
   * Fix Red Hat init script on newer systemd versions (CASSANDRA-15273)
   * Allow EXTRA_CLASSPATH to work on tar/source installations (CASSANDRA-15567)
diff --cc 
src/java/org/apache/cassandra/service/pager/PartitionRangeQueryPager.java
index ea79017,000..aed5a23
mode 100644,00..100644
--- a/src/java/org/apache/cassandra/service/pager/PartitionRangeQueryPager.java
+++ b/src/java/org/apache/cassandra/service/pager/PartitionRangeQueryPager.java
@@@ -1,124 -1,0 +1,127 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +package org.apache.cassandra.service.pager;
 +
 +import org.slf4j.Logger;
 +import org.slf4j.LoggerFactory;
 +
 +import org.apache.cassandra.db.*;
 +import org.apache.cassandra.db.filter.DataLimits;
 +import org.apache.cassandra.db.rows.Row;
 +import org.apache.cassandra.dht.*;
 +import org.apache.cassandra.exceptions.RequestExecutionException;
 +
 +/**
 + * Pages a PartitionRangeReadCommand.
 + *
 + * Note: this only work for CQL3 queries for now (because thrift queries 
expect
 + * a different limit on the rows than on the columns, which complicates it).
 + */
 +public class PartitionRangeQueryPager extends AbstractQueryPager
 +{
 +private static final Logger logger = 
LoggerFactory.getLogger(PartitionRangeQueryPager.class);
 +
 +private volatile DecoratedKey lastReturnedKey;
 +private volatile PagingState.RowMark lastReturnedRow;
 +
 +public PartitionRangeQueryPager(PartitionRangeReadCommand command, 
PagingState state, int protocolVersion)
 +{
 +super(command, protocolVersion);
 +
 +if (state != null)
 +{
 +lastReturnedKey = 
command.metadata().decorateKey(state.partitionKey);
 +lastReturnedRow = state.rowMark;
 +restoreState(lastReturnedKey, state.remaining, 
state.remainingInPartition);
 +}
 +}
 +
 +public PagingState state()
 +{
 +return lastReturnedKey == null
 + ? null
 + : new PagingState(lastReturnedKey.getKey(), lastReturnedRow, 
maxRemaining(), remainingInPartition());
 +}
 +
 +protected ReadCommand nextPageReadCommand(int pageSize)
 +throws RequestExecutionException
 +{
 +DataLimits limits;
 +DataRange fullRange = 
((PartitionRangeReadCommand)command).dataRange();
 +DataRange pageRange;
 +if (lastReturnedKey == null)
 +{
 +pageRange = fullRange;
 +limits = command.limits().forPaging(pageSize);
 +}
 +   

[cassandra] branch trunk updated (753b40e -> 7855fef)

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a change to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 753b40e  Fix flaky ConnectionTest#testMessagePurging patch by Yifan 
Cai; reviewed by Andres de la Pena for CASSANDRA-15338
 new 16f639a  Duplicate results with DISTINCT queries in mixed mode
 new 5774096  Merge branch 'cassandra-2.2' into cassandra-3.0
 new 53740bc  Merge branch 'cassandra-3.0' into cassandra-3.11
 new 7855fef  Merge branch 'cassandra-3.11' into trunk

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|  1 +
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../test/RepairCoordinatorNeighbourDown.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 32 +++-
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 8 files changed, 140 insertions(+), 25 deletions(-)
 create mode 100644 
test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch cassandra-3.0 updated (29c8624 -> 5774096)

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a change to branch cassandra-3.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 29c8624  Merge branch 'cassandra-2.2' into cassandra-3.0
 new 16f639a  Duplicate results with DISTINCT queries in mixed mode
 new 5774096  Merge branch 'cassandra-2.2' into cassandra-3.0

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|  3 +-
 .../service/pager/PartitionRangeQueryPager.java|  5 +-
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../cassandra/distributed/impl/Instance.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 27 +++---
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 9 files changed, 142 insertions(+), 25 deletions(-)
 create mode 100644 
test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] 01/01: Merge branch 'cassandra-3.0' into cassandra-3.11

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 53740bcbee34a5920a4af28fb9b965648c249898
Merge: 9e891cb 5774096
Author: Marcus Eriksson 
AuthorDate: Thu Apr 16 12:55:38 2020 +0200

Merge branch 'cassandra-3.0' into cassandra-3.11

 CHANGES.txt|  1 +
 .../service/pager/PartitionRangeQueryPager.java|  5 +-
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../cassandra/distributed/impl/Instance.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 27 +++---
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 9 files changed, 141 insertions(+), 24 deletions(-)



-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] 01/01: Merge branch 'cassandra-3.11' into trunk

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit 7855fef42a7ec96dc9828c1737df218e391c8b8f
Merge: 753b40e 53740bc
Author: Marcus Eriksson 
AuthorDate: Thu Apr 16 12:56:15 2020 +0200

Merge branch 'cassandra-3.11' into trunk

 CHANGES.txt|  1 +
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../test/RepairCoordinatorNeighbourDown.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 32 +++-
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 8 files changed, 140 insertions(+), 25 deletions(-)

diff --cc 
test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
index 8a1eff4,71f3f8c..57ace93
--- a/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
+++ b/test/distributed/org/apache/cassandra/distributed/UpgradeableCluster.java
@@@ -19,9 -19,10 +19,11 @@@
  package org.apache.cassandra.distributed;
  
  import java.io.File;
+ import java.io.IOException;
  import java.util.List;
+ import java.util.function.Consumer;
  
 +import org.apache.cassandra.distributed.api.ICluster;
  import org.apache.cassandra.distributed.api.IInstanceConfig;
  import org.apache.cassandra.distributed.impl.AbstractCluster;
  import org.apache.cassandra.distributed.api.IUpgradeableInstance;
diff --cc 
test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
index bcfaaf5,6539747..cdcc39c
--- 
a/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/impl/AbstractCluster.java
@@@ -155,16 -162,9 +162,16 @@@ public abstract class AbstractCluster<
  @Override
  public synchronized void startup()
  {
 +startup(AbstractCluster.this);
 +}
 +
 +public synchronized void startup(ICluster cluster)
 +{
 +if (cluster != AbstractCluster.this)
 +throw new IllegalArgumentException("Only the owning cluster 
can be used for startup");
  if (!isShutdown)
  throw new IllegalStateException();
- delegate().startup(cluster);
 -delegateForStartup().startup(AbstractCluster.this);
++delegateForStartup().startup(cluster);
  isShutdown = false;
  updateMessagingVersions();
  }
diff --cc 
test/distributed/org/apache/cassandra/distributed/test/RepairCoordinatorNeighbourDown.java
index db01b13,000..dd6e2c4
mode 100644,00..100644
--- 
a/test/distributed/org/apache/cassandra/distributed/test/RepairCoordinatorNeighbourDown.java
+++ 
b/test/distributed/org/apache/cassandra/distributed/test/RepairCoordinatorNeighbourDown.java
@@@ -1,199 -1,0 +1,199 @@@
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one
 + * or more contributor license agreements.  See the NOTICE file
 + * distributed with this work for additional information
 + * regarding copyright ownership.  The ASF licenses this file
 + * to you under the Apache License, Version 2.0 (the
 + * "License"); you may not use this file except in compliance
 + * with the License.  You may obtain a copy of the License at
 + *
 + * http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
 +package org.apache.cassandra.distributed.test;
 +
 +import java.net.UnknownHostException;
 +import java.time.Duration;
 +import java.util.concurrent.CompletableFuture;
 +import java.util.concurrent.Future;
 +import java.util.concurrent.TimeUnit;
 +import java.util.concurrent.atomic.AtomicReference;
 +
 +import com.google.common.util.concurrent.Uninterruptibles;
 +import org.junit.Assert;
 +import org.junit.Before;
 +import org.junit.Test;
 +
 +import org.apache.cassandra.distributed.api.NodeToolResult;
 +import 
org.apache.cassandra.distributed.test.DistributedRepairUtils.RepairParallelism;
 +import 
org.apache.cassandra.distributed.test.DistributedRepairUtils.RepairType;
 +import org.apache.cassandra.gms.FailureDetector;
 +import org.apache.cassandra.locator.InetAddressAndPort;
 +import org.apache.cassandra.net.Verb;
 +import org.apache.cassandra.utils.FBUtilities;
 +
 +import static java.lang.String.format;
 +import static org.apache.cassandra.distributed.api.IMessageFilters.Matcher.of;
 +import static 

[cassandra] branch cassandra-3.11 updated (9e891cb -> 53740bc)

2020-04-16 Thread marcuse
This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a change to branch cassandra-3.11
in repository https://gitbox.apache.org/repos/asf/cassandra.git.


from 9e891cb  Merge branch 'cassandra-3.0' into cassandra-3.11
 new 16f639a  Duplicate results with DISTINCT queries in mixed mode
 new 5774096  Merge branch 'cassandra-2.2' into cassandra-3.0
 new 53740bc  Merge branch 'cassandra-3.0' into cassandra-3.11

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 CHANGES.txt|  1 +
 .../service/pager/PartitionRangeQueryPager.java|  5 +-
 .../cassandra/distributed/UpgradeableCluster.java  |  7 ++
 .../distributed/impl/AbstractCluster.java  | 11 ++-
 .../impl/DelegatingInvokableInstance.java  |  3 +-
 .../cassandra/distributed/impl/Instance.java   |  2 +-
 .../upgrade/MixedModeReadRepairTest.java   | 27 +++---
 .../cassandra/distributed/upgrade/PagingTest.java  | 96 ++
 .../distributed/upgrade/UpgradeTestBase.java   | 13 ++-
 9 files changed, 141 insertions(+), 24 deletions(-)
 create mode 100644 
test/distributed/org/apache/cassandra/distributed/upgrade/PagingTest.java


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15338) Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest

2020-04-16 Thread Jira


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andres de la Peña updated CASSANDRA-15338:
--
Status: Ready to Commit  (was: Review In Progress)

> Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest
> ---
>
> Key: CASSANDRA-15338
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15338
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/unit
>Reporter: David Capwell
>Assignee: Yifan Cai
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
> Attachments: CASS-15338-Docker.zip
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Example failure: 
> [https://circleci.com/gh/dcapwell/cassandra/11#artifacts/containers/1]
>   
> {code:java}
> Testcase: testMessagePurging(org.apache.cassandra.net.ConnectionTest):  FAILED
>  expected:<0> but was:<1>
>  junit.framework.AssertionFailedError: expected:<0> but was:<1>
>    at 
> org.apache.cassandra.net.ConnectionTest.lambda$testMessagePurging$38(ConnectionTest.java:625)
>    at 
> org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:258)
>    at 
> org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:231)
>    at 
> org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:584){code}
>   
>  Looking closer at 
> org.apache.cassandra.net.OutboundConnection.Delivery#stopAndRun it seems that 
> the run method is called before 
> org.apache.cassandra.net.OutboundConnection.Delivery#doRun which may lead to 
> a test race condition where the CountDownLatch completes before executing



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15338) Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest

2020-04-16 Thread Jira


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084750#comment-17084750
 ] 

Andres de la Peña commented on CASSANDRA-15338:
---

Committed to trunk as 
[753b40eb0f570fc88b5211b9bcea04761a240071|https://github.com/apache/cassandra/commit/753b40eb0f570fc88b5211b9bcea04761a240071].

> Fix flakey testMessagePurging - org.apache.cassandra.net.ConnectionTest
> ---
>
> Key: CASSANDRA-15338
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15338
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/unit
>Reporter: David Capwell
>Assignee: Yifan Cai
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
> Attachments: CASS-15338-Docker.zip
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Example failure: 
> [https://circleci.com/gh/dcapwell/cassandra/11#artifacts/containers/1]
>   
> {code:java}
> Testcase: testMessagePurging(org.apache.cassandra.net.ConnectionTest):  FAILED
>  expected:<0> but was:<1>
>  junit.framework.AssertionFailedError: expected:<0> but was:<1>
>    at 
> org.apache.cassandra.net.ConnectionTest.lambda$testMessagePurging$38(ConnectionTest.java:625)
>    at 
> org.apache.cassandra.net.ConnectionTest.doTestManual(ConnectionTest.java:258)
>    at 
> org.apache.cassandra.net.ConnectionTest.testManual(ConnectionTest.java:231)
>    at 
> org.apache.cassandra.net.ConnectionTest.testMessagePurging(ConnectionTest.java:584){code}
>   
>  Looking closer at 
> org.apache.cassandra.net.OutboundConnection.Delivery#stopAndRun it seems that 
> the run method is called before 
> org.apache.cassandra.net.OutboundConnection.Delivery#doRun which may lead to 
> a test race condition where the CountDownLatch completes before executing



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[cassandra] branch trunk updated: Fix flaky ConnectionTest#testMessagePurging patch by Yifan Cai; reviewed by Andres de la Pena for CASSANDRA-15338

2020-04-16 Thread adelapena
This is an automated email from the ASF dual-hosted git repository.

adelapena pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/trunk by this push:
 new 753b40e  Fix flaky ConnectionTest#testMessagePurging patch by Yifan 
Cai; reviewed by Andres de la Pena for CASSANDRA-15338
753b40e is described below

commit 753b40eb0f570fc88b5211b9bcea04761a240071
Author: yifan-c 
AuthorDate: Mon Mar 9 19:45:55 2020 -0700

Fix flaky ConnectionTest#testMessagePurging
patch by Yifan Cai; reviewed by Andres de la Pena for CASSANDRA-15338
---
 test/unit/org/apache/cassandra/net/ConnectionTest.java | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/test/unit/org/apache/cassandra/net/ConnectionTest.java 
b/test/unit/org/apache/cassandra/net/ConnectionTest.java
index d4ec84c..c507a80 100644
--- a/test/unit/org/apache/cassandra/net/ConnectionTest.java
+++ b/test/unit/org/apache/cassandra/net/ConnectionTest.java
@@ -615,17 +615,16 @@ public class ConnectionTest
 try
 {
 inbound.open().sync();
-CountDownLatch receiveDone = new CountDownLatch(1);
 CountDownLatch deliveryDone = new CountDownLatch(1);
 
-unsafeSetHandler(Verb._TEST_1, () -> msg -> 
receiveDone.countDown());
+unsafeSetHandler(Verb._TEST_1, () -> msg -> {
+outbound.unsafeRunOnDelivery(deliveryDone::countDown);
+});
 outbound.enqueue(Message.out(Verb._TEST_1, noPayload));
 Assert.assertEquals(1, outbound.pendingCount());
-outbound.unsafeRunOnDelivery(deliveryDone::countDown);
 
-Assert.assertTrue(receiveDone.await(10, SECONDS));
 Assert.assertTrue(deliveryDone.await(10, SECONDS));
-Assert.assertEquals(0, receiveDone.getCount());
+Assert.assertEquals(0, deliveryDone.getCount());
 Assert.assertEquals(0, outbound.pendingCount());
 }
 finally


-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15501) Duplicate results with DISTINCT queries in mixed mode 2.1/3.0

2020-04-16 Thread Alex Petrov (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084702#comment-17084702
 ] 

Alex Petrov commented on CASSANDRA-15501:
-

+1 for in-jvm dtest part.

> Duplicate results with DISTINCT queries in mixed mode 2.1/3.0
> -
>
> Key: CASSANDRA-15501
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15501
> Project: Cassandra
>  Issue Type: Bug
>  Components: Legacy/Core
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 3.0.x, 3.11.x
>
>
> When a client switches coordinator from a 2.1 node to a 3.0 node it sends a 
> 2.1 paging state to the 3.0 node. The 2.1 {{PagingState}} does not have 
> {{remainingInPartition}} so on the 3.0 side we default this to 
> Integer.MAX_VALUE. This value is then used to decide if the lastKey should be 
> included in the result.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15728) Setting "cassandra_dir" in pytest.ini has no effect

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15728:

Reviewers: Benjamin Lerer, Berenguer Blasi  (was: Berenguer Blasi)

> Setting "cassandra_dir" in pytest.ini has no effect
> ---
>
> Key: CASSANDRA-15728
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15728
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> Setting *cassandra_dir* in *pytest.ini* should not require specifying 
> *--cassandra-dir* on the command line:
> {code}
> $ pytest cql_tracing_test.py
> 
>  test session starts 
> =
> platform linux -- Python 3.6.9, pytest-3.6.4, py-1.8.1, pluggy-0.7.1
> rootdir: /home/nastra/Development/pycharm-projects/cassandra-dtest, inifile: 
> pytest.ini
> plugins: timeout-1.3.4, flaky-3.6.1
> timeout: 900.0s
> timeout method: signal
> timeout func_only: False
> collecting 4 items
>   
>   
>
> INTERNALERROR> Traceback (most recent call last):
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 178, 
> in wrap_session
> INTERNALERROR> session.exitstatus = doit(config, session) or 0
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 214, 
> in _main
> INTERNALERROR> config.hook.pytest_collection(session=session)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 224, 
> in pytest_collection
> INTERNALERROR> return session.perform_collect()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/_pytest/main.py", line 429, 
> in perform_collect
> INTERNALERROR> session=self, config=self.config, items=items
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/hooks.py", line 258, 
> in __call__
> INTERNALERROR> return self._hookexec(self, self._nonwrappers + 
> self._wrappers, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 67, 
> in _hookexec
> INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/manager.py", line 61, 
> in 
> INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 201, 
> in _multicall
> INTERNALERROR> return outcome.get_result()
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 76, 
> in get_result
> INTERNALERROR> raise ex[1].with_traceback(ex[2])
> INTERNALERROR>   File 
> "/home/nastra/dtest/lib/python3.6/site-packages/pluggy/callers.py", line 180, 
> in _multicall
> INTERNALERROR> res = hook_impl.function(*args)
> INTERNALERROR>   File 
> "/home/nastra/Development/pycharm-projects/cassandra-dtest/conftest.py", line 
> 440, in pytest_collection_modifyitems
> INTERNALERROR> raise Exception("Required 

[jira] [Updated] (CASSANDRA-15736) Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15736:

Test and Documentation Plan: See syntaxwarnings
 Status: Patch Available  (was: Open)

> Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="
> 
>
> Key: CASSANDRA-15736
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15736
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the upgrade to Python 3.8 there are SyntaxWarnings now showing up in the 
> tests, which should be fixed.
> {code}
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:207: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:240: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:393: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   while attempt < 3 and ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:399: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:422: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:425: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:124: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(filtered_errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:152: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:286: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15736) Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15736:

Change Category: Quality Assurance
 Complexity: Low Hanging Fruit
  Fix Version/s: 4.0-alpha
 Status: Open  (was: Triage Needed)

> Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="
> 
>
> Key: CASSANDRA-15736
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15736
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> With the upgrade to Python 3.8 there are SyntaxWarnings now showing up in the 
> tests, which should be fixed.
> {code}
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:207: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:240: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:393: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   while attempt < 3 and ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:399: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:422: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:425: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:124: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(filtered_errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:152: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:286: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15736) Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="

2020-04-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CASSANDRA-15736:
---
Labels: pull-request-available  (was: )

> Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="
> 
>
> Key: CASSANDRA-15736
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15736
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
>
> With the upgrade to Python 3.8 there are SyntaxWarnings now showing up in the 
> tests, which should be fixed.
> {code}
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:207: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/conftest.py:240: SyntaxWarning: "is 
> not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:393: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   while attempt < 3 and ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:399: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:422: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:425: 
> SyntaxWarning: "is not" with a literal. Did you mean "!="?
>   if ret_val is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:124: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(filtered_errors) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:152: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(logs) is not 0:
> /home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:286: SyntaxWarning: 
> "is not" with a literal. Did you mean "!="?
>   if len(errors) is not 0:
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Commented] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Michael Semb Wever (Jira)


[ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17084648#comment-17084648
 ] 

Michael Semb Wever commented on CASSANDRA-15734:


Broken: 
https://ci-cassandra.apache.org/job/Cassandra-trunk/75/testReport/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/

Fixed: 
https://ci-cassandra.apache.org/job/Cassandra-devbranch/63/testReport/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15734:

Test and Documentation Plan: See PR
 Status: Patch Available  (was: In Progress)

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15734:

Change Category: Code Clarity
 Complexity: Low Hanging Fruit
 Status: Open  (was: Triage Needed)

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15734:

  Workflow: Cassandra Default Workflow  (was: Cassandra Bug Workflow)
Issue Type: Task  (was: Bug)

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Task
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CASSANDRA-15734:
---
Labels: pull-request-available  (was: )

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>  Labels: pull-request-available
> Fix For: 4.0-alpha
>
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-15736) Fix Python SyntaxWarning: "is not" with a literal. Did you mean "!="

2020-04-16 Thread Eduard Tudenhoefner (Jira)
Eduard Tudenhoefner created CASSANDRA-15736:
---

 Summary: Fix Python SyntaxWarning: "is not" with a literal. Did 
you mean "!="
 Key: CASSANDRA-15736
 URL: https://issues.apache.org/jira/browse/CASSANDRA-15736
 Project: Cassandra
  Issue Type: Task
  Components: Test/dtest
Reporter: Eduard Tudenhoefner
Assignee: Eduard Tudenhoefner


With the upgrade to Python 3.8 there are SyntaxWarnings now showing up in the 
tests, which should be fixed.

{code}
/home/cassandra/cassandra/cassandra-dtest/conftest.py:207: SyntaxWarning: "is 
not" with a literal. Did you mean "!="?
  if len(errors) is not 0:
/home/cassandra/cassandra/cassandra-dtest/conftest.py:240: SyntaxWarning: "is 
not" with a literal. Did you mean "!="?
  if len(logs) is not 0:
/home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:393: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  while attempt < 3 and ret_val is not 0:
/home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:399: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if ret_val is not 0:
/home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:422: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if ret_val is not 0:
/home/cassandra/cassandra/venv/src/ccm/ccmlib/repository.py:425: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if ret_val is not 0:
/home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:124: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if len(filtered_errors) is not 0:
/home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:152: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if len(logs) is not 0:
/home/cassandra/cassandra/cassandra-dtest/dtest_setup.py:286: SyntaxWarning: 
"is not" with a literal. Did you mean "!="?
  if len(errors) is not 0:
{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15734:

Fix Version/s: 4.0-alpha

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
> Fix For: 4.0-alpha
>
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15735) Add serial consistency option and regular and serial consistency into profile yaml

2020-04-16 Thread Dmitry Kropachev (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Kropachev updated CASSANDRA-15735:
-
Description: 
Needed to be done in order to be able to control serial consistency and regular 
consistency levels separately.

For instance, it was not possible to set serial consistency to LOCAL_SERIAL and 
regular consistency to QUORUM.

We have following code handling it all over the place:

if (cl.isSerialConsistency()) 
statement.setSerialConsistencyLevel(JavaDriverClient.from(cl)); else 
statement.setConsistencyLevel(JavaDriverClient.from(cl));

With the fix it beacome possible to set serial and regular consistency 
separately, also it is possible to specify consistency in yaml file per query, 
in case you want to stress with dirrefent consistency levels, in following 
manner:

lwt_update_one_column:
     cql: update blogposts set lwt_ind = 1001 where domain = ? and 
published_date = ? if lwt_ind < 0
     fields: samerow
     consistencyLevel: QUORUM
     serialConsistencyLevel: LOCAL_SERIAL

 

Fix: [https://github.com/apache/cassandra/pull/540]

  was:
Needed to be done in order to be able to control serial consistency and regular 
consistency levels separately.

For instance, it was not possible to set serial consistency to LOCAL_SERIAL and 
regular consistency to QUORUM.

We have following code handling it all over the place:

if (cl.isSerialConsistency()) 
statement.setSerialConsistencyLevel(JavaDriverClient.from(cl)); else 
statement.setConsistencyLevel(JavaDriverClient.from(cl));

With the fix it beacome possible to set serial and regular consistency 
separately, also it is possible to specify consistency in yaml file per query, 
in case you want to stress with dirrefent consistency levels, in following 
manner:

lwt_update_one_column:
    cql: update blogposts set lwt_ind = 1001 where domain = ? and 
published_date = ? if lwt_ind < 0
    fields: samerow
    consistencyLevel: QUORUM
    serialConsistencyLevel: LOCAL_SERIAL

 


> Add serial consistency option and regular and serial consistency into profile 
> yaml
> --
>
> Key: CASSANDRA-15735
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15735
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/stress
>Reporter: Dmitry Kropachev
>Priority: Normal
> Fix For: 4.x
>
> Attachments: profile.yaml
>
>
> Needed to be done in order to be able to control serial consistency and 
> regular consistency levels separately.
> For instance, it was not possible to set serial consistency to LOCAL_SERIAL 
> and regular consistency to QUORUM.
> We have following code handling it all over the place:
> if (cl.isSerialConsistency()) 
> statement.setSerialConsistencyLevel(JavaDriverClient.from(cl)); else 
> statement.setConsistencyLevel(JavaDriverClient.from(cl));
> With the fix it beacome possible to set serial and regular consistency 
> separately, also it is possible to specify consistency in yaml file per 
> query, in case you want to stress with dirrefent consistency levels, in 
> following manner:
> lwt_update_one_column:
>      cql: update blogposts set lwt_ind = 1001 where domain = ? and 
> published_date = ? if lwt_ind < 0
>      fields: samerow
>      consistencyLevel: QUORUM
>      serialConsistencyLevel: LOCAL_SERIAL
>  
> Fix: [https://github.com/apache/cassandra/pull/540]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15735) Add serial consistency option and regular and serial consistency into profile yaml

2020-04-16 Thread Dmitry Kropachev (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15735?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dmitry Kropachev updated CASSANDRA-15735:
-
 Bug Category: Parent values: Correctness(12982)Level 1 values: API / 
Semantic Implementation(12988)
   Complexity: Low Hanging Fruit
Discovered By: User Report
Fix Version/s: 4.x
 Severity: Normal

> Add serial consistency option and regular and serial consistency into profile 
> yaml
> --
>
> Key: CASSANDRA-15735
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15735
> Project: Cassandra
>  Issue Type: Bug
>  Components: Tool/stress
>Reporter: Dmitry Kropachev
>Priority: Normal
> Fix For: 4.x
>
> Attachments: profile.yaml
>
>
> Needed to be done in order to be able to control serial consistency and 
> regular consistency levels separately.
> For instance, it was not possible to set serial consistency to LOCAL_SERIAL 
> and regular consistency to QUORUM.
> We have following code handling it all over the place:
> if (cl.isSerialConsistency()) 
> statement.setSerialConsistencyLevel(JavaDriverClient.from(cl)); else 
> statement.setConsistencyLevel(JavaDriverClient.from(cl));
> With the fix it beacome possible to set serial and regular consistency 
> separately, also it is possible to specify consistency in yaml file per 
> query, in case you want to stress with dirrefent consistency levels, in 
> following manner:
> lwt_update_one_column:
>     cql: update blogposts set lwt_ind = 1001 where domain = ? and 
> published_date = ? if lwt_ind < 0
>     fields: samerow
>     consistencyLevel: QUORUM
>     serialConsistencyLevel: LOCAL_SERIAL
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-15735) Add serial consistency option and regular and serial consistency into profile yaml

2020-04-16 Thread Dmitry Kropachev (Jira)
Dmitry Kropachev created CASSANDRA-15735:


 Summary: Add serial consistency option and regular and serial 
consistency into profile yaml
 Key: CASSANDRA-15735
 URL: https://issues.apache.org/jira/browse/CASSANDRA-15735
 Project: Cassandra
  Issue Type: Bug
  Components: Tool/stress
Reporter: Dmitry Kropachev
 Attachments: profile.yaml

Needed to be done in order to be able to control serial consistency and regular 
consistency levels separately.

For instance, it was not possible to set serial consistency to LOCAL_SERIAL and 
regular consistency to QUORUM.

We have following code handling it all over the place:

if (cl.isSerialConsistency()) 
statement.setSerialConsistencyLevel(JavaDriverClient.from(cl)); else 
statement.setConsistencyLevel(JavaDriverClient.from(cl));

With the fix it beacome possible to set serial and regular consistency 
separately, also it is possible to specify consistency in yaml file per query, 
in case you want to stress with dirrefent consistency levels, in following 
manner:

lwt_update_one_column:
    cql: update blogposts set lwt_ind = 1001 where domain = ? and 
published_date = ? if lwt_ind < 0
    fields: samerow
    consistencyLevel: QUORUM
    serialConsistencyLevel: LOCAL_SERIAL

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Created] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)
Eduard Tudenhoefner created CASSANDRA-15734:
---

 Summary: 
cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
 Key: CASSANDRA-15734
 URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
 Project: Cassandra
  Issue Type: Bug
  Components: Test/dtest
Reporter: Eduard Tudenhoefner
Assignee: Eduard Tudenhoefner






--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org



[jira] [Updated] (CASSANDRA-15734) cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk

2020-04-16 Thread Eduard Tudenhoefner (Jira)


 [ 
https://issues.apache.org/jira/browse/CASSANDRA-15734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Eduard Tudenhoefner updated CASSANDRA-15734:

Description: This recently started to fail with Python 3.8 as can be seen 
[here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]

> cqlsh_tests.test_cqlsh.TestCqlsh.test_pycodestyle_compliance fails on trunk
> ---
>
> Key: CASSANDRA-15734
> URL: https://issues.apache.org/jira/browse/CASSANDRA-15734
> Project: Cassandra
>  Issue Type: Bug
>  Components: Test/dtest
>Reporter: Eduard Tudenhoefner
>Assignee: Eduard Tudenhoefner
>Priority: Normal
>
> This recently started to fail with Python 3.8 as can be seen 
> [here|https://ci-cassandra.apache.org/job/Cassandra-trunk/73/testReport/junit/cqlsh_tests.test_cqlsh/TestCqlsh/test_pycodestyle_compliance/]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org