cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ariel Weisberg (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-6061) Rewrite TokenMetadata
Date Wed, 11 Nov 2015 17:49:11 GMT

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

Ariel Weisberg edited comment on CASSANDRA-6061 at 11/11/15 5:48 PM:
---------------------------------------------------------------------

As a start just make it COW so readers can pull a copy and not have it change underneath whiles
they are using it causing NPEs and assertions to fire. Right now it's very error prone and
in --CASSANDRA-6061-- CASSANDRA-10485 we have had to go through a couple of iterations to
have it not accidentally access TMD in a racy way.

That doesn't fix everything since any concurrent changes to TMD result in all readers who
have persisted state based on the old world view needing to take corrective action. Maybe
have listeners and instead of getting access to TMD as a global singleton receive updated
references as they are created so subsystems can reference local copies and then on state
transitions take whatever actions are necessary.

Hints for instance might need to drop stale hints (not sure how this is handled now).


was (Author: aweisberg):
As a start just make it COW so readers can pull a copy and not have it change underneath whiles
they are using it causing NPEs and assertions to fire. Right now it's very error prone and
in CASSANDRA-6061 we have had to go through a couple of iterations to have it not accidentally
access TMD in a racy way.

That doesn't fix everything since any concurrent changes to TMD result in all readers who
have persisted state based on the old world view needing to take corrective action. Maybe
have listeners and instead of getting access to TMD as a global singleton receive updated
references as they are created so subsystems can reference local copies and then on state
transitions take whatever actions are necessary.

Hints for instance might need to drop stale hints (not sure how this is handled now).

> Rewrite TokenMetadata
> ---------------------
>
>                 Key: CASSANDRA-6061
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6061
>             Project: Cassandra
>          Issue Type: Task
>            Reporter: Jonathan Ellis
>            Priority: Minor
>
> Feels like this "mostly works" but is generally fragile (see: shuffle).
> Would be good to get a fresh perspective on it and see if we can do better.
> Bonus would be, ability to bootstrap multiple nodes w/o Two Minute Rule.  Probably would
involve using LWT on pending ranges state.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message