db/commitlog: Use fragmented buffers to read entries

Leverage fragmented_temporary_buffer when reading commit log
entries, avoiding large allocations.

Refs #4020

Signed-off-by: Duarte Nunes <duarte@scylladb.com>
This commit is contained in:
Duarte Nunes
2018-12-31 00:00:27 +00:00
parent 0e50a9bc6d
commit b7517183fa
8 changed files with 57 additions and 45 deletions

View File

@@ -78,7 +78,7 @@ public:
class commitlog_entry_reader {
commitlog_entry _ce;
public:
commitlog_entry_reader(const temporary_buffer<char>& buffer);
commitlog_entry_reader(const fragmented_temporary_buffer& buffer);
const stdx::optional<column_mapping>& get_column_mapping() const { return _ce.mapping(); }
const frozen_mutation& mutation() const & { return _ce.mutation(); }