mirror of
https://github.com/matrix-construct/construct
synced 2024-11-16 15:00:51 +01:00
ircd:Ⓜ️:dbs: Add conf items for bloom filters.
This commit is contained in:
parent
f2a08426c5
commit
ad003a0d66
2 changed files with 70 additions and 22 deletions
|
@ -97,6 +97,7 @@ namespace ircd::m::dbs::desc
|
||||||
//
|
//
|
||||||
|
|
||||||
extern conf::item<size_t> events___event__meta_block__size;
|
extern conf::item<size_t> events___event__meta_block__size;
|
||||||
|
extern conf::item<size_t> events___event__bloom__bits;
|
||||||
|
|
||||||
extern conf::item<size_t> events__auth_events__block__size;
|
extern conf::item<size_t> events__auth_events__block__size;
|
||||||
extern conf::item<size_t> events__auth_events__cache__size;
|
extern conf::item<size_t> events__auth_events__cache__size;
|
||||||
|
@ -189,12 +190,14 @@ namespace ircd::m::dbs::desc
|
||||||
extern conf::item<size_t> events__event_idx__meta_block__size;
|
extern conf::item<size_t> events__event_idx__meta_block__size;
|
||||||
extern conf::item<size_t> events__event_idx__cache__size;
|
extern conf::item<size_t> events__event_idx__cache__size;
|
||||||
extern conf::item<size_t> events__event_idx__cache_comp__size;
|
extern conf::item<size_t> events__event_idx__cache_comp__size;
|
||||||
|
extern conf::item<size_t> events__event_idx__bloom__bits;
|
||||||
extern const db::descriptor events__event_idx;
|
extern const db::descriptor events__event_idx;
|
||||||
|
|
||||||
// events blacklist
|
// events blacklist
|
||||||
extern conf::item<size_t> events__event_bad__block__size;
|
extern conf::item<size_t> events__event_bad__block__size;
|
||||||
extern conf::item<size_t> events__event_bad__cache__size;
|
extern conf::item<size_t> events__event_bad__cache__size;
|
||||||
extern conf::item<size_t> events__event_bad__cache_comp__size;
|
extern conf::item<size_t> events__event_bad__cache_comp__size;
|
||||||
|
extern conf::item<size_t> events__event_bad__bloom__bits;
|
||||||
extern const db::descriptor events__event_bad;
|
extern const db::descriptor events__event_bad;
|
||||||
|
|
||||||
// room head mapping sequence
|
// room head mapping sequence
|
||||||
|
@ -218,6 +221,7 @@ namespace ircd::m::dbs::desc
|
||||||
extern conf::item<size_t> events__room_joined__meta_block__size;
|
extern conf::item<size_t> events__room_joined__meta_block__size;
|
||||||
extern conf::item<size_t> events__room_joined__cache__size;
|
extern conf::item<size_t> events__room_joined__cache__size;
|
||||||
extern conf::item<size_t> events__room_joined__cache_comp__size;
|
extern conf::item<size_t> events__room_joined__cache_comp__size;
|
||||||
|
extern conf::item<size_t> events__room_joined__bloom__bits;
|
||||||
extern const db::prefix_transform events__room_joined__pfx;
|
extern const db::prefix_transform events__room_joined__pfx;
|
||||||
extern const db::descriptor events__room_joined;
|
extern const db::descriptor events__room_joined;
|
||||||
|
|
||||||
|
@ -226,6 +230,7 @@ namespace ircd::m::dbs::desc
|
||||||
extern conf::item<size_t> events__room_state__meta_block__size;
|
extern conf::item<size_t> events__room_state__meta_block__size;
|
||||||
extern conf::item<size_t> events__room_state__cache__size;
|
extern conf::item<size_t> events__room_state__cache__size;
|
||||||
extern conf::item<size_t> events__room_state__cache_comp__size;
|
extern conf::item<size_t> events__room_state__cache_comp__size;
|
||||||
|
extern conf::item<size_t> events__room_state__bloom__bits;
|
||||||
extern const db::prefix_transform events__room_state__pfx;
|
extern const db::prefix_transform events__room_state__pfx;
|
||||||
extern const db::descriptor events__room_state;
|
extern const db::descriptor events__room_state;
|
||||||
|
|
||||||
|
@ -234,6 +239,7 @@ namespace ircd::m::dbs::desc
|
||||||
extern conf::item<size_t> events__state_node__meta_block__size;
|
extern conf::item<size_t> events__state_node__meta_block__size;
|
||||||
extern conf::item<size_t> events__state_node__cache__size;
|
extern conf::item<size_t> events__state_node__cache__size;
|
||||||
extern conf::item<size_t> events__state_node__cache_comp__size;
|
extern conf::item<size_t> events__state_node__cache_comp__size;
|
||||||
|
extern conf::item<size_t> events__state_node__bloom__bits;
|
||||||
extern const db::descriptor events__state_node;
|
extern const db::descriptor events__state_node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -613,6 +613,13 @@ ircd::m::dbs::desc::events__event_idx__cache_comp__size
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events__event_idx__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events__event_idx__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events._event_idx.bloom.bits" },
|
||||||
|
{ "default", 9L },
|
||||||
|
};
|
||||||
|
|
||||||
const ircd::db::descriptor
|
const ircd::db::descriptor
|
||||||
ircd::m::dbs::desc::events__event_idx
|
ircd::m::dbs::desc::events__event_idx
|
||||||
{
|
{
|
||||||
|
@ -658,7 +665,7 @@ ircd::m::dbs::desc::events__event_idx
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events__event_idx__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -700,6 +707,13 @@ ircd::m::dbs::desc::events__event_bad__cache_comp__size
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events__event_bad__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events__event_bad__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events._event_bad.bloom.bits" },
|
||||||
|
{ "default", 10L },
|
||||||
|
};
|
||||||
|
|
||||||
const ircd::db::descriptor
|
const ircd::db::descriptor
|
||||||
ircd::m::dbs::desc::events__event_bad
|
ircd::m::dbs::desc::events__event_bad
|
||||||
{
|
{
|
||||||
|
@ -741,7 +755,7 @@ ircd::m::dbs::desc::events__event_bad
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events__event_bad__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -868,7 +882,7 @@ ircd::m::dbs::desc::events__room_head
|
||||||
0, //no compresed cache
|
0, //no compresed cache
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
0,
|
0, //table too ephemeral for bloom generation/usefulness
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -1196,6 +1210,13 @@ ircd::m::dbs::desc::events__room_joined__cache_comp__size
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events__room_joined__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events__room_joined__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events._room_joined.bloom.bits" },
|
||||||
|
{ "default", 6L },
|
||||||
|
};
|
||||||
|
|
||||||
/// Prefix transform for the events__room_joined
|
/// Prefix transform for the events__room_joined
|
||||||
///
|
///
|
||||||
const ircd::db::prefix_transform
|
const ircd::db::prefix_transform
|
||||||
|
@ -1296,7 +1317,7 @@ ircd::m::dbs::desc::events__room_joined
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events__room_joined__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -1352,6 +1373,13 @@ ircd::m::dbs::desc::events__room_state__cache_comp__size
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events__room_state__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events__room_state__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events._room_state.bloom.bits" },
|
||||||
|
{ "default", 10L },
|
||||||
|
};
|
||||||
|
|
||||||
/// prefix transform for type,state_key in room_id
|
/// prefix transform for type,state_key in room_id
|
||||||
///
|
///
|
||||||
/// This transform is special for concatenating room_id with type and state_key
|
/// This transform is special for concatenating room_id with type and state_key
|
||||||
|
@ -1463,7 +1491,7 @@ ircd::m::dbs::desc::events__room_state
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events__room_state__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -1519,6 +1547,13 @@ ircd::m::dbs::desc::events__state_node__cache_comp__size
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events__state_node__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events__state_node__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events._state_node.bloom.bits" },
|
||||||
|
{ "default", 0L },
|
||||||
|
};
|
||||||
|
|
||||||
/// State nodes are pieces of the m::state:: b-tree. The key is the hash
|
/// State nodes are pieces of the m::state:: b-tree. The key is the hash
|
||||||
/// of the value, which serves as the ID of the node when referenced in
|
/// of the value, which serves as the ID of the node when referenced in
|
||||||
/// the tree. see: m/state.h for details.
|
/// the tree. see: m/state.h for details.
|
||||||
|
@ -1558,7 +1593,7 @@ ircd::m::dbs::desc::events__state_node
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events__state_node__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -1581,6 +1616,13 @@ ircd::m::dbs::desc::events___event__meta_block__size
|
||||||
{ "default", 8192L },
|
{ "default", 8192L },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
decltype(ircd::m::dbs::desc::events___event__bloom__bits)
|
||||||
|
ircd::m::dbs::desc::events___event__bloom__bits
|
||||||
|
{
|
||||||
|
{ "name", "ircd.m.dbs.events.__event.bloom.bits" },
|
||||||
|
{ "default", 8L },
|
||||||
|
};
|
||||||
|
|
||||||
//
|
//
|
||||||
// event_id
|
// event_id
|
||||||
//
|
//
|
||||||
|
@ -1661,7 +1703,7 @@ ircd::m::dbs::desc::events_event_id
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -1753,7 +1795,7 @@ ircd::m::dbs::desc::events_type
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -1845,7 +1887,7 @@ ircd::m::dbs::desc::events_content
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -1931,7 +1973,7 @@ ircd::m::dbs::desc::events_redacts
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -2022,7 +2064,7 @@ ircd::m::dbs::desc::events_room_id
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2113,7 +2155,7 @@ ircd::m::dbs::desc::events_sender
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2206,7 +2248,7 @@ ircd::m::dbs::desc::events_state_key
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -2294,7 +2336,7 @@ ircd::m::dbs::desc::events_origin
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2393,7 +2435,7 @@ ircd::m::dbs::desc::events_origin_server_ts
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2479,7 +2521,7 @@ ircd::m::dbs::desc::events_signatures
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2564,7 +2606,7 @@ ircd::m::dbs::desc::events_auth_events
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -2656,7 +2698,7 @@ ircd::m::dbs::desc::events_depth
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2741,7 +2783,7 @@ ircd::m::dbs::desc::events_hashes
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2826,7 +2868,7 @@ ircd::m::dbs::desc::events_membership
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
@ -2911,7 +2953,7 @@ ircd::m::dbs::desc::events_prev_events
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
true,
|
true,
|
||||||
|
@ -2996,7 +3038,7 @@ ircd::m::dbs::desc::events_prev_state
|
||||||
bool(events_cache_comp_enable)? -1 : 0,
|
bool(events_cache_comp_enable)? -1 : 0,
|
||||||
|
|
||||||
// bloom filter bits
|
// bloom filter bits
|
||||||
10,
|
size_t(events___event__bloom__bits),
|
||||||
|
|
||||||
// expect queries hit
|
// expect queries hit
|
||||||
false,
|
false,
|
||||||
|
|
Loading…
Reference in a new issue