mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-09 00:13:31 +00:00
reader_permit: signal leaked resources
When destroying a permit with leaked resources we call `on_internal_error_noexcept()` in the destructor. This method logs an error or asserts depending on the configuration. When not asserting, we need to return the leaked units to the semaphore, otherwise they will be leaked for good. We can do this because we know exactly how many resources the user of the permit leaked (never signalled).
This commit is contained in:
@@ -101,6 +101,7 @@ public:
|
||||
_op_name_view,
|
||||
_resources.count,
|
||||
_resources.memory));
|
||||
signal(_resources);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user