0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

ircd:Ⓜ️:events: Log errors and attempt to continue dump loop.

This commit is contained in:
Jason Volk 2020-01-08 15:47:58 -08:00
parent 7a5bb70f16
commit be955faf2d

View file

@ -104,7 +104,7 @@ ircd::m::events::dump__file(const string_view &filename)
char *pos{data(buf)};
size_t foff{0}, ecount{0}, acount{0}, errcount{0};
for(auto it(begin(dbs::event_json)); it; ++it)
for(auto it(begin(dbs::event_json)); it; ++it) try
{
const event::idx seq
{
@ -156,6 +156,23 @@ ircd::m::events::dump__file(const string_view &filename)
}
}
}
catch(const ctx::interrupted &)
{
throw;
}
catch(const std::exception &e)
{
++errcount;
log::error
{
"dump[%s] events; %s in %zu writes; %zu errors :%s",
filename,
ecount,
acount,
errcount,
e.what(),
};
}
if(pos > data(buf))
{