mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
This field on the null shard is properly initialized in maybe_init_schema_commitlog function, until then we can't make decisions based on its value. This problem can happen e.g. if add_column_family function is called with readonly=false before maybe_init_schema_commitlog. It will call commitlog_for to pass the commitlog to mark_ready_for_writes and commitlog_for reads _uses_schema_commitlog. In this commit we add protection against this case - we trigger internal_error if _uses_schema_commitlog is read before it is initialized. maybe_init_schema_commitlog() was added to cql_test_env to make boost tests work with the new invariant.