From: Samuel Just Date: Tue, 23 Jan 2024 21:47:27 +0000 (+0000) Subject: Revert "crimson/os/alienstore/alien_log: _flush concurrently" X-Git-Tag: v19.3.0~165^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4d52d1d22b74c3fcbc43db0973ef48d11e91748b;p=ceph.git Revert "crimson/os/alienstore/alien_log: _flush concurrently" While submitting the log line asyncronously is reasonable, with this implementation the EntryVector &q parameter does not necessarily outlive the submission continuation. This reverts commit 511af83e2747361350b60ce0ce88e67a726d9343. Fixes: https://tracker.ceph.com/issues/64140 Signed-off-by: Samuel Just --- diff --git a/src/crimson/os/alienstore/alien_log.cc b/src/crimson/os/alienstore/alien_log.cc index 822b2f3ab519..a0f5b03a5d39 100644 --- a/src/crimson/os/alienstore/alien_log.cc +++ b/src/crimson/os/alienstore/alien_log.cc @@ -17,7 +17,8 @@ CnLog::~CnLog() { } void CnLog::_flush(EntryVector& q, bool crash) { - std::ignore = seastar::alien::submit_to(inst, shard, [&q] { + // XXX: the waiting here will block the thread for an indeterministic peroid + seastar::alien::submit_to(inst, shard, [&q] { for (auto& it : q) { crimson::get_logger(it.m_subsys).log( crimson::to_log_level(it.m_prio), @@ -25,7 +26,7 @@ void CnLog::_flush(EntryVector& q, bool crash) { it.strv()); } return seastar::make_ready_future<>(); - }); + }).wait(); q.clear(); return; }