mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
ircd:Ⓜ️:acquire: Add conf items to default some opts; rename and raise submit max.
This commit is contained in:
parent
65243a3410
commit
e4d517415b
3 changed files with 29 additions and 5 deletions
|
@ -23,6 +23,9 @@ struct ircd::m::acquire
|
|||
struct result;
|
||||
|
||||
static log::log log;
|
||||
static conf::item<size_t> fetch_max;
|
||||
static conf::item<size_t> submit_max;
|
||||
static conf::item<size_t> attempt_max;
|
||||
static uint64_t ids;
|
||||
|
||||
const uint64_t id {++ids};
|
||||
|
@ -114,14 +117,14 @@ struct ircd::m::acquire::opts
|
|||
size_t rounds {-1UL};
|
||||
|
||||
/// Total event limit over all operations.
|
||||
size_t fetch_max {-1UL};
|
||||
size_t fetch_max {acquire::fetch_max};
|
||||
|
||||
/// Limit the number of requests in flight at any given time.
|
||||
size_t fetch_width {128};
|
||||
size_t submit_max {acquire::submit_max};
|
||||
|
||||
/// Fetch attempt cap passed to m::fetch, because the default there is
|
||||
/// unlimited and that's usually a waste of time in practice.
|
||||
size_t attempt_max {16};
|
||||
size_t attempt_max {acquire::attempt_max};
|
||||
|
||||
/// Limit on the depth of leafs pursued by the timeline acquisition.
|
||||
size_t leaf_depth {0};
|
||||
|
|
|
@ -14,6 +14,27 @@ ircd::m::acquire::log
|
|||
"m.acquire"
|
||||
};
|
||||
|
||||
decltype(ircd::m::acquire::fetch_max)
|
||||
ircd::m::acquire::fetch_max
|
||||
{
|
||||
{ "name", "ircd.m.acquire.fetch.max" },
|
||||
{ "default", -1L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::acquire::submit_max)
|
||||
ircd::m::acquire::submit_max
|
||||
{
|
||||
{ "name", "ircd.m.acquire.submit.max" },
|
||||
{ "default", 256 },
|
||||
};
|
||||
|
||||
decltype(ircd::m::acquire::attempt_max)
|
||||
ircd::m::acquire::attempt_max
|
||||
{
|
||||
{ "name", "ircd.m.acquire.attempt.max" },
|
||||
{ "default", 16 },
|
||||
};
|
||||
|
||||
decltype(ircd::m::acquire::ids)
|
||||
ircd::m::acquire::ids;
|
||||
|
||||
|
@ -794,7 +815,7 @@ bool
|
|||
ircd::m::acquire::full()
|
||||
const noexcept
|
||||
{
|
||||
return fetching.size() >= opts.fetch_width;
|
||||
return fetching.size() >= opts.submit_max;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -72,7 +72,7 @@ decltype(ircd::m::fetch::requests_max)
|
|||
ircd::m::fetch::requests_max
|
||||
{
|
||||
{ "name", "ircd.m.fetch.requests.max" },
|
||||
{ "default", 1024L },
|
||||
{ "default", 2048L },
|
||||
};
|
||||
|
||||
decltype(ircd::m::fetch::backfill_limit_default)
|
||||
|
|
Loading…
Reference in a new issue