[jira] [Updated] (CASSANDRA-17042) Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0

2021-12-06 Thread Caleb Rackliffe (Jira)


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

Caleb Rackliffe updated CASSANDRA-17042:

Reviewers: Caleb Rackliffe, Caleb Rackliffe
   Caleb Rackliffe, Caleb Rackliffe  (was: Caleb Rackliffe)
   Status: Review In Progress  (was: Patch Available)

> Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0
> -
>
> Key: CASSANDRA-17042
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17042
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Streaming, Local/SSTable
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 4.0.x, 4.x
>
>
> 4.0-rc2 introduced a new sstable version ({{-nb-}}), adding a field in 
> {{StatsMetadata}}. When zero copy streaming a file from 4.0-rc2+ to 4.0-rc1, 
> the rc1 node will write it as an {{-nb-}} file, mutate the metadata to clear 
> repairedAt/level information from StatsMetadata and rewrite the file, keeping 
> the same file name. Problem is that since rc1 doesn't know about the new 
> field in StatsMetadata, it will write the file without the new StatsMetadata 
> field, but with an {{-nb-}} filename. Then, when upgrading this node to rc2+ 
> we will try to read it as a {{-nb-}} file, but will get {{EOFException}} 
> since it doesn't contain the new field.
> We should make sure that we never do zero-copy streaming to nodes that don't 
> know about the file version.
> The corrupt sstables can be fixed by simply renaming all components of it to 
> {{-na-}} from {{-nb-}}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

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



[jira] [Updated] (CASSANDRA-17042) Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0

2021-10-15 Thread Marcus Eriksson (Jira)


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

Marcus Eriksson updated CASSANDRA-17042:

Test and Documentation Plan: jvm dtest, cci run
 Status: Patch Available  (was: Open)

* make sure we never rewrite a future stats metadata file
* import should fail on future sstables
* we should fall back to regular streaming if remote node does not support the 
current sstable version

https://app.circleci.com/pipelines/github/krummas/cassandra?branch=marcuse%2F17042
https://github.com/apache/cassandra/compare/cassandra-4.0...krummas:marcuse/17042?expand=1

note that the jvm dtest added requires support for minor upgrades in jvm 
dtests, will work on that

> Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0
> -
>
> Key: CASSANDRA-17042
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17042
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Streaming, Local/SSTable
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 4.0.x, 4.x
>
>
> 4.0-rc2 introduced a new sstable version ({{-nb-}}), adding a field in 
> {{StatsMetadata}}. When zero copy streaming a file from 4.0-rc2+ to 4.0-rc1, 
> the rc1 node will write it as an {{-nb-}} file, mutate the metadata to clear 
> repairedAt/level information from StatsMetadata and rewrite the file, keeping 
> the same file name. Problem is that since rc1 doesn't know about the new 
> field in StatsMetadata, it will write the file without the new StatsMetadata 
> field, but with an {{-nb-}} filename. Then, when upgrading this node to rc2+ 
> we will try to read it as a {{-nb-}} file, but will get {{EOFException}} 
> since it doesn't contain the new field.
> We should make sure that we never do zero-copy streaming to nodes that don't 
> know about the file version.
> The corrupt sstables can be fixed by simply renaming all components of it to 
> {{-na-}} from {{-nb-}}



--
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] [Updated] (CASSANDRA-17042) Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0

2021-10-14 Thread Marcus Eriksson (Jira)


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

Marcus Eriksson updated CASSANDRA-17042:

 Bug Category: Parent values: Correctness(12982)Level 1 values: Recoverable 
Corruption / Loss(12986)
   Complexity: Normal
Discovered By: Adhoc Test
Fix Version/s: 4.x
   4.0.x
 Severity: Critical
   Status: Open  (was: Triage Needed)

> Avoid sstable corruption when upgrading from 4.0-rc1 to 4.0.0
> -
>
> Key: CASSANDRA-17042
> URL: https://issues.apache.org/jira/browse/CASSANDRA-17042
> Project: Cassandra
>  Issue Type: Bug
>  Components: Consistency/Streaming, Local/SSTable
>Reporter: Marcus Eriksson
>Assignee: Marcus Eriksson
>Priority: Normal
> Fix For: 4.0.x, 4.x
>
>
> 4.0-rc2 introduced a new sstable version ({{-nb-}}), adding a field in 
> {{StatsMetadata}}. When zero copy streaming a file from 4.0-rc2+ to 4.0-rc1, 
> the rc1 node will write it as an {{-nb-}} file, mutate the metadata to clear 
> repairedAt/level information from StatsMetadata and rewrite the file, keeping 
> the same file name. Problem is that since rc1 doesn't know about the new 
> field in StatsMetadata, it will write the file without the new StatsMetadata 
> field, but with an {{-nb-}} filename. Then, when upgrading this node to rc2+ 
> we will try to read it as a {{-nb-}} file, but will get {{EOFException}} 
> since it doesn't contain the new field.
> We should make sure that we never do zero-copy streaming to nodes that don't 
> know about the file version.
> The corrupt sstables can be fixed by simply renaming all components of it to 
> {{-na-}} from {{-nb-}}



--
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