cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-8928) Add downgradesstables
Date Tue, 15 Mar 2016 19:49:33 GMT


Paulo Motta commented on CASSANDRA-8928:

bq. I tried to find something similar of changes on version 2.2 but I didn't find anything,
do you have any similar references or similar things, I'll try to see if I can breakdown it,
but it seems quite difficult in the sense that I'm not familiar with Cassandra code base.

This [blog post|]
might have some useful info on previous sstable format to start with. I understand this is
not a trivial task so you might need to do a lot of background reading before start doing
some real work. You might want to watch these [tutorials|]
on C* internals, in particular the read write path and compactions to understand in which
context sstables fit in. The [ccm|] tool is very handy to create
throw-away cassandra clusters.

A simple exercise you can make to get acquainted with the sstable format is to create a simple
table on C* 2.2, insert some data on it, and inspect it with [sstable2json tool|].
Then create the same table on C* 3.X and inspect it with [sstabledump|]
and compare the results. 

After that you might inspect the {{StandaloneScrubber}} class on {{trunk}} (which implements
the [sstablescrub|]
tool) to understand the flow of reading an sstable and rewriting it in the current format
+ fix corruptions. Then you might want to hack this tool to read in the current format and
write in the {{ka}} format by replacing the {{SSTableRewriter}} with a {{LegacySSTableWriter}}
that could initially be a copy of the 2.2 {{BigTableWriter}} (you'll probably have fun for
a few weeks with this already).

bq. Also before jumping to draw up the framework, I'd like to know is our purpose downgrade
an existing SSTable to certain older version or add the possibility to write older version
of SSTable?

SSTable are immutable structures, so in order to downgrade and existing sstable you need to
read it in the current format and then write it in an older format. So the flow is: la-sstable
-> <downgradesstables> -> ka-sstable

Please note that if you have questions along the way you can also reach out on #cassandra-dev

> Add downgradesstables
> ---------------------
>                 Key: CASSANDRA-8928
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: Jeremy Hanna
>            Priority: Minor
>              Labels: gsoc2016, mentor
> As mentioned in other places such as CASSANDRA-8047 and in the wild, sometimes you need
to go back.  A downgrade sstables utility would be nice for a lot of reasons and I don't know
that supporting going back to the previous major version format would be too much code since
we already support reading the previous version.

This message was sent by Atlassian JIRA

View raw message