Skip to content

Commit a2a4ddb

Browse files
authored
Fix race between callback and destructor (#1745)
1 parent f024d8d commit a2a4ddb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ydb/core/wrappers/s3_storage.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@ class TS3ExternalStorage: public IExternalStorageOperator, TS3User {
6767
Y_DEFER {
6868
std::unique_lock guard(RunningQueriesMutex);
6969
--RunningQueriesCount;
70-
bool needNotify = (RunningQueriesCount == 0);
71-
guard.unlock();
72-
if (needNotify) {
70+
if (RunningQueriesCount == 0) {
7371
RunningQueriesNotifier.notify_all();
7472
}
7573
};

0 commit comments

Comments
 (0)