Skip to content

Ydb topics kafka proxy add metadata commit fetch actors #17932

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nerhneiro
Copy link
Collaborator

Changelog entry

Add CommitedMetadata to OffsetFetchActor and OffsetCommitActor. Add metadata field to PQ-tablet event.

Changelog category

  • Not for changelog (changelog entry is not required)

Description for reviewers

...

Irina Skvortsova added 3 commits April 25, 2025 14:40
rename TConsumerOffset struct
add PartitionIndex field to TConsumerOffset struct to substitude std::pair in OffsetCommit function
@nerhneiro nerhneiro requested a review from a team as a code owner April 30, 2025 15:56
@nerhneiro nerhneiro requested a review from alexnick88 April 30, 2025 15:56
@nerhneiro nerhneiro requested review from a-serebryanskiy and removed request for alexnick88 April 30, 2025 15:57
Copy link

🟢 2025-04-30 15:59:24 UTC The validation of the Pull Request description is successful.

Copy link

github-actions bot commented Apr 30, 2025

2025-04-30 16:14:28 UTC Pre-commit check linux-x86_64-relwithdebinfo for 99c9117 has started.
2025-04-30 16:14:41 UTC Artifacts will be uploaded here
2025-04-30 16:17:55 UTC ya make is running...
🟡 2025-04-30 18:12: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?
29697 27006 0 5 2640 46

2025-04-30 18:14:35 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-30 18:27:43 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?
699 (only retried tests) 657 0 1 8 33

2025-04-30 18:27:54 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-04-30 18:52:12 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?
131 (only retried tests) 98 0 1 2 30

🟢 2025-04-30 18:52:21 UTC Build successful.
🟢 2025-04-30 18:52:45 UTC ydbd size 2.2 GiB changed* by +18.3 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 176cc39 merge: 99c9117 diff diff %
ydbd size 2 343 301 816 Bytes 2 343 320 528 Bytes +18.3 KiB +0.001%
ydbd stripped size 492 720 608 Bytes 492 724 224 Bytes +3.5 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

Copy link

github-actions bot commented Apr 30, 2025

2025-04-30 16:20:04 UTC Pre-commit check linux-x86_64-release-asan for 99c9117 has started.
2025-04-30 16:20:15 UTC Artifacts will be uploaded here
2025-04-30 16:23:34 UTC ya make is running...
🟡 2025-04-30 18:30:03 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?
14880 14701 0 109 47 23

2025-04-30 18:31:24 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-04-30 19:02:56 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?
947 (only retried tests) 840 0 53 33 21

2025-04-30 19:03:08 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-04-30 19:28:31 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?
829 (only retried tests) 725 0 54 27 23

🟢 2025-04-30 19:28:42 UTC Build successful.
🟡 2025-04-30 19:29:19 UTC ydbd size 3.8 GiB changed* by +128.3 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 4f1f93d merge: 99c9117 diff diff %
ydbd size 4 122 209 192 Bytes 4 122 340 616 Bytes +128.3 KiB +0.003%
ydbd stripped size 1 428 905 496 Bytes 1 428 949 080 Bytes +42.6 KiB +0.003%

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

std::unordered_map<ui32, ui32> PartitionIdToOffset {};
std::shared_ptr<std::unordered_map<ui32, std::unordered_map<TString, ui32>>> PartitionIdToOffsets = std::make_shared<std::unordered_map<ui32, std::unordered_map<TString, ui32>>>();
std::unordered_map<ui32, TEvKafka::PartitionGroupOffset> PartitionIdToOffset {};
std::shared_ptr<std::unordered_map<ui32, std::unordered_map<TString, TEvKafka::PartitionGroupOffset>>> PartitionIdToOffsets = std::make_shared<std::unordered_map<ui32, std::unordered_map<TString, TEvKafka::PartitionGroupOffset>>>();
Copy link
Collaborator

Choose a reason for hiding this comment

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

А вот тут обрати внимание: если я правильно понял, то std::unordered_map<TString, ui32> - это мепа имя консьмер группы к оффсету. Но ведь имя консьюмер группы у нас уже есть в новом объекте TConsumerOffset, верно? Тогда зачем нам его дублировать.

P.S. замечаю, что не первый раз даю комментарий по рефакторингу существующего кода. Не стесняйся плз рефакторить существующий код в будущем, если после твоих изменений он становится не актуальным.

std::shared_ptr<std::unordered_map<ui32, std::unordered_map<TString, ui32>>> PartitionIdToOffsets;

// std::shared_ptr<std::unordered_map<ui32, std::unordered_map<TString, ui32>>> PartitionIdToOffsets;
std::shared_ptr<std::unordered_map<ui32, std::unordered_map<TString, PartitionGroupOffset>>> PartitionIdToOffsets;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Здесь тоже давай подумаем, нужна ли нам до сих пор мэпа, сходу не уверен, посмотри плз и отпишись комментом, что и почему решила: оставояем мепу или переделываем на вектор с объектами.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

В методе void Reply(const TActorContext& ctx) override
в поле PartitionIdToOffsets объекта response передается PartitionIdToOffsets из класса TTopicOffsetActor. Чтобы не тратить время на изменение типа данных, удобнее хранить PartitionIdToOffsets в TEvCommitedOffsetsResponse такого же типа, как в TTopicOffsetActor.

Copy link

github-actions bot commented May 5, 2025

2025-05-05 15:49:13 UTC Pre-commit check linux-x86_64-release-asan for 3f8a1e6 has started.
2025-05-05 15:49:17 UTC Artifacts will be uploaded here
2025-05-05 15:52:25 UTC ya make is running...
🟡 2025-05-05 17:52:59 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?
14887 14764 0 66 30 27

2025-05-05 17:54:12 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-05 18:22:15 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?
901 (only retried tests) 805 0 43 25 28

2025-05-05 18:22:28 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-05 18:49:44 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?
732 (only retried tests) 634 0 42 29 27

🟢 2025-05-05 18:49:56 UTC Build successful.
🟢 2025-05-05 18:50:26 UTC ydbd size 3.8 GiB changed* by +43.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: a114ee1 merge: 3f8a1e6 diff diff %
ydbd size 4 126 695 752 Bytes 4 126 740 744 Bytes +43.9 KiB +0.001%
ydbd stripped size 1 433 278 200 Bytes 1 433 293 688 Bytes +15.1 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

Copy link

github-actions bot commented May 5, 2025

2025-05-05 15:49:34 UTC Pre-commit check linux-x86_64-relwithdebinfo for 3f8a1e6 has started.
2025-05-05 15:49:45 UTC Artifacts will be uploaded here
2025-05-05 15:53:08 UTC ya make is running...
🟡 2025-05-05 17:50:14 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?
29711 27038 0 2 2632 39

2025-05-05 17:52:39 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-05 18:28:02 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?
170 (only retried tests) 136 0 1 0 33

2025-05-05 18:28:11 UTC ya make is running... (failed tests rerun, try 3)
🟢 2025-05-05 18:52:18 UTC Tests successful.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
118 (only retried tests) 84 0 0 1 33

🟢 2025-05-05 18:52:25 UTC Build successful.
🟢 2025-05-05 18:52:48 UTC ydbd size 2.2 GiB changed* by +22.9 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: a114ee1 merge: 3f8a1e6 diff diff %
ydbd size 2 343 493 376 Bytes 2 343 516 776 Bytes +22.9 KiB +0.001%
ydbd stripped size 493 068 608 Bytes 493 071 968 Bytes +3.3 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

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