From 38e78bb8a2ba6fc761ab4ea95e1b416e5570966b Mon Sep 17 00:00:00 2001 From: Glauber Costa Date: Thu, 17 Nov 2016 14:09:17 -0500 Subject: [PATCH] commitlog: use read ahead for replay requests Aside from putting the requests in the commitlog class, read ahead will help us going through the file faster. Signed-off-by: Glauber Costa (cherry picked from commit 59a41cf7f18435775d7bacbff946e28c1ccdc948) --- db/commitlog/commitlog.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/commitlog/commitlog.cc b/db/commitlog/commitlog.cc index 072cb1fb38..29da8a922c 100644 --- a/db/commitlog/commitlog.cc +++ b/db/commitlog/commitlog.cc @@ -1561,7 +1561,7 @@ db::commitlog::read_log_file(file f, commit_load_reader_func next, position_type 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.read_ahead = 10; fo.io_priority_class = service::get_local_commitlog_priority(); return fo; }