[
https://issues.apache.org/jira/browse/CASSANDRA-17071?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Petrov updated CASSANDRA-17071:
------------------------------------
Reviewers: Alex Petrov, Branimir Lambov (was: Branimir Lambov)
Status: Review In Progress (was: Patch Available)
> Relax schema synchronization when opening a keyspace
> ----------------------------------------------------
>
> Key: CASSANDRA-17071
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17071
> Project: Cassandra
> Issue Type: Improvement
> Components: Cluster/Schema
> Reporter: Jacek Lewandowski
> Assignee: Jacek Lewandowski
> Priority: Normal
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Extracted this as a separate ticket per discussion on CASSANDRA-17044
> In short, there are two purposes of this change:
> # Move the code around to the more appropriate places (for example, CFS
> specific code for dropping table was moved from SM class to CFS class)
> # Relax the synchronization when adding/removing keyspace instances in SM -
> instead of synchronizing the whole collection of keyspace instances, we only
> synchronize the related item (the original idea authored by [~blambov]).
> The current implementation works because a certain order of opening keyspaces
> is assumed. If a keyspace is already initialized, it is just returned without
> sync and sync is done only to initialize the keyspace. When synchronization
> is extended to the whole method, the system finds itself in a deadlock. This
> means that some keyspace is tried to be opened during initiazation. Currently
> it works fine because the keyspace which is not initialized yet is never
> tried to be opened asynchronously while initializing some other keyspace in a
> different thread. Hence the conclusion about fragility of the current
> solution.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]