This is done to avoid overlap in levels > 0

There is this though: https://issues.apache.org/jira/browse/CASSANDRA-13425

If you are restoring an entire node, starting with an empty data directory,
you should probably stop cassandra, copy the snapshot in, and restart, that
will keep the levels

On Thu, Jun 1, 2017 at 4:25 PM, Jean Carlo <jean.jeancar...@gmail.com>
wrote:

> Hello.
>
> During the restore of a table using its snapshot and nodetool refresh, I
> could see that cassandra starts to make a lot of compactions (depending on
> the size of the data).
>
> I wanted to know why and I found this in the code of cassandra 2.1.14.
>
> for CASSANDRA-4872
>
> +            // force foreign sstables to level 0
> +            try
> +            {
> +                if (new File(descriptor.filenameFor(
> Component.STATS)).exists())
> +                {
> +                    SSTableMetadata oldMetadata =
> SSTableMetadata.serializer.deserialize(descriptor);
> +                    LeveledManifest.mutateLevel(oldMetadata, descriptor,
> descriptor.filenameFor(Component.STATS), 0);
> +                }
> +            }
> +            catch (IOException e)
>
>
> This is very interesting and I wanted to know if this was coded taking
> into account only the case of a migration from STCS to LCS or if for the
> case LCS to LCS this is not pertinent
>
> In my case, I use nodetool refresh not only to restore a table but also to
> make an exact copy of any table LCS. So I think the levels do not need to
> change.
>
> @Marcus Can you be so kind to clarify this for me please ?
>
> Thenk you very much in advance
>
> Best regards
>
> Jean Carlo
>
> "The best way to predict the future is to invent it" Alan Kay
>

Reply via email to