Skip to content

Conversation

@gridnevvvit
Copy link
Member

Changelog entry

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

Copilot AI review requested due to automatic review settings November 21, 2025 12:48
@gridnevvvit gridnevvvit requested a review from a team as a code owner November 21, 2025 12:48
Copilot finished reviewing on behalf of gridnevvvit November 21, 2025 12:51
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 makes stream lookup parameters configurable and adjustable, specifically introducing two new configurable settings: MaxRowsProcessingStreamLookup and MaxTotalBytesQuotaStreamLookup. These replace the hardcoded MAX_IN_FLIGHT_LIMIT constant.

Key changes:

  • Adds two new configurable parameters for stream lookup: max rows processing and max total bytes quota
  • Removes hardcoded MAX_IN_FLIGHT_LIMIT constant and makes the limit configurable via settings
  • Adds counters to track bytes quota in flight and quota exceeded events

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ydb/core/protos/table_service_config.proto Adds new proto fields for configurable stream lookup parameters
ydb/core/kqp/runtime/kqp_stream_lookup_worker.h Updates IsOverloaded signature to accept max rows parameter
ydb/core/kqp/runtime/kqp_stream_lookup_worker.cpp Removes hardcoded limit, updates implementations to use configurable parameter
ydb/core/kqp/runtime/kqp_stream_lookup_actor.cpp Implements quota tracking logic and uses new configurable parameters
ydb/core/kqp/runtime/kqp_read_iterator_common.h Declares new settings fields and accessor functions with default values
ydb/core/kqp/runtime/kqp_read_iterator_common.cpp Implements accessor functions for new settings
ydb/core/kqp/runtime/kqp_buffer_lookup_actor.cpp Comments out assertion for overload check
ydb/core/kqp/node_service/kqp_node_service.cpp Wires configuration from proto to runtime settings
ydb/core/kqp/counters/kqp_counters.h Declares new counter pointers
ydb/core/kqp/counters/kqp_counters.cpp Initializes new counters for quota tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

optional uint32 MaxTotalRetries = 7;

optional uint64 MaxRowsProcessingStreamLookup = 9;
optional uint64 MaxTotalBytesQuotaStreamLookup = 10q;
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

Syntax error: field number has invalid suffix 'q'. The field number should be '10' not '10q'.

Suggested change
optional uint64 MaxTotalBytesQuotaStreamLookup = 10q;
optional uint64 MaxTotalBytesQuotaStreamLookup = 10;

Copilot uses AI. Check for mistakes.
Comment on lines +458 to +459
ptr->MaxRowsProcessingStreamLookup = settings.GetMaxRowsProcessingStreamLookup();
ptr->MaxTotalBytesQuotaStreamLookup = settings.GetMaxTotalBytesQuotaStreamLookup();
Copy link

Copilot AI Nov 21, 2025

Choose a reason for hiding this comment

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

Missing validation for the new settings. If these fields are not set in the proto, GetMaxRowsProcessingStreamLookup() and GetMaxTotalBytesQuotaStreamLookup() will return 0, overwriting the default values defined in TIteratorReadBackoffSettings (65536 and 2560MB respectively). Consider using conditional assignment like if (settings.HasMaxRowsProcessingStreamLookup()) similar to the pattern used for other optional settings above (lines 451-456).

Suggested change
ptr->MaxRowsProcessingStreamLookup = settings.GetMaxRowsProcessingStreamLookup();
ptr->MaxTotalBytesQuotaStreamLookup = settings.GetMaxTotalBytesQuotaStreamLookup();
if (settings.HasMaxRowsProcessingStreamLookup()) {
ptr->MaxRowsProcessingStreamLookup = settings.GetMaxRowsProcessingStreamLookup();
}
if (settings.HasMaxTotalBytesQuotaStreamLookup()) {
ptr->MaxTotalBytesQuotaStreamLookup = settings.GetMaxTotalBytesQuotaStreamLookup();
}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

🟢 2025-11-21 12:52:00 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:52:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for ed8e619 has started.
2025-11-21 12:53:00 UTC Artifacts will be uploaded here
2025-11-21 12:55:14 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:53:04 UTC Pre-commit check linux-x86_64-release-asan for ed8e619 has started.
2025-11-21 12:53:21 UTC Artifacts will be uploaded here
2025-11-21 12:55:18 UTC Check cancelled

@gridnevvvit gridnevvvit force-pushed the increase-and-make-configurable-some-slj-params branch from df333ce to 8c0ad25 Compare November 21, 2025 12:54
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:55:44 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1428c3c has started.
2025-11-21 12:55:48 UTC Artifacts will be uploaded here
2025-11-21 12:57:06 UTC ya make is running...
🔴 2025-11-21 12:59:37 UTC Build failed, see the logs. Also see fail summary

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 12:56:33 UTC Pre-commit check linux-x86_64-release-asan for 1428c3c has started.
2025-11-21 12:56:37 UTC Artifacts will be uploaded here
2025-11-21 12:58:46 UTC ya make is running...
🔴 2025-11-21 13:00:24 UTC Build failed, see the logs. Also see fail summary

nikvas0
nikvas0 previously approved these changes Nov 21, 2025
@gridnevvvit gridnevvvit force-pushed the increase-and-make-configurable-some-slj-params branch from 8c0ad25 to 0875318 Compare November 21, 2025 13:11
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 13:12:04 UTC Pre-commit check linux-x86_64-release-asan for 651e3e9 has started.
2025-11-21 13:12:46 UTC Artifacts will be uploaded here
2025-11-21 13:14:43 UTC ya make is running...
🟡 2025-11-21 15:10:04 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14226 14116 0 88 9 13

🟢 2025-11-21 15:10:14 UTC Build successful.
🟢 2025-11-21 15:10:40 UTC ydbd size 3.8 GiB changed* by +18.2 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3b818c9 merge: 651e3e9 diff diff %
ydbd size 4 109 071 536 Bytes 4 109 090 168 Bytes +18.2 KiB +0.000%
ydbd stripped size 1 527 317 648 Bytes 1 527 324 528 Bytes +6.7 KiB +0.000%

*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 Nov 21, 2025

2025-11-21 13:12:19 UTC Pre-commit check linux-x86_64-relwithdebinfo for 651e3e9 has started.
2025-11-21 13:12:50 UTC Artifacts will be uploaded here
2025-11-21 13:14:54 UTC ya make is running...
🟡 2025-11-21 15:30:45 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41478 38585 0 2 2855 36

2025-11-21 15:30:59 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-11-21 15:42:10 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
97 (only retried tests) 80 0 1 0 16

2025-11-21 15:42:18 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-11-21 15:52:04 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
34 (only retried tests) 18 0 1 0 15

🟢 2025-11-21 15:52:12 UTC Build successful.
🟢 2025-11-21 15:52:36 UTC ydbd size 2.3 GiB changed* by +12.7 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 3b818c9 merge: 651e3e9 diff diff %
ydbd size 2 454 546 808 Bytes 2 454 559 784 Bytes +12.7 KiB +0.001%
ydbd stripped size 523 090 072 Bytes 523 092 664 Bytes +2.5 KiB +0.000%

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

nikvas0
nikvas0 previously approved these changes Nov 21, 2025
@gridnevvvit gridnevvvit force-pushed the increase-and-make-configurable-some-slj-params branch 2 times, most recently from 403fd31 to a19df1c Compare November 21, 2025 16:05
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 16:07:09 UTC Pre-commit check linux-x86_64-release-asan for 08a7d60 has started.
2025-11-21 16:07:27 UTC Artifacts will be uploaded here
2025-11-21 16:09:32 UTC ya make is running...
2025-11-21 16:09:48 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 16:07:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for 08a7d60 has started.
2025-11-21 16:07:50 UTC Artifacts will be uploaded here
2025-11-21 16:09:48 UTC Check cancelled

@gridnevvvit gridnevvvit force-pushed the increase-and-make-configurable-some-slj-params branch 2 times, most recently from 2e98193 to 8250f33 Compare November 21, 2025 16:09
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

2025-11-21 16:11:18 UTC Pre-commit check linux-x86_64-relwithdebinfo for 9087f42 has started.
2025-11-21 16:11:35 UTC Artifacts will be uploaded here
2025-11-21 16:13:43 UTC ya make is running...
🟡 2025-11-21 18:24:52 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41484 38615 0 4 2836 29

2025-11-21 18:25:10 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-21 18:35:33 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
60 (only retried tests) 45 0 0 0 15

🟢 2025-11-21 18:35:40 UTC Build successful.
🟢 2025-11-21 18:36:02 UTC ydbd size 2.3 GiB changed* by +12.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 442799a merge: 9087f42 diff diff %
ydbd size 2 454 529 736 Bytes 2 454 542 808 Bytes +12.8 KiB +0.001%
ydbd stripped size 523 091 160 Bytes 523 093 816 Bytes +2.6 KiB +0.001%

*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 Nov 21, 2025

2025-11-21 16:11:23 UTC Pre-commit check linux-x86_64-release-asan for 9087f42 has started.
2025-11-21 16:11:40 UTC Artifacts will be uploaded here
2025-11-21 16:13:50 UTC ya make is running...
🟡 2025-11-21 18:14:07 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14226 14085 0 111 16 14

🟢 2025-11-21 18:14:18 UTC Build successful.
🟢 2025-11-21 18:14:44 UTC ydbd size 3.8 GiB changed* by +18.6 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 442799a merge: 9087f42 diff diff %
ydbd size 4 109 037 632 Bytes 4 109 056 672 Bytes +18.6 KiB +0.000%
ydbd stripped size 1 527 313 520 Bytes 1 527 320 656 Bytes +7.0 KiB +0.000%

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

@gridnevvvit gridnevvvit merged commit 6a893e7 into ydb-platform:main Nov 21, 2025
9 checks passed
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