[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-25 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

Committed thx for the patience where we talking past each other :-)

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.12, 4.1, 4.0
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-25 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

As agreed on Slack CI seems good so we're good to merge.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-25 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

CASSANDRA-17050 will make it noisy unfortunately, but +1 if we don't make it 
worse.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-25 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

All rebased, fixed, squahsed + new CI for a final check otherwise I'll merge.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-22 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

Except for the [one remaining 
issue|https://github.com/apache/cassandra/pull/1278/files?authenticity_token=mRk1HCiqlaBpW%2BQQMMaRRuV4n68Frlnv1PNIOF18a5nAZYUHAZrX8pHh2DQ1pg4EjptTTct%2FyZbhCDRLSg3xhg%3D%3D%5B%5D=.java#r734593004]
 we need to fix, I'm +1 on all 3 PRs at this point, assuming clean tests.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-20 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

Rebased and pushed the other PRs. The only problem being 3.11 with the new test 
I have to look a bit deeper as I can't get it to fail.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-19 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-16996:
---

+1

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-19 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

[~jlewandowski] did you get a chance to look at the PR? Are you +1 on it?

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-18 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

Done :-) good eye

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-17 Thread Jacek Lewandowski (Jira)


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

Jacek Lewandowski commented on CASSANDRA-16996:
---

btw. you can fix the typo in the test name

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-17 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

Removing that test wins you nothing and it gives some level of protection imo.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-15 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

With the discussion over how to test this in a better place, I've thrown my +1 
(and one more non-controversial nit) on the PR.

I'm still in favor of removing {{testSchemaPullSynchoricity()}}, but I'm fine 
leaving a second reviewer ([~jlewandowski]?), which we should probably grab, 
given there is concurrency involved here, to break that tie ;)

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-10-01 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

Just made a pass at the PR, and dropped some comments. Looks like it's headed 
in the right direction.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-30 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

In the latest push I created sync public methods on {{Schema}} and made 
{{SchemaKeyspace}} package private. If we agree we are ok with how it looks now 
I can go for the test and the rest of PRs next. CI 
[j11|https://app.circleci.com/pipelines/github/bereng/cassandra/452/workflows/2baaca08-623d-4d45-846c-aa61744f7879]
 and 
[j8|https://app.circleci.com/pipelines/github/bereng/cassandra/452/workflows/fa80b38c-d726-417b-90de-2df583cd1575]
 have known flakies and 1 failure I overlooked so it lgtm.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-29 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

{quote}we should consider that currently the Schema class controls mutually 
exclusivity on applyChanges and perhaps this class should be the public API for 
these other two API methods{quote}

That resonates with me, right, which is what Caleb was saying and it is growing 
on me now.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-28 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

bq. we should consider that currently the Schema class controls mutually 
exclusivity on applyChanges and perhaps this class should be the public API for 
these other two API methods

Yes, this is exactly what I meant by...

bq. There is another way we might be able to solve this problem, and that's 
delegating more of our schema manipulation to Schema, where we're already 
synchronizing some of the codepaths that hit SchemaKeyspace. In that case, we 
could just annotate the latter as being explicitly not thread-safe. 

In terms of what level of abstraction at which we would like to test, there is 
some prior art between {{SchemaDisagreementTest}}, {{SchemaTest}} (in-JVM), and 
{{SchemaTest}} (unit), and {{DigestResolverTest}} that could be a starting 
point. Fuzzing on the thread-safety guarantees (or lack thereof) of {{Schema}} 
directly (assuming the structure above) to reproduce this seems valuable. (If I 
had to argue against myself, I'd say that this doesn't add much value over 
simply the properly reviewed and documented fix, but in that case, a test 
checking for the {{synchronized}} modifier doesn't either.)

Are there any other details around the original Fallout test that spawned this 
that might be helpful?

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-28 Thread Benedict Elliott Smith (Jira)


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

Benedict Elliott Smith commented on CASSANDRA-16996:


Tests should verify that the behaviour we care about is correct, not that some 
specific artefact of the implementation is maintained.

I haven't looked carefully at this patch, but if we are to solve this using 
{{synchronized}} we should consider that currently the {{Schema}} class 
controls mutually exclusivity on {{applyChanges}} and perhaps this class should 
be the public API for these other two API methods. It seems these are the 
_only_ two public methods in {{SchemaKeyspace}} and so it would be easy to 
migrate public accessors to {{Schema}}, and perhaps even make 
{{SchemaKeyspace}} package private by migrating its public fields as well.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-28 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

The latest push seems ok test wise 
[j11|https://app.circleci.com/pipelines/github/bereng/cassandra/443/workflows/0f2e1f0b-4a48-41b2-8fb1-8b8c9ed5b840]
 
[j8|https://app.circleci.com/pipelines/github/bereng/cassandra/443/workflows/b55a6248-4197-4246-88dd-a8cafc879288]
 besides the related junit failure fix I just pushed. I still want to give this 
one more thought before moving into review...

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-28 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

Pre CI run is done now 
[j11|https://app.circleci.com/pipelines/github/bereng/cassandra/438/workflows/edcb3e2e-a6f1-416b-8587-a6e82c387cb1]
 and 
[j8|https://app.circleci.com/pipelines/github/bereng/cassandra/438/workflows/4f56dcf3-e467-445e-a34c-cfce0b196ae2]
 which I was worried about.

1.) Yes these are some of the holes. But other 'multi-step' methods such as 
{{fetchKeyspace}} i.e. are not atomic. We could have changes get in-between 
each method it calls iiuc etc.
2.) Yes adding a javadoc along a note on each method as Josh mentioned is a 
good idea.
3.) The fuzz test I really dislike here an I am not entirely sure why. 
Overloading the class and making sure the syncs work would be my preference, 
short of that the junit we have now does the trick imo. At the end of the day 
is making sure the contract (API) won't be broken by accident in a 
deterministic way.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-27 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe commented on CASSANDRA-16996:
-

Linking my comments from 
[here|https://issues.apache.org/jira/browse/CASSANDRA-16856?focusedCommentId=17420953=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17420953].

To expand on that a bit, I think we need at least 2 and possibly 3 things here, 
if it's clear that the problem identified in CASSANDRA-16856 is legitimate (and 
I think it is) and we want to make schema modifications atomic for 
{{SchemaKeyspace}}:

1.) To protect {{saveSystemKeyspacesSchema()}}, {{truncate()}}, 
{{calculateSchemaDigest()}}, {{convertSchemaToMutations()}}, and 
{{applyChanges()}}, given those are the places we deal with the contents of the 
entire schema keyspace.

2.) JavaDoc for {{SchemaKeyspace}} that explicitly lays out the class's 
synchronization policy and why it is that way. (This might need to mention in 
passing how this interacts w/ {{Schema}}, which also has its own 
synchronization that sort of incompletely overlaps w/ {{SchemaKeyspace}}.)

3.) (perhaps optional, but really nice and maybe not optional) A fuzz test like 
the one I mentioned 
[here|https://issues.apache.org/jira/browse/CASSANDRA-16856?focusedCommentId=17420953=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-17420953]
 to simulate the case we're worried about at a reasonable level. In this case, 
it probably means hitting {{convertSchemaToMutations()}}, which is a good proxy 
for {{SchemaPullVerbHandler#doVerb()}}, concurrent to schema changes and/or 
truncations (possibly from {{Schema#transform()}}).

There is another way we might be able to solve this problem, and that's 
delegating more of our schema manipulation to {{Schema}}, where we're already 
synchronizing some of the codepaths that hit {{SchemaKeyspace}}. In that case, 
we could just annotate the latter as being explicitly not thread-safe.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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



[jira] [Commented] (CASSANDRA-16996) Prevent broken concurrent schema read/writes

2021-09-27 Thread Berenguer Blasi (Jira)


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

Berenguer Blasi commented on CASSANDRA-16996:
-

CI is down. Will trigger a run when it's back up again.

> Prevent broken concurrent schema read/writes
> 
>
> Key: CASSANDRA-16996
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16996
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Berenguer Blasi
>Assignee: Berenguer Blasi
>Priority: Normal
> Fix For: 3.11.x, 4.0, 4.x
>
>
> See CASSANDRA-16856 where the concurrent read/write path was left out



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

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