diff options
author | Maxim Kovalev <maxkovalev@ydb.tech> | 2024-08-08 16:26:15 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-08 13:26:15 +0000 |
commit | f7c4264a7287d30f19fc67ebcf41907f1e9fa01d (patch) | |
tree | 542040728098932a38dee3383ae4682743706d71 | |
parent | 0333af70a8292f8f1cba2d6b41770665dbf96857 (diff) | |
download | ydb-f7c4264a7287d30f19fc67ebcf41907f1e9fa01d.tar.gz |
YQL: Release lock after fork (#7557)
-rw-r--r-- | ydb/library/yql/core/file_storage/storage.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ydb/library/yql/core/file_storage/storage.cpp b/ydb/library/yql/core/file_storage/storage.cpp index 647ab04636..242f40c76f 100644 --- a/ydb/library/yql/core/file_storage/storage.cpp +++ b/ydb/library/yql/core/file_storage/storage.cpp @@ -17,8 +17,9 @@ #include <util/system/fs.h> #include <util/system/maxlen.h> #include <util/system/mutex.h> -#include <util/system/utime.h> +#include <util/system/spinlock.h> #include <util/system/thread.h> +#include <util/system/utime.h> #include <functional> #include <atomic> @@ -434,6 +435,7 @@ private: } void ResetAtFork() { + RndLock.Release(); with_lock(RndLock) { Rnd.ResetSeed(); } @@ -452,7 +454,7 @@ private: std::atomic<i64> CurrentFiles = 0; std::atomic<i64> CurrentSize = 0; std::atomic_bool Dirty; - TMutex RndLock; + TSpinLock RndLock; TRandGuid Rnd; }; |