mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
" There are few places left that call for migration manager by global reference. This set patches all those places and makes the migration manager a service that locally lives in main(). Surprisingly, the largest changes are to get rid of global migration manager calls from ... the migration manager itself. Two tricks here. First, repair code gets its private global migration manager pointer. That's not nice, but it aligned with current repair design -- all its references are now "global". Some day they all will be moved into sharded repair service, for now these globals just describe the real dependencies of the repair code. Second is storage proxy that needs to call migration manager to get schema. Proper layering makes migration manager sit on top of storage proxy, so the direct back-reference is not nice. To overcome this the proxy gets migration manager's shared_from_this() pointer and drops all of them on stop. This makes sure that by the time migration manager stops no references from proxy exist. tests: unit(dev), start-stop, start-drain-stop " * 'br-turn-migration-manager-local' of https://github.com/xemul/scylla: (21 commits) migration_manager: Make it main-local tests: Have own migration manager instances tests: Use migration_manager from cql_test_env migration_manager: Call maybe_sync from this migration_manager: Make get_schema_for_... methods migration_manager: Hide get_schema_definition streaming: Keep migration_manager ptr in rpc lambdas storage_proxy: Keep migration_manager ptr in rpc lambdas streaming: Get migration_manager shared_ptr in messaging storage_proxy: Get migration_manager shared_ptr in messaging migration_manager: Make maybe_sync a method migration_manager: Open-code merge lambda migration_manager: Turn do_announce_new_type non-static migration_manager: Make announce() non-static method storage_servive: Use local migration manager storage_service: Keep migration manager on board migration_manager: Use 'this' where appropriate repair: Use private migration manager pointer repair: Keep private sharded migration manager pointer redis: Carry sharded migration manager over init ...