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

Brandon Williams edited comment on CASSANDRA-17411 at 6/8/22 1:43 PM:
----------------------------------------------------------------------

I believe transient replication is what broke this [in this 
commit|https://github.com/apache/cassandra/commit/f7431b432875e334170ccdb19934d05545d2cebd]
 and never filtered out dead replicas when selecting one for counter writes.

||Branch||CI||
|[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-4.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/516/workflows/c19c3e37-5fd4-4057-8ed1-70a8594fe025],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/516/workflows/421da77e-42d7-4219-9f53-a1fae299a360]|
|[4.1|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-4.1]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/518/workflows/a1fe8fa9-5cdf-41c7-8f86-7088d5261a12],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/518/workflows/8f60ed4f-269d-4c36-9bf6-ec171408420e]|
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-trunk]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/517/workflows/51115c65-7f25-49f8-89e2-8fbb9cee5698],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/517/workflows/16011fa8-96e1-481d-9c02-d6c286c39d1f]|

[500 
runs|https://app.circleci.com/pipelines/github/driftx/cassandra/519/workflows/b509e5dd-ba9b-4aee-b2fa-74f1a6d4275e]
 on the new test against 4.1.


was (Author: brandon.williams):
I believe transient replication is what broke this [in this 
commit|https://github.com/apache/cassandra/commit/f7431b432875e334170ccdb19934d05545d2cebd]
 and never filtered out dead replicas when selecting one for counter writes.

||Branch||CI||
|[4.0|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-4.0]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/516/workflows/c19c3e37-5fd4-4057-8ed1-70a8594fe025],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/516/workflows/421da77e-42d7-4219-9f53-a1fae299a360]|
|[4.1|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-4.1]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/518/workflows/a1fe8fa9-5cdf-41c7-8f86-7088d5261a12],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/518/workflows/8f60ed4f-269d-4c36-9bf6-ec171408420e]|
|[trunk|https://github.com/driftx/cassandra/tree/CASSANDRA-17411-trunk]|[j8|https://app.circleci.com/pipelines/github/driftx/cassandra/517/workflows/51115c65-7f25-49f8-89e2-8fbb9cee5698],
 
[j11|https://app.circleci.com/pipelines/github/driftx/cassandra/517/workflows/16011fa8-96e1-481d-9c02-d6c286c39d1f]|

> Network partition causes write ONE timeouts when using counters in Cassandra 4
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17411
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17411
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Consistency/Coordination
>            Reporter: Pere Balaguer
>            Assignee: Brandon Williams
>            Priority: Normal
>             Fix For: 4.0.x, 4.1-beta, 4.x
>
>         Attachments: app.py
>
>
> h5. Affected versions:
>  * 4.x
> h5. Observed behavior:
> When executing CL=ONE writes on a table with a counter column, if one of the 
> nodes is network partitioned from the others, clients keep sending requests 
> to it.
> Even though this may be a "driver" problem, I've been able to reproduce it 
> with both java and python datastax drivers using their latest available 
> versions and given the behavior only changes depending on the Cassandra 
> version, well, here I am.
> h5. Expected behavior:
> In Cassandra 3 after all inflight requests fail (expected), no new requests 
> are sent to the partitioned node. The expectation is that Cassandra 4 behaves 
> the same way.
> h5. How to reproduce:
> {noformat}
> # Create a cluster with the desired version, will go with 4.x for this example
> ccm create bug-report -v 4.0.3
> ccm populate -n 2:2:2
> ccm start
> # Create schemas and so on
> CQL=$(cat <<END
> CONSISTENCY ALL;
> DROP KEYSPACE IF EXISTS demo;
> CREATE KEYSPACE demo WITH REPLICATION = {'class': 'NetworkTopologyStrategy', 
> 'dc1': 2, 'dc2': 2, 'dc3': 2};
> CREATE TABLE demo.demo (pk uuid PRIMARY KEY, count counter) WITH compaction = 
> {'class': 'LeveledCompactionStrategy'};
> END
> )
> ccm node1 cqlsh --verbose --exec="${CQL}"
> # Launch the attached app.py
> # requires cassandra-driver
> python3 app.py "127.0.0.1" "9042"
> # Wait a bit for the app to settle, proceed to next step once you see 3 
> messages in stdout like:
> # 2022-03-01 15:41:51,557 - target-dc2 - __main__ - INFO - Got 0/572 
> (0.000000) timeouts/total_rqs in the last 1 minute
> # Partition one node with iptables
> iptables -A INPUT -p tcp --destination 127.0.0.1 --destination-port 7000 -j 
> DROP; iptables -A INPUT -p tcp --destination 127.0.0.1 --destination-port 
> 9042 -j DROP
> {noformat}
> Some time after executing the iptables command in cassandra-3 the output 
> should be similar to:
> {noformat}
> 2022-03-01 15:41:51,557 - target-dc2 - __main__ - INFO - Got 0/572 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:41:51,576 - target-dc3 - __main__ - INFO - Got 0/572 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:41:58,032 - target-dc1 - __main__ - INFO - Got 6/252 (2.380952) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:42:51,560 - target-dc2 - __main__ - INFO - Got 0/570 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:42:51,620 - target-dc3 - __main__ - INFO - Got 0/570 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:42:58,101 - target-dc1 - __main__ - INFO - Got 2/354 (0.564972) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:43:51,602 - target-dc2 - __main__ - INFO - Got 0/571 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:43:51,672 - target-dc3 - __main__ - INFO - Got 0/571 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:43:58,153 - target-dc1 - __main__ - INFO - Got 0/572 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> {noformat}
> as the timeouts/rqs shows, in about 2 minutes the partitioned node stops 
> receiving traffic
> while as in cassandra-4
> {noformat}
> 2022-03-01 15:49:39,068 - target-dc3 - __main__ - INFO - Got 0/566 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:49:39,107 - target-dc2 - __main__ - INFO - Got 0/566 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:49:41,206 - target-dc1 - __main__ - INFO - Got 2/444 (0.450450) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:50:39,095 - target-dc3 - __main__ - INFO - Got 0/569 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:50:39,148 - target-dc2 - __main__ - INFO - Got 0/569 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:50:42,589 - target-dc1 - __main__ - INFO - Got 7/13 (53.846154) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:51:39,125 - target-dc3 - __main__ - INFO - Got 0/567 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:51:39,159 - target-dc2 - __main__ - INFO - Got 0/567 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:51:44,902 - target-dc1 - __main__ - INFO - Got 12/22 
> (54.545455) timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:52:39,188 - target-dc2 - __main__ - INFO - Got 0/567 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:52:39,202 - target-dc3 - __main__ - INFO - Got 0/568 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:52:46,994 - target-dc1 - __main__ - INFO - Got 12/20 
> (60.000000) timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:53:39,202 - target-dc2 - __main__ - INFO - Got 0/568 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:53:39,238 - target-dc3 - __main__ - INFO - Got 0/568 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:53:48,765 - target-dc1 - __main__ - INFO - Got 12/17 
> (70.588235) timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:54:39,203 - target-dc2 - __main__ - INFO - Got 0/568 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:54:39,291 - target-dc3 - __main__ - INFO - Got 0/568 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:54:51,291 - target-dc1 - __main__ - INFO - Got 12/24 
> (50.000000) timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:55:39,258 - target-dc2 - __main__ - INFO - Got 0/570 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:55:39,327 - target-dc3 - __main__ - INFO - Got 0/570 (0.000000) 
> timeouts/total_rqs in the last 1 minute
> 2022-03-01 15:55:53,365 - target-dc1 - __main__ - INFO - Got 12/20 
> (60.000000) timeouts/total_rqs in the last 1 minute
> {noformat}
> as the timeouts/rqs shows, the partitioned node keeps receving traffic until 
> the iptables rules are removed



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to