commitlog: update last sync timestamp when cycle a buffer
If in memory buffer has not enough space for incoming mutation it is written into a file, but the code missed updating timestamp of a last sync, so we may sync to often. Message-Id: <20200102155049.21291-9-gleb@scylladb.com>
This commit is contained in:
@@ -852,7 +852,7 @@ public:
|
||||
// If we run batch mode and find ourselves not fit in a non-empty
|
||||
// buffer, we must force a cycle and wait for it (to keep flush order)
|
||||
// This will most likely cause parallel writes, and consecutive flushes.
|
||||
return with_timeout(timeout, cycle(true)).then([this, id, writer = std::move(writer), permit = std::move(permit), timeout] (auto new_seg) mutable {
|
||||
return with_timeout(timeout, sync()).then([this, id, writer = std::move(writer), permit = std::move(permit), timeout] (auto new_seg) mutable {
|
||||
return new_seg->allocate(id, std::move(writer), std::move(permit), timeout);
|
||||
});
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user