cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-6514) Nodetool Refresh / CFS.loadNewSSTables() can Lose New SSTables
Date Thu, 19 Dec 2013 23:02:06 GMT


Tyler Hobbs commented on CASSANDRA-6514:

bq.  "come up with generation ids high enough that they won't conflict with new sstables until
long after loading is done."

I did think about that, but in this case, the generations didn't conflict with newly flushed
sstables, so it was particularly unexpected. 

> Nodetool Refresh / CFS.loadNewSSTables() can Lose New SSTables
> --------------------------------------------------------------
>                 Key: CASSANDRA-6514
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core, Tools
>            Reporter: Tyler Hobbs
>            Assignee: Tyler Hobbs
>            Priority: Minor
>         Attachments: 6514-2.0.patch
> When nodetool refresh / CFS.loadNewSSTables() renames the newly loaded SSTables, it doesn't
check to make sure the new name doesn't already exist.  It's easy for one of the newly loaded
files themselves to have one of these names, so the rename will wipe out one of the SSTables
you intended to load.
> For example, if you create a new, empty table, move two SSTables with generations 1 and
2 into the data directory, and then call {{nodetool refresh}}, you might see this:
> {noformat}
> INFO 15:37:42,587 Loading new SSTables for duration_test/ints...
>  INFO 15:37:42,601 Renaming new SSTable /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-2
to /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-1
>  INFO 15:37:42,605 Opening /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-1
(424005 bytes)
>  INFO 15:37:42,614 Renaming new SSTable /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-1
to /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-2
>  INFO 15:37:42,615 Opening /var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-2
(424005 bytes)
>  INFO 15:37:42,617 Loading new SSTables and building secondary indexes for duration_test/ints:
>  INFO 15:37:42,618 Done loading load new SSTables for duration_test/ints
> ERROR 15:38:09,428 Exception in thread Thread[ReadStage:40,5,main]
> java.lang.RuntimeException: java.lang.RuntimeException:
/var/lib/cassandra/data/duration_test/ints/duration_test-ints-jb-1-Data.db (No such file or
> 	at org.apache.cassandra.service.StorageProxy$
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(
> 	at java.util.concurrent.ThreadPoolExecutor$
> 	at
> {noformat}

This message was sent by Atlassian JIRA

View raw message