Skip to content

Commit 4fe968f

Browse files
fix race on select scan (#4216)
1 parent 05ce6f9 commit 4fe968f

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

ydb/core/testlib/common_helper.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ void THelper::StartScanRequest(const TString& request, const bool expectSuccess,
6060
});
6161
const TInstant start = TInstant::Now();
6262
while (!resultReady && start + TDuration::Seconds(60) > TInstant::Now()) {
63+
Cerr << "START_SLEEP" << Endl;
6364
Server.GetRuntime()->SimulateSleep(TDuration::Seconds(1));
65+
Cerr << "FINISHED_SLEEP" << Endl;
6466
if (scanIterator && !resultReady) {
6567
scanIterator->ReadNext().Subscribe([&](NThreading::TFuture<NYdb::NTable::TScanQueryPart> streamPartFuture) {
6668
NYdb::NTable::TScanQueryPart streamPart = streamPartFuture.GetValueSync();

ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/interval.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ void TFetchingInterval::OnInitResourcesGuard(const std::shared_ptr<NResourceBrok
2424
AFL_VERIFY(guard);
2525
AFL_VERIFY(!ResourcesGuard);
2626
ResourcesGuard = guard;
27-
AFL_VERIFY(ReadyGuards.Inc() <= 1);
2827
for (auto&& i : Sources) {
2928
i.second->OnInitResourcesGuard(i.second);
3029
}
30+
AFL_VERIFY(ReadyGuards.Inc() <= 1);
3131
ConstructResult();
3232
}
3333

0 commit comments

Comments
 (0)