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

Jacek Lewandowski commented on CASSANDRA-18134:
-----------------------------------------------

[~benedict] thanks for chiming in. The test coverage is extended. Indeed, we 
should keep an eye on the unit tests to at least cover the changed code. Even 
better, improve the code coverage and make some reasonable assertions. On the 
other hand, I think that external tests, fuzz tests, etc., should be a case for 
a dedicated ticket as they verify the system as a whole, and are not strictly 
related to this PR.

Regarding backward compatibility - downgrading is another separate story that 
I'd not cover in this ticket. If we think about that seriously, we should have 
a kind of a downgrader (I noticed [~claude] was working on something recently 
and provided interesting feedback). So far, it is not a difficult task because 
from Cassandra 3.0 the sstables differ only with stats, filter, and compression 
metadata. However, with the newest changes related to deletion time limits 
(correct me if I'm wrong [~Bereng]), we will have slightly different 
serialization in a data file which I suppose will not be smooth to downgrade. 
Those two changes will be brought together in 5.0, in "OA" format.

Making essential features of the new version optional in order to be able to 
downgrade makes no sense to me. If people want to try a new version, they will 
likely want to do that due to the new features in question, so leaving them 
disabled contradicts the purpose of upgrading.

Aside of the general thoughts, I can also make this particular change 
compatible with "N?" format and thus make it possible to merge it into 4.x. 
Instead of replacing serialized bounds, I can serialize them twice - in the 
legacy format at the old position of the stats file, and in the new format, at 
the end of the file. This way, the old deserializer will reach those new fields.

 

> Improve handling of min/max clustering in sstable
> -------------------------------------------------
>
>                 Key: CASSANDRA-18134
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-18134
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local/SSTable
>            Reporter: Jacek Lewandowski
>            Assignee: Jacek Lewandowski
>            Priority: Normal
>             Fix For: 5.x
>
>
> This patch improves the following things:
> # SSTable metadata will store a covered slice instead of min/max clusterings. 
> The difference is that for slices there is available the type of a bound 
> rather than just a clustering. In particular it will provide the information 
> whether the lower and upper bound of an sstable is opened or closed.
> # SSTable metadata will store a flag whether the SSTable contains any 
> partition level deletions or not
> # The above two changes required to introduce a new major format for SSTables 
> - {{oa}}
> # Single partition read command makes use of the above changes. In particular 
> an sstable can be skipped when it does not intersect with the column filter, 
> does not have partition level deletions and does not have statics; In case 
> there are partition level deletions, but the other conditions are satisfied, 
> only the partition header needs to be accessed (tests attached)
> # Skipping sstables assuming those three conditions are satisfied has been 
> implemented also for partition range queries (tests attached). Also added 
> minor separate statistics to record the number of accessed sstables in 
> partition reads because now not all of them need to be accessed. That 
> statistics is also needed in tests to confirm skipping.
> # Artificial lower bound marker is now an object on its own and is not 
> implemented as a special case of range tombstone bound. Instead it sorts 
> right before the lowest available bound in the data
> # Extended the lower bound optimization usage due the 1 and 2
> # Do not initialize iterator just to get a cached partition and associated 
> columns index. The purpose of using lower bound optimization was to avoid 
> opening an iterator of an sstable if possible.
> See also CASSANDRA-14861
> The changes in this patch include work of [~blambov], [~slebresne], 
> [~jakubzytka] and [~jlewandowski]



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

Reply via email to