Skip to content

Commit

Permalink
system_keyspace: mark scylla_local table as always-sync commitlog
Browse files Browse the repository at this point in the history
It is infrequently updated (typically once at start) but stores
critical state for this instance survival (Raft Group 0 id, Raft
server id, sstables format), so always write it to commit log
in sync mode.
  • Loading branch information
kostja committed Nov 25, 2021
1 parent fd29585 commit 30e3227
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions db/system_keyspace.cc
Original file line number Diff line number Diff line change
Expand Up @@ -649,6 +649,8 @@ schema_ptr system_keyspace::large_cells() {
"Scylla specific information about the local node"
);
builder.set_gc_grace_seconds(0);
// Raft Group id and server id updates must be sync
builder.set_wait_for_sync_to_commitlog(true);
builder.with_version(generate_schema_version(builder.uuid()));
return builder.build(schema_builder::compact_storage::no);
}();
Expand Down
2 changes: 1 addition & 1 deletion db/system_keyspace.hh
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public:
static schema_ptr batchlog();
};

static constexpr const char* extra_durable_tables[] = { PAXOS };
static constexpr const char* extra_durable_tables[] = { PAXOS, SCYLLA_LOCAL };

static bool is_extra_durable(const sstring& name);

Expand Down

0 comments on commit 30e3227

Please sign in to comment.