From 9833b505514d0646f5ee84b910df2a2ac6f7efdf Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Tue, 16 Oct 2018 13:40:03 -0700 Subject: [PATCH] ircd::m::dbs: Add metadata block size conf items for various meta columns. --- include/ircd/m/dbs.h | 6 +++++ ircd/m/dbs.cc | 64 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 68 insertions(+), 2 deletions(-) diff --git a/include/ircd/m/dbs.h b/include/ircd/m/dbs.h index 88a6a8922..f774dd750 100644 --- a/include/ircd/m/dbs.h +++ b/include/ircd/m/dbs.h @@ -182,6 +182,7 @@ namespace ircd::m::dbs::desc // events index extern conf::item events__event_idx__block__size; + extern conf::item events__event_idx__meta_block__size; extern conf::item events__event_idx__cache__size; extern conf::item events__event_idx__cache_comp__size; extern const db::descriptor events__event_idx; @@ -194,12 +195,14 @@ namespace ircd::m::dbs::desc // room head mapping sequence extern conf::item events__room_head__block__size; + extern conf::item events__room_head__meta_block__size; extern conf::item events__room_head__cache__size; extern const db::prefix_transform events__room_head__pfx; extern const db::descriptor events__room_head; // room events sequence extern conf::item events__room_events__block__size; + extern conf::item events__room_events__meta_block__size; extern conf::item events__room_events__cache__size; extern conf::item events__room_events__cache_comp__size; extern const db::prefix_transform events__room_events__pfx; @@ -208,6 +211,7 @@ namespace ircd::m::dbs::desc // room present joined members sequence extern conf::item events__room_joined__block__size; + extern conf::item events__room_joined__meta_block__size; extern conf::item events__room_joined__cache__size; extern conf::item events__room_joined__cache_comp__size; extern const db::prefix_transform events__room_joined__pfx; @@ -215,6 +219,7 @@ namespace ircd::m::dbs::desc // room present state mapping sequence extern conf::item events__room_state__block__size; + extern conf::item events__room_state__meta_block__size; extern conf::item events__room_state__cache__size; extern conf::item events__room_state__cache_comp__size; extern const db::prefix_transform events__room_state__pfx; @@ -222,6 +227,7 @@ namespace ircd::m::dbs::desc // state btree node key-value store extern conf::item events__state_node__block__size; + extern conf::item events__state_node__meta_block__size; extern conf::item events__state_node__cache__size; extern conf::item events__state_node__cache_comp__size; extern const db::descriptor events__state_node; diff --git a/ircd/m/dbs.cc b/ircd/m/dbs.cc index 5da265274..7e9ec6b97 100644 --- a/ircd/m/dbs.cc +++ b/ircd/m/dbs.cc @@ -580,6 +580,13 @@ ircd::m::dbs::desc::events__event_idx__block__size { "default", 512L }, }; +decltype(ircd::m::dbs::desc::events__event_idx__meta_block__size) +ircd::m::dbs::desc::events__event_idx__meta_block__size +{ + { "name", "ircd.m.dbs.events._event_idx.meta_block.size" }, + { "default", 512L }, +}; + decltype(ircd::m::dbs::desc::events__event_idx__cache__size) ircd::m::dbs::desc::events__event_idx__cache__size { @@ -648,6 +655,9 @@ ircd::m::dbs::desc::events__event_idx // block size size_t(events__event_idx__block__size), + + // meta_block size + size_t(events__event_idx__meta_block__size), }; decltype(ircd::m::dbs::desc::events__event_bad__cache__size) @@ -738,6 +748,13 @@ ircd::m::dbs::desc::events__room_head__block__size { "default", 512L }, }; +decltype(ircd::m::dbs::desc::events__room_head__meta_block__size) +ircd::m::dbs::desc::events__room_head__meta_block__size +{ + { "name", "ircd.m.dbs.events._room_head.meta_block.size" }, + { "default", 512L }, +}; + decltype(ircd::m::dbs::desc::events__room_head__cache__size) ircd::m::dbs::desc::events__room_head__cache__size { @@ -849,6 +866,9 @@ ircd::m::dbs::desc::events__room_head // block size size_t(events__room_head__block__size), + + // meta_block size + size_t(events__room_head__meta_block__size), }; // @@ -859,7 +879,14 @@ decltype(ircd::m::dbs::desc::events__room_events__block__size) ircd::m::dbs::desc::events__room_events__block__size { { "name", "ircd.m.dbs.events._room_events.block.size" }, - { "default", 8192L }, + { "default", 4096L }, +}; + +decltype(ircd::m::dbs::desc::events__room_events__meta_block__size) +ircd::m::dbs::desc::events__room_events__meta_block__size +{ + { "name", "ircd.m.dbs.events._room_events.meta_block.size" }, + { "default", 4096L }, }; decltype(ircd::m::dbs::desc::events__room_events__cache__size) @@ -1112,6 +1139,9 @@ ircd::m::dbs::desc::events__room_events // block size size_t(events__room_events__block__size), + + // meta_block size + size_t(events__room_events__meta_block__size), }; // @@ -1125,6 +1155,13 @@ ircd::m::dbs::desc::events__room_joined__block__size { "default", 4096L }, }; +decltype(ircd::m::dbs::desc::events__room_joined__meta_block__size) +ircd::m::dbs::desc::events__room_joined__meta_block__size +{ + { "name", "ircd.m.dbs.events._room_joined.meta_block.size" }, + { "default", 4096L }, +}; + decltype(ircd::m::dbs::desc::events__room_joined__cache__size) ircd::m::dbs::desc::events__room_joined__cache__size { @@ -1259,6 +1296,9 @@ ircd::m::dbs::desc::events__room_joined // block size size_t(events__room_joined__block__size), + + // meta_block size + size_t(events__room_joined__meta_block__size), }; // @@ -1269,7 +1309,14 @@ decltype(ircd::m::dbs::desc::events__room_state__block__size) ircd::m::dbs::desc::events__room_state__block__size { { "name", "ircd.m.dbs.events._room_state.block.size" }, - { "default", 8192L }, + { "default", 512L }, +}; + +decltype(ircd::m::dbs::desc::events__room_state__meta_block__size) +ircd::m::dbs::desc::events__room_state__meta_block__size +{ + { "name", "ircd.m.dbs.events._room_state.meta_block.size" }, + { "default", 512L }, }; decltype(ircd::m::dbs::desc::events__room_state__cache__size) @@ -1404,6 +1451,9 @@ ircd::m::dbs::desc::events__room_state // block size size_t(events__room_state__block__size), + + // meta_block size + size_t(events__room_state__meta_block__size), }; // @@ -1417,6 +1467,13 @@ ircd::m::dbs::desc::events__state_node__block__size { "default", 512L }, }; +decltype(ircd::m::dbs::desc::events__state_node__meta_block__size) +ircd::m::dbs::desc::events__state_node__meta_block__size +{ + { "name", "ircd.m.dbs.events._state_node.meta_block.size" }, + { "default", 1024L }, +}; + decltype(ircd::m::dbs::desc::events__state_node__cache__size) ircd::m::dbs::desc::events__state_node__cache__size { @@ -1486,6 +1543,9 @@ ircd::m::dbs::desc::events__state_node // block size size_t(events__state_node__block__size), + + // meta_block size + size_t(events__state_node__meta_block__size), }; //