Skip to content

Commit 8357e1c

Browse files
fix reading logic in case memory control (#11768)
1 parent 509152a commit 8357e1c

File tree

1 file changed

+10
-1
lines changed
  • ydb/core/tx/columnshard/engines/reader/plain_reader/iterator

1 file changed

+10
-1
lines changed

ydb/core/tx/columnshard/engines/reader/plain_reader/iterator/source.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class IDataSource {
7575
virtual bool DoStartFetchingAccessor(const std::shared_ptr<IDataSource>& sourcePtr, const TFetchingScriptCursor& step) = 0;
7676

7777
public:
78+
virtual bool NeedAccessorsForRead() const = 0;
7879
virtual bool NeedAccessorsFetching() const = 0;
7980

8081
bool StartFetchingAccessor(const std::shared_ptr<IDataSource>& sourcePtr, const TFetchingScriptCursor& step) {
@@ -110,7 +111,7 @@ class IDataSource {
110111
void SetSourceInMemory(const bool value) {
111112
AFL_VERIFY(!IsSourceInMemoryFlag);
112113
IsSourceInMemoryFlag = value;
113-
if (NeedAccessorsFetching()) {
114+
if (NeedAccessorsForRead()) {
114115
AFL_VERIFY(StageData);
115116
if (!value) {
116117
StageData->SetUseFilter(value);
@@ -317,6 +318,10 @@ class TPortionDataSource: public IDataSource {
317318
virtual bool DoStartFetchingAccessor(const std::shared_ptr<IDataSource>& sourcePtr, const TFetchingScriptCursor& step) override;
318319

319320
public:
321+
virtual bool NeedAccessorsForRead() const override {
322+
return true;
323+
}
324+
320325
virtual bool NeedAccessorsFetching() const override {
321326
return !StageData || !StageData->HasPortionAccessor();
322327
}
@@ -425,6 +430,10 @@ class TCommittedDataSource: public IDataSource {
425430
}
426431

427432
public:
433+
virtual bool NeedAccessorsForRead() const override {
434+
return false;
435+
}
436+
428437
virtual bool NeedAccessorsFetching() const override {
429438
return false;
430439
}

0 commit comments

Comments
 (0)