You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Sumanth Pasupuleti (Jira)" <ji...@apache.org> on 2019/12/23 07:39:00 UTC

[jira] [Comment Edited] (CASSANDRA-15433) Pending ranges are not recalculated on keyspace creation

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

Sumanth Pasupuleti edited comment on CASSANDRA-15433 at 12/23/19 7:38 AM:
--------------------------------------------------------------------------

A trivial approach would be to recalculate pending ranges whenever keyspaces change.
https://github.com/apache/cassandra/compare/cassandra-3.0...sumanth-pasupuleti:30_15433?expand=1

Passing Tests - https://circleci.com/workflow-run/e7f2416c-c882-41ea-a9e4-dc7763f96b58

Added a blocking wait to ensure keyspace change isn't complete unless pending changes are recalculated to avoid any potential miss of mutations on the bootstrapping nodes.


was (Author: sumanth.pasupuleti):
A trivial approach would be to recalculate pending ranges whenever keyspaces change.
https://github.com/apache/cassandra/compare/cassandra-3.0...sumanth-pasupuleti:30_15433?expand=1

Added a blocking wait to ensure keyspace change isn't complete unless pending changes are recalculated to avoid any potential miss of mutations on the bootstrapping nodes.

> Pending ranges are not recalculated on keyspace creation
> --------------------------------------------------------
>
>                 Key: CASSANDRA-15433
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-15433
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Cluster/Membership
>            Reporter: Josh Snyder
>            Assignee: Sumanth Pasupuleti
>            Priority: Normal
>
> When a node begins bootstrapping, Cassandra recalculates pending tokens for each keyspace that exists when the state change is observed (in StorageService:handleState*). When new keyspaces are created, we do not recalculate pending ranges (around Schema:merge). As a result, writes for new keyspaces are not received by nodes in BOOT or BOOT_REPLACE modes. When bootstrapping finishes, the node which just bootstrapped will not have data for the newly created keyspace.
> Consider a ring with bootstrapped nodes A, B, and C. Node D is pending, and when it finishes bootstrapping, C will cede ownership of some ranges to D. A quorum write is acknowledged by C and A. B missed the write, and the coordinator didn't send it to D at all. When D finishes bootstrapping, the quorum B+D will not contain the mutation.
> Steps to reproduce:
> # Join a node in BOOT mode
> # Create a keyspace
> # Send writes to that keyspace
> # On the joining node, observe that {{nodetool cfstats}} records zero writes to the new keyspace
> I have observed this directly in Cassandra 3.0, and based on my reading the code, I believe it affects up through trunk.



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

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