Skip to content

Commit

Permalink
Fix race between callback and destructor (ydb-platform#1745) (ydb-pla…
Browse files Browse the repository at this point in the history
…tform#4224)

Co-authored-by: DimasKovas <[email protected]>
  • Loading branch information
azevaykin and DimasKovas authored May 2, 2024
1 parent 994b7a3 commit 5097c74
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ydb/core/wrappers/s3_storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,7 @@ class TS3ExternalStorage: public IExternalStorageOperator, TS3User {
Y_DEFER {
std::unique_lock guard(RunningQueriesMutex);
--RunningQueriesCount;
bool needNotify = (RunningQueriesCount == 0);
guard.unlock();
if (needNotify) {
if (RunningQueriesCount == 0) {
RunningQueriesNotifier.notify_all();
}
};
Expand Down

0 comments on commit 5097c74

Please sign in to comment.