mirror of
https://github.com/matrix-construct/construct
synced 2024-11-18 07:50:57 +01:00
ircd::db: Use a zero soft-limit to yield all requests when saturated; prefetch condition.
This commit is contained in:
parent
5ae69dde95
commit
c82382ea2c
1 changed files with 4 additions and 0 deletions
|
@ -109,6 +109,7 @@ ircd::db::request
|
||||||
"db req",
|
"db req",
|
||||||
size_t(request_pool_stack_size),
|
size_t(request_pool_stack_size),
|
||||||
0, // don't prespawn because this is static
|
0, // don't prespawn because this is static
|
||||||
|
0, // zero-size queue will yield submitter
|
||||||
};
|
};
|
||||||
|
|
||||||
/// This mutex is necessary to serialize entry into rocksdb's write impl
|
/// This mutex is necessary to serialize entry into rocksdb's write impl
|
||||||
|
@ -9859,6 +9860,9 @@ ircd::db::prefetch(column &column,
|
||||||
if(cached(column, key, gopts))
|
if(cached(column, key, gopts))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if(!request.avail())
|
||||||
|
return;
|
||||||
|
|
||||||
request([column(column), key(std::string(key)), gopts]
|
request([column(column), key(std::string(key)), gopts]
|
||||||
() mutable
|
() mutable
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue