@@ -158,12 +158,11 @@ setup_topo_txncache( fd_topo_t * topo,
158158}
159159
160160void
161- setup_topo_vinyl ( fd_topo_t * topo ,
162- fd_configf_t * config ) {
163- (void )config ;
164- fd_topob_wksp ( topo , "vinyl" );
161+ setup_topo_vinyl_meta ( fd_topo_t * topo ,
162+ fd_configf_t * config ) {
163+ fd_topob_wksp ( topo , "vinyl_meta" );
165164
166- fd_topo_obj_t * map_obj = fd_topob_obj ( topo , "vinyl_meta" , "vinyl " );
165+ fd_topo_obj_t * map_obj = fd_topob_obj ( topo , "vinyl_meta" , "vinyl_meta " );
167166 ulong const meta_max = fd_ulong_pow2_up ( config -> vinyl .max_account_records );
168167 ulong const lock_cnt = fd_vinyl_meta_lock_cnt_est ( meta_max );
169168 ulong const probe_max = fd_vinyl_meta_probe_max_est ( meta_max );
@@ -172,13 +171,24 @@ setup_topo_vinyl( fd_topo_t * topo,
172171 fd_pod_insertf_ulong ( topo -> props , probe_max , "obj.%lu.probe_max" , map_obj -> id );
173172 fd_pod_insertf_ulong ( topo -> props , (ulong )fd_tickcount (), "obj.%lu.seed" , map_obj -> id );
174173
175- fd_topo_obj_t * meta_pool_obj = fd_topob_obj ( topo , "vinyl_meta_e" , "vinyl " );
174+ fd_topo_obj_t * meta_pool_obj = fd_topob_obj ( topo , "vinyl_meta_e" , "vinyl_meta " );
176175 fd_pod_insertf_ulong ( topo -> props , meta_max , "obj.%lu.cnt" , meta_pool_obj -> id );
177176
178177 fd_pod_insert_ulong ( topo -> props , "vinyl.meta_map" , map_obj -> id );
179178 fd_pod_insert_ulong ( topo -> props , "vinyl.meta_pool" , meta_pool_obj -> id );
180179}
181180
181+ fd_topo_obj_t *
182+ setup_topo_vinyl_cache ( fd_topo_t * topo ,
183+ fd_configf_t * config ) {
184+ fd_topob_wksp ( topo , "vinyl_data" );
185+ fd_topo_obj_t * line_obj = fd_topob_obj ( topo , "vinyl_data" , "vinyl_data" );
186+ ulong const heap_max = config -> vinyl .cache_size_gib <<30 ;
187+ fd_pod_insertf_ulong ( topo -> props , heap_max , "obj.%lu.data_sz" , line_obj -> id );
188+ fd_pod_insert_ulong ( topo -> props , "vinyl.data" , line_obj -> id );
189+ return line_obj ;
190+ }
191+
182192static int
183193resolve_address ( char const * address ,
184194 uint * ip_addr ) {
@@ -363,17 +373,13 @@ fd_topo_initialize( config_t * config ) {
363373 fd_topob_wksp ( topo , "snapld" );
364374 fd_topob_wksp ( topo , "snapdc" );
365375 fd_topob_wksp ( topo , "snapin" );
366- if ( vinyl_enabled ) {
367- fd_topob_wksp ( topo , "snapwr" );
368- }
376+ if ( vinyl_enabled ) fd_topob_wksp ( topo , "snapwr" );
369377
370378 fd_topob_wksp ( topo , "snapct_ld" );
371379 fd_topob_wksp ( topo , "snapld_dc" );
372380 fd_topob_wksp ( topo , "snapdc_in" );
373381 fd_topob_wksp ( topo , "snapin_ct" );
374- if ( vinyl_enabled ) {
375- fd_topob_wksp ( topo , "snapin_wr" );
376- }
382+ if ( vinyl_enabled ) fd_topob_wksp ( topo , "snapin_wr" );
377383
378384 if ( FD_LIKELY ( config -> tiles .gui .enabled ) ) fd_topob_wksp ( topo , "snapct_gui" );
379385 if ( FD_LIKELY ( config -> tiles .gui .enabled ) ) fd_topob_wksp ( topo , "snapin_gui" );
0 commit comments