Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge 'hints: use a soft disk space limit in hints commitlog' from Pi…
…otr Dulikowski A recent change to the commitlog (4082f57) caused its configurable size limit to be strictly enforced - after reaching the limit, new segments wouldn't be allocated until some of the previous segments are freed. This flow can work for the regular commitlog, however the hints commitlog does not delete the segments itself - instead, hints manager recreates its commitlog every 10 seconds, picks up segments left by the previous instance and deletes each segment manually only after all hints are sent out from a segment. Because of the non-standard flow, it is possible that the hints commitlog fills up and stops accepting more hints. Hints manager uses a relatively low limit for each commitlog instance (128MB divided by shard count), so it's not hard to fill it up. What's worse, hints manager tries to acquire file_update_mutex in exclusive mode before re-creating the commitlog, while hints waiting to be written acquire this lock in shared mode - which causes hints flushing to completely deadlock and no more hints be admitted to the commitlog. The queue of hints waiting to be admitted grows very quickly and soon all writes which could result in a hint being generated are rejected with OverloadedException. To solve this problem, it is now possible to bring back the soft disk space limit by setting a flag in commitlog's configuration. Tests: - unit(dev) - wrote hints for 15 minutes in order to see if it gets stuck again Fixes #8137 Closes #8206 * github.com:scylladb/scylla: hints_manager: don't use commitlog hard space limit commitlog: add an option to allow going over size limit
- Loading branch information