From b532523d047517e6ce926703aa9cf2d67dbc0532 Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Thu, 10 Sep 2020 23:25:46 -0700 Subject: [PATCH] ircd::m::events: Add checkpoint to events dump; adjust low watermark for flush. --- matrix/events.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/matrix/events.cc b/matrix/events.cc index f2ca3a04e..8f0ada0d1 100644 --- a/matrix/events.cc +++ b/matrix/events.cc @@ -142,7 +142,10 @@ ircd::m::events::dump__file(const string_view &filename) json::stack out { - buf, flusher + buf, + flusher, + -1UL, // high watermark + size(buf) // low watermark }; json::stack::array top @@ -162,6 +165,11 @@ ircd::m::events::dump__file(const string_view &filename) it->second }; + const json::stack::checkpoint cp + { + out + }; + top.append(source); ++ecount; }