Skip to content

Support PG types in schemeshard #11023

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 2 commits into from
Nov 1, 2024
Merged

Conversation

lex007in
Copy link
Collaborator

Changelog entry

  • Add test for shard splitting by PG key
  • Support PG types for PartitionKeySchema in PQ

Changelog category

  • Improvement

Additional information

...

Copy link

github-actions bot commented Oct 29, 2024

2024-10-29 00:46:20 UTC Pre-commit check linux-x86_64-relwithdebinfo for 19091b7 has started.
2024-10-29 00:46:33 UTC Artifacts will be uploaded here
2024-10-29 00:49:32 UTC ya make is running...
🟡 2024-10-29 01:36:08 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?
15283 13790 0 2 1394 97

2024-10-29 01:37:23 UTC ya make is running... (failed tests rerun, try 2)
🟢 2024-10-29 01:52:29 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
98 (only retried tests) 4 0 0 0 94

🟢 2024-10-29 01:52:35 UTC Build successful.
🟢 2024-10-29 01:52:54 UTC ydbd size 2.8 GiB changed* by +2.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6dc162f merge: 19091b7 diff diff %
ydbd size 3 033 915 608 Bytes 3 033 917 688 Bytes +2.0 KiB +0.000%
ydbd stripped size 480 681 240 Bytes 480 681 432 Bytes +192 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

Copy link

github-actions bot commented Oct 29, 2024

2024-10-29 00:46:56 UTC Pre-commit check linux-x86_64-release-asan for 19091b7 has started.
2024-10-29 00:47:07 UTC Artifacts will be uploaded here
2024-10-29 00:50:14 UTC ya make is running...
🟡 2024-10-29 01:59:25 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9463 9301 0 46 18 98

🟢 2024-10-29 02:00:14 UTC Build successful.
🟢 2024-10-29 02:00:47 UTC ydbd size 5.7 GiB changed* by +3.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 6dc162f merge: 19091b7 diff diff %
ydbd size 6 139 711 144 Bytes 6 139 715 120 Bytes +3.9 KiB +0.000%
ydbd stripped size 1 532 097 904 Bytes 1 532 098 224 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

@lex007in lex007in marked this pull request as ready for review October 29, 2024 10:47
@lex007in lex007in self-assigned this Oct 29, 2024
@@ -6,7 +6,6 @@ namespace NKikimr {
namespace NSchemeShard {

static bool IsIntegerType(NScheme::TTypeInfo type) {
// TODO: support pg types
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Generic not-only-integer realization is enough. Tested in SplitShardsWhithPgKey test.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Its enough to work but not enough to work well.
Below in the same file IsIntegerType() is used to choose between fast and slow branches for split prefix search. And failing to support integer pg types as integer forces ChooseSplitKeyByHistogram() to choose the slow pass.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, support for this optimization requires the ability to increment a value of integer pg type which is not currently supported. I'll do it in separate issue: #11168

@lex007in lex007in requested review from azevaykin and ijon October 29, 2024 11:39
azevaykin
azevaykin previously approved these changes Oct 29, 2024
MinPartitionsCount: 100
MaxPartitionsCount: 100
SizeToSplit: 1
FastSplitSettings {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use of FastSplitSettings was removed from split-merge code quite some time ago. So it is meaningless to specify them in tests.

There are still some not updated tests (and they surprisingly continue to work ok), but new tests should not employ FastSplitSettings.

@@ -6,7 +6,6 @@ namespace NKikimr {
namespace NSchemeShard {

static bool IsIntegerType(NScheme::TTypeInfo type) {
// TODO: support pg types
Copy link
Collaborator

Choose a reason for hiding this comment

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

Its enough to work but not enough to work well.
Below in the same file IsIntegerType() is used to choose between fast and slow branches for split prefix search. And failing to support integer pg types as integer forces ChooseSplitKeyByHistogram() to choose the slow pass.

Copy link

github-actions bot commented Oct 31, 2024

2024-10-31 17:57:55 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5371d18 has started.
2024-10-31 17:58:06 UTC Artifacts will be uploaded here
2024-10-31 18:01:09 UTC ya make is running...
🟡 2024-10-31 18:47:20 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?
15305 13793 0 3 1414 95

2024-10-31 18:48:37 UTC ya make is running... (failed tests rerun, try 2)
🟢 2024-10-31 18:59:45 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
107 (only retried tests) 17 0 0 0 90

🟢 2024-10-31 18:59:52 UTC Build successful.
🟢 2024-10-31 19:00:11 UTC ydbd size 2.8 GiB changed* by +2.0 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: e13dea6 merge: 5371d18 diff diff %
ydbd size 3 039 578 712 Bytes 3 039 580 744 Bytes +2.0 KiB +0.000%
ydbd stripped size 481 371 640 Bytes 481 371 768 Bytes +128 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

Copy link

github-actions bot commented Oct 31, 2024

2024-10-31 17:58:06 UTC Pre-commit check linux-x86_64-release-asan for 5371d18 has started.
2024-10-31 17:58:18 UTC Artifacts will be uploaded here
2024-10-31 18:01:16 UTC ya make is running...
🟡 2024-10-31 19:08:59 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
9237 9170 0 24 9 34

🟢 2024-10-31 19:09:47 UTC Build successful.
🟢 2024-10-31 19:10:21 UTC ydbd size 5.7 GiB changed* by +3.8 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: e13dea6 merge: 5371d18 diff diff %
ydbd size 6 150 453 848 Bytes 6 150 457 760 Bytes +3.8 KiB +0.000%
ydbd stripped size 1 534 572 528 Bytes 1 534 572 784 Bytes +256 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

@lex007in lex007in requested a review from ijon October 31, 2024 18:10
@lex007in lex007in merged commit 220a657 into ydb-platform:main Nov 1, 2024
10 checks passed
@lex007in lex007in deleted the pg_schemeshard branch November 1, 2024 17:46
azevaykin pushed a commit to azevaykin/ydb that referenced this pull request Feb 7, 2025
azevaykin pushed a commit to azevaykin/ydb that referenced this pull request Feb 7, 2025
azevaykin added a commit that referenced this pull request Feb 7, 2025
Co-authored-by: Ivan Nikolaev <ivannik@ydb.tech>
azevaykin added a commit that referenced this pull request Feb 7, 2025
Co-authored-by: Ivan Nikolaev <ivannik@ydb.tech>
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.

3 participants