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

Joel Knighton updated CASSANDRA-11742:
--------------------------------------
    Status: Patch Available  (was: Open)

||branch||testall||dtest||
|[CASSANDRA-11742-2.2|https://github.com/jkni/cassandra/tree/CASSANDRA-11742-2.2]|[testall|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-2.2-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-2.2-dtest]|
|[CASSANDRA-11742-3.0|https://github.com/jkni/cassandra/tree/CASSANDRA-11742-3.0]|[testall|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-3.0-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-3.0-dtest]|
|[CASSANDRA-11742-3.7|https://github.com/jkni/cassandra/tree/CASSANDRA-11742-3.7]|[testall|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-3.7-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-3.7-dtest]|
|[CASSANDRA-11742-trunk|https://github.com/jkni/cassandra/tree/CASSANDRA-11742-trunk]|[testall|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-trunk-testall]|[dtest|http://cassci.datastax.com/view/Dev/view/jkni/job/jkni-CASSANDRA-11742-trunk-dtest]|

Patches implement the approach described above of persisting local metadata in 
the SystemKeyspace immediately after the startup checks have completed. 
testall/dtests look clean - the delay in these patches was uncertainty about a 
few tests that were destabilized over the last couple weeks, but rebased runs 
look better.

2.2 patch differs from 3.0 patch slightly due to some 3.0 refactoring. 3.0 
patch merges cleanly through 3.7 and trunk.


> Failed bootstrap results in exception when node is restarted
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-11742
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11742
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Tommy Stendahl
>            Assignee: Joel Knighton
>            Priority: Minor
>             Fix For: 2.2.x, 3.0.x, 3.x
>
>         Attachments: 11742-2.txt, 11742.txt
>
>
> Since 2.2 a failed bootstrap results in a 
> {{org.apache.cassandra.exceptions.ConfigurationException: Found system 
> keyspace files, but they couldn't be loaded!}} exception when the node is 
> restarted. This did not happen in 2.1, it just tried to bootstrap again. I 
> know that the workaround is relatively easy, just delete the system keyspace 
> in the data folder on disk and try again, but its a bit annoying that you 
> have to do that.
> The problem seems to be that the creation of the {{system.local}} table has 
> been moved to just before the bootstrap begins (in 2.1 it was done much 
> earlier) and as a result its still in the memtable och commitlog if the 
> bootstrap failes. Still a few values is inserted to the {{system.local}} 
> table at an earlier point in the startup and they have been flushed from the 
> memtable to an sstable. When the node is restarted the 
> {{SystemKeyspace.checkHealth()}} is executed before the commitlog is replayed 
> and therefore only see the sstable with an incomplete {{system.local}} table 
> and throws an exception.
> I think we could fix this very easily by forceFlush the system keyspace in 
> the {{StorageServiceShutdownHook}}, I have included a patch that does this. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to