Skip to content

Remove upload on page fault "optimization" #16485

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions ydb/core/tx/datashard/local_kmeans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ class TLocalKMeansScanBase: public TActor<TLocalKMeansScanBase>, public NTable::
EScan PageFault() final
{
LOG_T("PageFault " << Debug());

if (!ReadBuf.IsEmpty() && WriteBuf.IsEmpty()) {
ReadBuf.FlushTo(WriteBuf);
Upload(false);
}

return EScan::Feed;
}

Expand Down
10 changes: 3 additions & 7 deletions ydb/core/tx/datashard/prefix_kmeans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,18 +225,12 @@ class TPrefixKMeansScanBase: public TActor<TPrefixKMeansScanBase>, public NTable
<< " K: " << K << " Clusters: " << Clusters.size()
<< " State: " << State << " Round: " << Round << " / " << MaxRounds
<< " LevelBuf size: " << LevelBuf.Size() << " PostingBuf size: " << PostingBuf.Size() << " PrefixBuf size: " << PrefixBuf.Size()
<< " UploadTable: " << UploadTable << " UploadBuf size: " << UploadBuf.Size();
<< " UploadTable: " << UploadTable << " UploadBuf size: " << UploadBuf.Size() << " RetryCount: " << RetryCount;
}

EScan PageFault() final
{
LOG_T("PageFault " << Debug());

UploadInProgress()
|| TryUpload(LevelBuf, LevelTable, LevelTypes, false)
|| TryUpload(PostingBuf, PostingTable, PostingTypes, false)
|| TryUpload(PrefixBuf, PrefixTable, PrefixTypes, false);

return EScan::Feed;
}

Expand Down Expand Up @@ -328,6 +322,8 @@ class TPrefixKMeansScanBase: public TActor<TPrefixKMeansScanBase>, public NTable

void UploadImpl()
{
LOG_D("Uploading " << Debug());

Y_ASSERT(!UploadBuf.IsEmpty());
Y_ASSERT(!Uploader);
auto actor = NTxProxy::CreateUploadRowsInternal(
Expand Down
6 changes: 0 additions & 6 deletions ydb/core/tx/datashard/reshuffle_kmeans.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,12 +178,6 @@ class TReshuffleKMeansScanBase: public TActor<TReshuffleKMeansScanBase>, public
EScan PageFault() final
{
LOG_T("PageFault " << Debug());

if (!ReadBuf.IsEmpty() && WriteBuf.IsEmpty()) {
ReadBuf.FlushTo(WriteBuf);
Upload(false);
}

return EScan::Feed;
}

Expand Down
Loading