mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-24 10:30:38 +00:00
" There's a static global sharded<local_cache> variable in system keyspace the keeps several bits on board that other subsystems need to get from the system keyspace, but what to have it in future<>-less manner. Some time ago the system_keyspace became a classical sharded<> service that references the qctx and the local cache. This set removes the global cache variable and makes its instances be unique_ptr's sitting on the system keyspace instances. The biggest obstacle on this route is the local_host_id that was cached, but at some point was copied onto db::config to simplify getting the value from sstables manager (there's no system keyspace at hand there at all). So the first thing this set does is removes the cached host_id and makes all the users get it from the db::config. (There's a BUG with config copy of host id -- replace node doesn't update it. This set also fixes this place) De-globalizing the cache is the prerequisite for untangling the snitch- -messaging-gossiper-system_keyspace knot. Currently cache is initialized too late -- when main calls system_keyspace.start() on all shards -- but before this time messaging should already have access to it to store its preferred IP mappings. tests: unit(dev), dtest.simple_boot_shutdown(dev) " * 'br-trade-local-hostid-for-global-cache' of https://github.com/xemul/scylla: system_keyspace: Make set_local_host_id non-static system_keyspace: Make load_local_host_id non-static system_keyspace: Remove global cache instance system_keyspace: Make it peering service system_keyspace,snitch: Make load_dc_rack_info non-static system_keyspace,cdc,storage_service: Make bootstrap manipulations non-static system_keyspace: Coroutinize set_bootstrap_state gossiper: Add system keyspace dependency cdc_generation_service: Add system keyspace dependency system_keyspace: Remove local host id from local cache storage_service: Update config.host_id on replace storage_service: Indentation fix after previous patch storage_service: Coroutinize prepare_replacement_info() system_distributed_keyspace: Indentation fix after previous patch code,system_keyspace: Relax system_keyspace::load_local_host_id() usage code,system_keyspace: Remove system_keyspace::get_local_host_id()