[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-18 Thread Jira


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

Andres de la Peña commented on CASSANDRA-18760:
---

Went through the rest of the CI failures and none of them seem caused by the 
changes:
 * {{test_move_backwards_and_cleanup}} in 4.1 is CASSANDRA-18686
 * {{testFailingMessage}} in 4.0 is CASSANDRA-18366
 * {{test_dead_sync_initiator}} in 3.11 and 3.0 is CASSANDRA-17702
 * {{test_multiple_concurrent_repairs}} in 3.11 is in 
[Butler|https://butler.cassandra.apache.org/#/ci/upstream/workflow/Cassandra-3.11/failure/repair_tests.repair_test/TestRepair/test_multiple_concurrent_repairs]
 * {{test_readrepair}} in 3.11 is in 
[Butler|https://butler.cassandra.apache.org/#/ci/upstream/workflow/Cassandra-3.11/failure/consistency_test/TestConsistency/test_readrepair]
 * {{test_compactionstats}} in 3.11 and 3.0 is in 
[Butler|https://butler.cassandra.apache.org/#/ci/upstream/workflow/Cassandra-3.11/failure/jmx_test/TestJMX/test_compactionstats]
 * {{test_sstable_marking}} in 3.11 is in 
[Butler|https://butler.cassandra.apache.org/#/ci/upstream/workflow/Cassandra-3.11/failure/repair_tests.incremental_repair_test/TestIncRepair/test_sstable_marking]
 * {{testReprepareMixedVersionWithoutReset}} in 3.11 is CASSANDRA-18021

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Recently hit an un-recoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-18 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18760:
---

[j17 
5.0|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2949/workflows/095d5680-1669-464b-a840-f06ffa9cb4c4]
[j11 
4.1|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2943/workflows/88e6fc40-8a6f-4664-8a92-37e2b75938fa]
[j11 
4.0|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2944/workflows/c3fb38b7-ed56-45a8-aa5c-84635edd872e]
[j8 
3.11|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2945/workflows/85b5a07c-e751-44f1-be31-dcced62f38fd]
[j8 
3.0|https://app.circleci.com/pipelines/github/instaclustr/cassandra/2946/workflows/2e3f7452-b121-4166-b7f8-48b4d380656b]

5.0 flakiness is CASSANDRA-18360


> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Recently hit an un-recoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-17 Thread Jira


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

Andres de la Peña commented on CASSANDRA-18760:
---

Looks good to me, let's see how CI goes.

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 3.0.x, 3.11.x, 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 1h
>  Remaining Estimate: 0h
>
> Recently hit an un-recoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-17 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18760:
---

We identified that this is not happening in 4.1+. The reason is that there was 
CASSANDRA-16905 added but it was not added to 4.0.

We are going to backport CASSANDRA-16905 to 4.0 and add more tests. Then in 
4.1+ we just add tests.

4.0 patch https://github.com/apache/cassandra/pull/2600
4.1 patch https://github.com/apache/cassandra/pull/2602

I expect 5.0 and trunk patches to be straightforward, basically just tests from 
4.1 applied.

I ll do the builds once this is all good for everybody.


> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 50m
>  Remaining Estimate: 0h
>
> Recently hit an uncoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-16 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18760:
---

Thanks [~adelapena] I incorporated your feedback in the PR. The second case can 
not happen, we can not drop non-frozen udts already hence we can not make blobs 
out of them either. I will run a circle to see where we are at.

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Recently hit an uncoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-16 Thread Jira


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

Andres de la Peña commented on CASSANDRA-18760:
---

I think that the conversions to blob that shouldn't be accepted are those from 
multi-cell data types.

So it should be possible to make blob columns from frozen collections. And it 
shouldn't be possible to make blob columns from non-frozen UDTs. So 
{{BytesType#isValueCompatibleWithInternal}} should probably use 
{{AbstractType#isMultiCell}} instead of {{{}AbstractType#isCollection{}}}.

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Recently hit an uncoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-16 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18760:
---

[~blerer] [~adelapena] it would be great to get your feedback on this

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Recently hit an uncoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18760) Need to block the ability to DROP table column of 'map' type and add back as 'blob' type

2023-08-16 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18760:
---

I put together this 

https://github.com/apache/cassandra/pull/2600/files

I am not sure why "map" is a special case here. BytesType gets AbstractType 
into its "isValueCompatibleWithInternal" and there all I know is if it is 
collection or not. Since all map, list and set are collections, is not it true 
that the same problem will be with sets and lists?

I added a test which checks both directions.

> Need to block the ability to DROP table column of 'map' type and add back as 
> 'blob' type
> 
>
> Key: CASSANDRA-18760
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18760
> Project: Cassandra
>  Issue Type: Bug
>  Components: Cluster/Schema
>Reporter: Paul Ayers
>Assignee: Stefan Miklosovic
>Priority: Urgent
>  Labels: 4.0.10
> Fix For: 4.0.x, 4.1.x, 5.0.x, 5.x
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Recently hit an uncoverable situation in Cassandra 4.0.10 after dropping a 
> 'map' column and adding it back as a 'blob', which caused corruption that 
> neither offline nor online scrub could fix.
> When dropping a 'blob' column and attempting to add it back as a 'map' type, 
> the operation is blocked with:
> {code:java}
> InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot 
> re-add previously dropped column 'col1' of type map, 
> incompatible with previous type blob"
> {code}
> We need to do the same going from 'map' to 'blob' to avoid this potentially 
> very bad scenario that can cause data loss.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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