mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-28 20:27:03 +00:00
This series gets rid of the global batchlog_manager instance. It does so by first, allowing to set a global pointer and instatiating stack-local instances in main and cql_test_env. Expose the cql_test_env batchlog_manager to tests so they won't need the global `get_batchlog_manager()` as used in batchlog_manager_test.test_execute_batch. Then we pass a reference to the `sharded<db::batchlog_manager>` to storage_service so it can be used instead of the global one. Derive batchlog_manager from peering_sharded_service so it get its `container()` rather than relying on the global `get_batchlog_manager()`. And finally, handle a circular dependency between the batchlog_manager, that relies on the query_processor that, in turn, relies on the storage_proxy, and the the storage_proxy itself that depends on the batchlog_manager for `mutate_atomically`. Moved `endpoint_filter` to gossiper so `storage_proxy::mutate_atomically` can call it via the `_gossiper` member it already has. The function requires a gossiper object rather than a batchlog_manager object. Also moved `get_batch_log_mutation_for` to storage_proxy so it can be called from `sync_write_to_batchlog` (also from the mutate_atomically path) Test: unit(dev) DTest: batch_test.py:TestBatch.test_batchlog_manager_issue(dev) * git@github.com:bhalevy/scylla.git deglobalize-batchlog_manager-v2 get rid of the global batchlog_manager batchlog_manager: get_batch_log_mutation_for: move to storage_proxy batchlog_manager: endpoint_filter: move to gossiper batchlog_manager: do_batch_log_replay: use lambda coroutine batchlog_manager: derive from peering_sharded_service storage_service: keep a reference to the batchlog_manager test: cql_test_env: expose batchlog_manager main: allow setting the global batchlog_manager