Skip to content

Conversation

@gridnevvvit
Copy link
Member

Changelog entry

fix stream lookup square and add simple overload checker

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

@gridnevvvit gridnevvvit requested a review from a team as a code owner May 27, 2025 18:44
@github-actions
Copy link

github-actions bot commented May 27, 2025

2025-05-27 18:46:09 UTC Pre-commit check linux-x86_64-release-asan for ea9b886 has started.
2025-05-27 18:46:21 UTC Artifacts will be uploaded here
2025-05-27 18:49:20 UTC ya make is running...
🟡 2025-05-27 20:23:01 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13484 13199 0 228 37 20

2025-05-27 20:24:10 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-27 20:52:59 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1645 (only retried tests) 1524 0 93 11 17

2025-05-27 20:53:17 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-27 21:22:27 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1142 (only retried tests) 1028 0 88 8 18

🟢 2025-05-27 21:22:39 UTC Build successful.
🔴 2025-05-27 21:23:08 UTC ydbd size 3.9 GiB changed* by +2.7 MiB, which is >= 2.0 MiB vs main: Alert

ydbd size dash main: d617cc1 merge: ea9b886 diff diff %
ydbd size 4 147 273 176 Bytes 4 150 119 664 Bytes +2.7 MiB +0.069%
ydbd stripped size 1 440 065 016 Bytes 1 440 798 328 Bytes +716.1 KiB +0.051%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 27, 2025

2025-05-27 18:46:09 UTC Pre-commit check linux-x86_64-relwithdebinfo for ea9b886 has started.
2025-05-27 18:46:20 UTC Artifacts will be uploaded here
2025-05-27 18:49:16 UTC ya make is running...
🟡 2025-05-27 20:00:18 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
21463 20077 0 7 1339 40

2025-05-27 20:02:07 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-05-27 20:36:10 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
161 (only retried tests) 119 0 0 10 32

🟢 2025-05-27 20:36:17 UTC Build successful.
🟡 2025-05-27 20:36:36 UTC ydbd size 2.2 GiB changed* by +1.3 MiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: d617cc1 merge: ea9b886 diff diff %
ydbd size 2 358 248 400 Bytes 2 359 654 552 Bytes +1.3 MiB +0.060%
ydbd stripped size 495 390 920 Bytes 495 633 448 Bytes +236.8 KiB +0.049%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

🟢 2025-05-27 18:56:32 UTC The validation of the Pull Request description is successful.

@gridnevvvit gridnevvvit requested a review from Copilot May 27, 2025 20:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the stream lookup behavior and adds a simple overload checker to improve request handling and retry logic.

  • Introduces a new overloaded method IsOverloaded() in the worker interface and implements it differently for lookup and join rows.
  • Replaces local size limit flags with the member SizeLimitExceeded flag in result statistics.
  • Updates the shard retry and reads management in the stream lookup actor to use a unified TReads container.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
ydb/core/kqp/runtime/kqp_stream_lookup_worker.h Added a SizeLimitExceeded flag and a new virtual IsOverloaded() method.
ydb/core/kqp/runtime/kqp_stream_lookup_worker.cpp Updated loop logic to use the SizeLimitExceeded flag and implemented IsOverloaded() for lookup and join rows.
ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp Refactored shard-read management, adjusted retry handling, and updated fetch input rows logic to use LastFetchStatus and the new TReads container.
Comments suppressed due to low confidence (1)

ydb/core/kqp/runtime/kqp_stream_lookup_worker.cpp:291

  • [nitpick] Consider adding a comment to clarify why IsOverloaded() always returns false in the TKqpLookupRows implementation, to aid future maintainability.
bool IsOverloaded() final { return false; }

NUdf::EFetchStatus status;
NUdf::TUnboxedValue row;
while ((status = Input.Fetch(row)) == NUdf::EFetchStatus::Ok) {
while ((LastFetchStatus = Input.Fetch(row)) == NUdf::EFetchStatus::Ok) {
Copy link

Copilot AI May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider updating the documentation or comments for FetchInputRows to reflect its revised behavior of setting LastFetchStatus instead of returning a fetch status.

Copilot uses AI. Check for mistakes.
@gridnevvvit gridnevvvit merged commit 869ee2f into ydb-platform:main May 28, 2025
14 checks passed
xyliganSereja pushed a commit to xyliganSereja/ydb_work that referenced this pull request Jun 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants