[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-07-17 Thread Aleksey Yeschenko (JIRA)


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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Thanks. Committed to trunk as 
[207c80c1fd63dfbd8ca7e615ec8002ee8983c5d6|https://github.com/apache/cassandra/commit/207c80c1fd63dfbd8ca7e615ec8002ee8983c5d6].

Opened CASSANDRA-14571 to deal with the MV issue/test, and will try to resolve 
both that, and writing thorough tests for shallow/deep diff before this week 
ends.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-07-17 Thread Sam Tunnicliffe (JIRA)


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

Sam Tunnicliffe commented on CASSANDRA-13426:
-

+1 after the latest commit (assuming CI is OK, which I would do).

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-07-17 Thread Aleksey Yeschenko (JIRA)


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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

[~beobal] Thanks. Pushed the updated branch. CI results will be available 
[here|https://circleci.com/workflow-run/6a88d05c-f82d-41ba-9a69-1ab5adbf1a4c].

As for that single MV test failure, see the comment 
[here|https://issues.apache.org/jira/browse/CASSANDRA-13426?focusedCommentId=16436169=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16436169].
 It's MV starting to push out mutations without checking first that the MV 
exists on other nodes.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-07-17 Thread Sam Tunnicliffe (JIRA)


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

Sam Tunnicliffe commented on CASSANDRA-13426:
-

{{TableMetadata::equalsWithoutColumns}} does include columns, which makes deep 
diffs appear shallow. I appreciate the horror of the rebase, so I'm not saying 
we should definitely block commit on it, but this sort of thing is certainly a 
good argument for adding tests sooner rather than later.

 The failing dtest seems consistent rather than flaky and I can't get it to 
fail on trunk, so it seems like it could be a regression.

2 very minor nits:
 * The comment on {{Keyspaces::diff}} has {{DEEP}} and {{SHALLOW}} backwards, 
and is slightly out of date anyway (wrt to Mode). IMO you could probably just 
drop this explanation from here as {{KeyspacesDiff::diff}} doesn't directly 
refer to it anymore and it is documented in {{Difference}} already.
 * New unused import in ViewMetadata.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-07-12 Thread Aleksey Yeschenko (JIRA)


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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

[~beobal] Final changes are done - all in the same branch. Now, admittedly, 
that last commit could use a little bit of isolated unit testing. And I promise 
I'll add some before 4.0.0 is cut. But I need to get this in - with the overall 
patch being this size, constant rebasing on trunk is expensive, and I'm tired, 
and I won't go through it again.

Either way, unit test results 
[here|https://circleci.com/gh/iamaleksey/cassandra/418] and dtests' 
[here|https://circleci.com/gh/iamaleksey/cassandra/416].

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-05-01 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-13426:
-

Cool, latest changes lgtm. I'll give it a final pass once the diffing 
optimisations are done, but +1 so far.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-04-20 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Alright, this should be more or less it. Addressed everything, only commenting 
on points not addressed in code:

bq. TableMetadata/TableParams/Views / Maybe a bit subjective, but I find the 
naming of "unbuild" unintuitive. How about something like 
builderFrom/makeBuilder/asBuilder/toBuilder

I actually like it, as it’s a direct antonym of ‘build’ and does the exact 
opposite of what build() does. Couldn’t find a better antonym verb, and not a 
fan of any of the suggestions above, so I’ll be leaveing it as is.

bq. TableMetadata / toDebugString is unused

It’s just a helper method for debugging. We have a few similar ones, none of 
them used by code. It’s by design.

bq. Keyspaces / get(String name) is unused

It isn’t, but no harm in leaving it be. Similar container classes all have it.

bq. KeyspaceDiff / A comment explaining why function diffs need to be handled 
differently could be useful (I'm assuming it's because the filtering to 
distinguish UDFs/UDAs makes it slightly more expensive than the other types of 
diff).

Not sure what you mean. Why they are separate fields? Because from schema 
perspective they are very different categories, and it’s just more helpful for 
consumers of of KeyspaceDiff to have them as separate fields than as one.

bq. Functions / can Filter.test use isAggregate rather than instanceof?

It could, but test for UDF would still have to use instanceof. So I’d rather 
keep instanceof there for UDA for consistency.

bq. CompressionParams / outstanding TODO on setCrcCheckChance

Removing it is beyond this JIRA (although it didn’t stop quite a few other 
things from being included). For our purposes it’s harmless-ish, as it doesn’t 
count for hashCode() and equals() purposes and doesn’t mess with schema. 
Ultimately that field should be removed, so I left another comment. 

bq. SetType/ListType/MapType/DynamicCompositeType / getInstance can be 
simplified to just return the result of computeIfAbsent. There's an unchecked 
warning, but I'm not sure that's any different from the existing one. 
ReversedType and CompositeType impls already do this.

The extra check is there to avoid contention on the hot path. Updated 
ReversedType and CompositeType to also try a get() first.

bq. UDAggregate / When reconstructing from schema tables and the function can't 
be reconstructed for whatever reason - we preserve the old behaviour with a 
dummy, broken function for UDFs but not for UDAs. These now trigger an assert. 
Is this an issue?

A UDA has no body of its own, it’s just a combination of UDFs. As such, when we 
try to assemble a UDA from rows on disk, and one or more UDFs are missing, we 
treat this as an error and abort. An analogy: deserializing table metadata from 
schema tables with a column that references a non-existent UDT. A UDF OTOH can 
be correct, from schema perspective, but fail to compile for a variety of 
reasons (think internals having changed on upgrade). In that case we still want 
to start up, so we manufacture a broken function stub. But, again, for UDA we 
shouldn’t. That said, I updated the code to throw a more verbose and helpful 
exception.

bq. UFTest / line #114 seems to have a typo - s/string1/string

Not a typo. Body needs to be different or else the UDF won’t be updated.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-04-12 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Status update: all unit tests are 
[passing|https://circleci.com/gh/iamaleksey/cassandra/178] and so are all 
[dtests|https://circleci.com/gh/iamaleksey/cassandra/179]. 
{{sstablesplit_test.py::TestSSTableSplit::test_single_file_split}} is the only 
failure on the branch, and it's unrelated - CASSANDRA-14371 is the JIRA for it.

Occasionally, 
{{materialized_views_test.py::TestMaterializedViews::test_populate_mv_after_insert_wide_rows}}
 would fail too, because materialized views are amazing, and a subtle change in 
ordering of local/remote schema application exposes an existing race condition 
in MV building. I'm not going to fix it, as this patch is not the cause of the 
issue, but merely exposes it, and I have better things to do with my life.

Next step: address review feedback and slightly optimise the diffing code to 
take into account on-disk representation.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-04-10 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Rebased on top of most recent trunk. There are some test failures that need to 
be fixed and review feedback that still needs to be addressed, and I guess some 
extra tests to write (although most of it is covered with various unit and 
dtests).

[~ifesdjeen] You worked on {{SUPER}} and {{DENSE}} flags removal.. when you 
have time, can you look at a small commit 
[here|https://github.com/iamaleksey/cassandra/commits/13426] titled 'Get rid of 
COMPACT STORAGE logic in DDL statements' please? Not referencing the sha as I'm 
still force-pushing here occasionally. Thanks.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-04-05 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

3.5 months.

Need to address review feedback and rebase on top of most recent trunk, and it 
can be shipped.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2018-04-05 Thread Nikolay Mankov (JIRA)

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

Nikolay Mankov commented on CASSANDRA-13426:


Hello everyone. Could you please give quick update about the status of this 
issue. Last one was 5 months ago. 

This issue is the only requirement for CASSANDRA-10699 to be finished and from 
the comments above it looks like there are no blockers to finalize both.

Thank you 

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
>Priority: Major
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2017-12-12 Thread Sam Tunnicliffe (JIRA)

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

Sam Tunnicliffe commented on CASSANDRA-13426:
-

I've been looking at the WIP branch for a little while now. Looks good, lots of 
great improvements. I have a few, mostly minor comments:

* AlterSchemaStatement
** In grantPermissionsOnResource can use AuthenticatedUser::getPrimaryRole
* QueryProcessor
** #402 assert is redundant
** #422 typo "MDnt5"
** Should Prepared belong to QueryHandler rather than QP?
* ClientState
** ensureIsSuperUser is the only place we camel case SuperUser
* TableMetadata/TableParams/Views
** Maybe a bit subjective, but I find the naming of "unbuild" unintuitive. How 
about something like builderFrom/makeBuilder/asBuilder/toBuilder ?
* Views
** metadatas() method should be renamed - data is already plural, but also 
could it be named to reflect the fact that it returns an 
Iterable, whilst Views itself implements Iterable. 
It's a bit ambiguous as it is.
* TableId
** Typo in javadoc: s/nicely name class make/nicely named class makes
* ViewMetadata
** equals uses WhereClause::equals, but this isn't overridden
** the comment in withRenamedPrimaryKeyColumns belongs in 
WhereClause::renameIdentifier, if it's actually necessary
* TableMetadata
** toDebugString is unused
* Tables
** getNullable is missing annotation (all other similar methods have it).
* Keyspaces
** get(String name) is unused
* KeyspaceDiff
** A comment explaining why function diffs need to be handled differently could 
be useful (I'm assuming it's because the filtering to distinguish UDFs/UDAs 
makes it slightly more expensive than the other types of diff).
* Functions
** can Filter.test use isAggregate rather than instanceof ?
** aggregatesUsingFunction, comment should reads s/collection/stream
* CompressionParams
** outstanding TODO on setCrcCheckChance
* SetType/ListType/MapType/DynamicCompositeType
** getInstance can be simplified to just return the result of computeIfAbsent. 
There's an unchecked warning, but I'm not sure that's any different from the 
existing one. ReversedType and CompositeType impls already do this.
* AbstractType
** I think the comment on withUpdatedUserType could be a little clearer. Maybe 
something like "Returns an instance with all references to the supplied 
UserTypei recursively replaced with its new definition".
* SelectStatement
** The order of constructor args was changed to swap TableMetadata & the bind 
variables. NBD, but having the TM first seems more logical to me, was there a 
reason behind the switch?
* QualifiedName
** Typo in class level javadoc - s/CLass/Class
* StatementRestrictions
** The comment on the new ctor is slightly incorrect. We want to override the 
allow 2i flag from the StatementType for MV statements to avoid initing the the 
KS and SecondaryIndexManager. We don't open the KS to determine the value of 
the allow flag in either case.
* UDAggregate
** When reconstructing from schema tables and the function can't be 
reconstructed for whatever reason - we preserve the old behaviour with a dummy, 
broken function for UDFs but not for UDAs. These now trigger an assert. Is this 
an issue?
* DynamicCompositeType
** needs an expandUserTypes impl?
** withUpdatedUserType won't work correctly now that referencesUserType is 
inherited from AbstractType
* UserType
** expandUserType override isn't necessary, though I'm OK with leaving it in 
for clarity
* MigrationManager
** Comment on forceAnnounceNewTable - 
s/announceUpdateColumnFamily/announceTableUpdate
* CreateViewStatement
** validation is now stricter in that it doesn't silently accept SELECT that 
doesn't contain all primary key elements, or PK columns without IS NOT NULL. 
It's good, just noting that this should be documented somewhere.
* UFTest
** line #114 seems to have a typo - s/string1/string
* VariableSpecifications/CQLStatement
** there's a minor inconsistency in method naming here: 
getPartitionKeyBindIndexes vs getPartitionKeyBindVariableIndexes.


> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> 

[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2017-12-12 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Force-pushed a rebased branch with some updates. At this point it's largely 
done, missing some optimisations on shallow vs. deep diffs for delta 
serialisation, and good test coverage.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2017-05-11 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Pushed WIP branch [here|https://github.com/iamaleksey/cassandra/commits/13426]. 
A few statements need to be swapped in still, but they are already written and 
there. Unit tests are currently passing, dtests haven't been run yet.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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



[jira] [Commented] (CASSANDRA-13426) Make all DDL statements idempotent and not dependent on global state

2017-04-07 Thread Aleksey Yeschenko (JIRA)

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

Aleksey Yeschenko commented on CASSANDRA-13426:
---

Progress-wise, applying some finishing touches here.

> Make all DDL statements idempotent and not dependent on global state
> 
>
> Key: CASSANDRA-13426
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13426
> Project: Cassandra
>  Issue Type: Sub-task
>  Components: Distributed Metadata
>Reporter: Aleksey Yeschenko
>Assignee: Aleksey Yeschenko
> Fix For: 4.0
>
>
> A follow-up to CASSANDRA-9425 and a pre-requisite for CASSANDRA-10699.
> It's necessary for the latter to be able to apply any DDL statement several 
> times without side-effects. As part of the ticket I think we should also 
> clean up validation logic and our error texts. One example is varying 
> treatment of missing keyspace for DROP TABLE/INDEX/etc. statements with IF 
> EXISTS.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)