mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-25 11:00:35 +00:00
load_truncation_times() now works only for schema tables since the rest is not loaded until distributed_loader::init_non_system_keyspaces. An attempt to call cf.set_truncation_time for non-system table just throws an exception, which is caught and logged with debug level. This means that the call cf.get_truncation_time in paxos_state.cc has never worked as expected. To fix that we move load_truncation_times() closer to the point where the tables are loaded. The function distributed_loader::populate_keyspace is called for both system and non-system tables. Once the tables are loaded, we use the 'truncated' table to initialize _truncated_at field for them. The truncation_time check for schema tables is also moved into populate_keyspace since is seems like a more natural place for it.
3.7 KiB
3.7 KiB