diff options
author | Sulabh Mahajan <sulabh.mahajan@mongodb.com> | 2022-09-15 09:58:55 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-09-15 10:29:15 +0000 |
commit | 0797ff28efcd7cb954b88658425b7b38c980b605 (patch) | |
tree | c668432fdaab555b6a50d2b874f61ac509829f52 /src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | |
parent | fa920335ed6a41efa417e5c41940cd28a4a36829 (diff) | |
download | mongo-0797ff28efcd7cb954b88658425b7b38c980b605.tar.gz |
SERVER-69615 On shutdown retry size storer flush until successful
Diffstat (limited to 'src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp')
-rw-r--r-- | src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp index ca705dbcd9d..9c94932c070 100644 --- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp +++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp @@ -1342,10 +1342,15 @@ void WiredTigerKVEngine::syncSizeInfo(bool sync) const { if (!_sizeStorer) return; - try { - _sizeStorer->flush(sync); - } catch (const WriteConflictException&) { - // ignore, we'll try again later. + while (true) { + try { + return _sizeStorer->flush(sync); + } catch (const WriteConflictException&) { + if (!sync) { + // ignore, we'll try again later. + return; + } + } } } |