Skip to content

Conversation

@ijon
Copy link
Collaborator

@ijon ijon commented Oct 23, 2025

Cherry-pick:

Replace calls to PathShardsLimit() and ShardsLimit() with equivalent code.

PathShardsLimit() performs pedantic validation of the path's current shards count by recalculating it through iteration over ShardInfos of the entire database and matching them to the path (!). See CollectAllShards(). That is unreasonable and too slow for the hot spot that is PersistSingleStats(). (Though appropriate for slow paths like TSubOperation::Propose() etc.)

Replacing PathShardsLimit() also eliminates additional TPath construction and hashmap lookup.

PathShardsLimit() performs pedantic validation of the path's current shards
count by recalculating it through iteration over ShardInfos of the entire
database and matching them to the path (!). See CollectAllShards().
That is unreasonable and too slow for the hot spot that is PersistSingleStats().
(Though appropriate for slow paths like TSubOperation::Propose() etc.)

Replacing PathShardsLimit() also eliminates aditional TPath construction
and hashmap lookup.
@github-actions
Copy link

github-actions bot commented Oct 23, 2025

2025-10-23 14:51:57 UTC Pre-commit check linux-x86_64-release-asan for af3959d has started.
2025-10-23 14:52:13 UTC Artifacts will be uploaded here
2025-10-23 14:55:13 UTC ya make is running...
🟡 2025-10-23 16:16:52 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
12807 12581 0 74 113 39

2025-10-23 16:18:12 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-10-23 16:47:42 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
284 (only retried tests) 245 0 1 6 32

2025-10-23 16:47:51 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-10-23 17:16:24 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?
64 (only retried tests) 25 0 1 6 32

🟢 2025-10-23 17:16:31 UTC Build successful.
🟢 2025-10-23 17:16:55 UTC ydbd size 3.8 GiB changed* by +2.7 KiB, which is < 100.0 KiB vs stable-25-1-4: OK

ydbd size dash stable-25-1-4: 5b25abe merge: af3959d diff diff %
ydbd size 4 043 714 432 Bytes 4 043 717 224 Bytes +2.7 KiB +0.000%
ydbd stripped size 1 407 719 992 Bytes 1 407 720 696 Bytes +704 Bytes +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 Oct 23, 2025

2025-10-23 14:51:57 UTC Pre-commit check linux-x86_64-relwithdebinfo for af3959d has started.
2025-10-23 14:52:12 UTC Artifacts will be uploaded here
2025-10-23 14:55:08 UTC ya make is running...
🟡 2025-10-23 16:05:57 UTC Some tests failed, follow the links below. Going to retry failed tests...

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
26975 25679 0 6 1239 51

2025-10-23 16:08:20 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-10-23 16:33:51 UTC Some tests failed, follow the links below. Going to retry failed tests...

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
114 (only retried tests) 66 0 1 5 42

2025-10-23 16:34:00 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-10-23 16:58:43 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
77 (only retried tests) 34 0 1 5 37

🟢 2025-10-23 16:58:49 UTC Build successful.
🟢 2025-10-23 16:59:08 UTC ydbd size 2.2 GiB changed* by +1.7 KiB, which is < 100.0 KiB vs stable-25-1-4: OK

ydbd size dash stable-25-1-4: 5b25abe merge: af3959d diff diff %
ydbd size 2 323 798 112 Bytes 2 323 799 888 Bytes +1.7 KiB +0.000%
ydbd stripped size 487 119 488 Bytes 487 119 808 Bytes +320 Bytes +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 Oct 23, 2025

🟢 2025-10-23 18:48:57 UTC The validation of the Pull Request description is successful.

@ijon ijon linked an issue Oct 23, 2025 that may be closed by this pull request
@ijon ijon marked this pull request as ready for review October 24, 2025 08:24
@ijon ijon requested a review from a team as a code owner October 24, 2025 08:24
@maximyurchuk maximyurchuk merged commit 8fd7be2 into ydb-platform:stable-25-1-4 Oct 24, 2025
9 of 12 checks passed
@ijon ijon deleted the merge/stable-25-1-4/schemeshard-stats-processing-opt-0 branch October 24, 2025 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants