0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 15:33:54 +01:00

ircd:Ⓜ️:acquire: Add a head reset option for now.

ircd:Ⓜ️:init::backfill: Use head reset option for room acquire.
This commit is contained in:
Jason Volk 2020-06-12 20:52:32 -07:00
parent 751b413f0d
commit 6f508f92a4
3 changed files with 11 additions and 0 deletions

View file

@ -32,5 +32,7 @@ struct ircd::m::acquire::opts
bool head {false};
bool head_reset {false};
bool missing {false};
};

View file

@ -40,6 +40,14 @@ ircd::m::acquire::acquire::acquire(const room &room,
handle_missing(room, opts);
ctx::interruption_point();
}
if(opts.head_reset)
{
const size_t num_reset
{
m::room::head::reset(room)
};
}
}
//

View file

@ -306,6 +306,7 @@ ircd::m::init::backfill::handle_room(const room::id &room_id)
m::acquire::opts opts;
opts.head = true;
opts.missing = true;
opts.head_reset = true;
m::acquire::acquire
{
room_id, opts