mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-31 20:16:43 +00:00
The configuration detection is based on a loop that advances two iterators and compares the two collection for deducing the configuration change. In order to correctly deduce the changes the iteration have to be according to the key (service level name) order for both of the collections. If it doesn't happen the results are undefined and in some cases can lead to a crash of the system. The bug is that the _service_level_db field was implemented using an unordered_map which obviously don't guarantie the configuration change detection assumption. The fix was simply to change the field type to a map instead of unordered_map. Another problem is that when a static service level (i.e default) is at the end of the keys list, it is repeatedly being deleted - which doesn't really do anything since deleting a static service level is just retaining it's defult values but it is stil wrong.