mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-06 15:03:06 +00:00
Alternator modifies tags in three operations - TagResource, UntagResource and UpdateTimeToLive (the latter uses a tag to store the TTL configuration). All three operations were implemented by three separate steps: 1. Read the current tags. 2. Modify the tags according to the desired operation. 3. Write the modified tags back with update_tags(). This implementation was not safe for concurrent operations - some modifications may be be lost. We fix this in this patch by using the new modify_tags() function introduced in the previous patch, which performs all three steps under one lock so the tag operations are serialized and correctly isolated. Fixes #6389 Signed-off-by: Nadav Har'El <nyh@scylladb.com>