From faba7b2ad4516629c61275b12691c49bac82fc87 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Tue, 20 Dec 2016 18:47:07 +0100 Subject: [PATCH] Revert "Revert "commitlog: use commitlog priority for replay"" This reverts commit 53c3219e560540524633261a83a152e4e3d58944. --- db/commitlog/commitlog.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index afe2b5d115..072cb1fb38 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -1557,6 +1557,15 @@ db::commitlog::read_log_file(const sstring& filename, commit_load_reader_func ne subscription, db::replay_position> db::commitlog::read_log_file(file f, commit_load_reader_func next, position_type off) { struct work { + private: + file_input_stream_options make_file_input_stream_options() { + file_input_stream_options fo; + fo.buffer_size = db::commitlog::segment::default_size; + fo.read_ahead = 0; + fo.io_priority_class = service::get_local_commitlog_priority(); + return fo; + } + public: file f; stream, replay_position> s; input_stream fin; @@ -1572,7 +1581,7 @@ db::commitlog::read_log_file(file f, commit_load_reader_func next, position_type bool header = true; work(file f, position_type o = 0) - : f(f), fin(make_file_input_stream(f)), start_off(o) { + : f(f), fin(make_file_input_stream(f, o, make_file_input_stream_options())), start_off(o) { } work(work&&) = default;