[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2017-01-27 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9425:
-
Resolution: Fixed
Status: Resolved  (was: Patch Available)

> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
> /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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


[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2016-11-24 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9425:
-
Reviewer: Sylvain Lebresne
  Status: Patch Available  (was: In Progress)

> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
> /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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


[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2016-11-03 Thread Nate McCall (JIRA)

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

Nate McCall updated CASSANDRA-9425:
---
Fix Version/s: (was: 3.x)
   4.0

> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
> /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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


[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2015-11-02 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9425:
-
Assignee: (was: Aleksey Yeschenko)

> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
> Fix For: 3.x
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
> /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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


[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2015-05-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9425:
-
Description: 
The way we handle schema changes currently is inherently racy.

All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
that's won't necessarily be there when the statement gets executed and mutates 
schema.

We should make all the *Metadata classes ({{KeyspaceMetadata, TableMetadata}}, 
{{ColumnMetadata}}, immutable, and local schema persistently snapshottable, 
with a single top-level {{AtomicReference}} to the current snapshot. Have DDL 
statements perform validation and transformation on the same state.

In pseudo-code, think
{code}
public interface DDLStatement
{
/**
 * Validates that the DDL statement can be applied to the provided schema 
snapshot.
 *
 * @param schema snapshot of schema before executing CREATE KEYSPACE
 */
void validate(SchemaSnapshot schema);
 
/**
 * Applies the DDL statement to the provided schema snapshot.
 * Implies that validate() has already been called on the provided snapshot.
 *
 * @param schema snapshot of schema before executing the statement
 * @return snapshot of schema as it would be after executing the statement
 */
SchemaSnapshot transform(SchemaSnapshot schema);
}
{code}

  was:
The way we handle schema changes currently is inherently racy.

All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
that's won't necessarily be there when the statement gets executed and mutates 
schema.

We should make all the *Metadata classes ({{KeyspaceMetadata, TableMetadata}}, 
{{ColumnMetadata}}, immutable, and local schema persistently snapshottable, 
with a single top-level {{AtomicReference}} to the current snapshot. Have DDL 
statements perform validation and transformation on the same state.

In pseudo-code, think
{code}
public interface DDLStatement
{
 /**
 * Validates that the DDL statement can be applied to the provided schema 
snapshot.
 *
 * @param schema snapshot of schema before executing CREATE KEYSPACE
 */
void validate(SchemaSnapshot schema);
 
/**
 * Applies the DDL statement to the provided schema snapshot.
 * Implies that validate() has already been called on the provided snapshot.
 *
 * @param schema snapshot of schema before executing the statement
 * @return snapshot of schema as it would be after executing the statement
 */
SchemaSnapshot transform(SchemaSnapshot schema);
}
{code}


> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 3.x
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
> /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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


[jira] [Updated] (CASSANDRA-9425) Make node-local schema fully immutable

2015-05-19 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko updated CASSANDRA-9425:
-
Issue Type: Sub-task  (was: Improvement)
Parent: CASSANDRA-9424

> Make node-local schema fully immutable
> --
>
> Key: CASSANDRA-9425
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9425
> Project: Cassandra
>  Issue Type: Sub-task
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 3.x
>
>
> The way we handle schema changes currently is inherently racy.
> All of our {{SchemaAlteringStatement}} s perform validation on a schema state 
> that's won't necessarily be there when the statement gets executed and 
> mutates schema.
> We should make all the *Metadata classes ({{KeyspaceMetadata, 
> TableMetadata}}, {{ColumnMetadata}}, immutable, and local schema persistently 
> snapshottable, with a single top-level {{AtomicReference}} to the current 
> snapshot. Have DDL statements perform validation and transformation on the 
> same state.
> In pseudo-code, think
> {code}
> public interface DDLStatement
> {
>  /**
>  * Validates that the DDL statement can be applied to the provided schema 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing CREATE KEYSPACE
>  */
> void validate(SchemaSnapshot schema);
>  
> /**
>  * Applies the DDL statement to the provided schema snapshot.
>  * Implies that validate() has already been called on the provided 
> snapshot.
>  *
>  * @param schema snapshot of schema before executing the statement
>  * @return snapshot of schema as it would be after executing the statement
>  */
> SchemaSnapshot transform(SchemaSnapshot schema);
> }
> {code}



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