mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
The schema module (everything in schema/) is supposed to be towards the leafs in the ScyllaDB inter-module dependency graph. In other words, it should not depend on many other modules. On the other hand, almost the entire codebase depends on the schema module itself. Currently there is a circular dependency between schema and replica::database, as the latter is a required argument for schema::describe(). This is bad, not just because of the dependency mess it introduces, but also because now schema::describe() can only be used by code which has a reference to the database handy. This patch breaks this circular dependency, by introducing the schema_describe_helper interface and providing an implementation for it in database.hh. There is another circular dependency: schema <-> replica::table. This is not addressed by this patch. Closes scylladb/scylladb#20893