forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge "wire up schema raft state machine" from Gleb
This series wires up the schema state machine to process raft commands and transfer snapshots. The series assumes that raft group zero is used for schema transfer only and that single raft command contains single schema change in a form of canonical_mutation array. Both assumptions may change in which case the code will be changed accordingly, but we need to start somewhere. * scylla-dev/gleb/schema-raft-sm-v2: schema raft sm: request schema sync on schema_state_machine snapshot transfer raft service: delegate snapshot transfer to a state machine implementation schema raft sm: pass migration manager to schema_raft_state_machine and merge schema on apply()
- Loading branch information
Showing
6 changed files
with
85 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright (C) 2021-present ScyllaDB | ||
*/ | ||
|
||
/* | ||
* This file is part of Scylla. | ||
* | ||
* Scylla is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* Scylla is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with Scylla. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#pragma once | ||
|
||
#include "gms/inet_address.hh" | ||
#include "raft/raft.hh" | ||
|
||
namespace service { | ||
|
||
// Scylla specific extention for raft state machine | ||
// Snapshot transfer is delegated to a state machine implementation | ||
class raft_state_machine : public raft::state_machine { | ||
public: | ||
virtual future<> transfer_snapshot(gms::inet_address from, raft::snapshot_id snp) = 0; | ||
}; | ||
|
||
} // end of namespace service |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters