Commitlog: Allow skipping X bytes in commit log reader

Also refactor reader into named methods for debugging sanity.
This commit is contained in:
Calle Wilund
2015-08-19 16:11:26 +02:00
parent da9ea641e5
commit bbf82e80d0
2 changed files with 147 additions and 104 deletions

View File

@@ -192,8 +192,8 @@ public:
typedef std::function<future<>(temporary_buffer<char>, replay_position)> commit_load_reader_func;
static subscription<temporary_buffer<char>, replay_position> read_log_file(file, commit_load_reader_func);
static future<subscription<temporary_buffer<char>, replay_position>> read_log_file(const sstring&, commit_load_reader_func);
static subscription<temporary_buffer<char>, replay_position> read_log_file(file, commit_load_reader_func, position_type = 0);
static future<subscription<temporary_buffer<char>, replay_position>> read_log_file(const sstring&, commit_load_reader_func, position_type = 0);
private:
commitlog(config);
};