Skip to content

Conversation

@nshestakov
Copy link
Collaborator

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 10, 2025 19:08
@nshestakov nshestakov requested a review from a team as a code owner November 10, 2025 19:08
@github-actions
Copy link

github-actions bot commented Nov 10, 2025

2025-11-10 19:10:59 UTC Pre-commit check linux-x86_64-relwithdebinfo for d951e66 has started.
2025-11-10 19:11:16 UTC Artifacts will be uploaded here
2025-11-10 19:13:37 UTC ya make is running...
🟡 2025-11-10 21:35:39 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
42397 39555 0 9 2798 35

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

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
75 (only retried tests) 57 0 0 1 17

🟢 2025-11-10 21:49:54 UTC Build successful.
🟡 2025-11-10 21:50:15 UTC ydbd size 2.3 GiB changed* by +321.5 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 3b1cf4e merge: d951e66 diff diff %
ydbd size 2 437 459 680 Bytes 2 437 788 944 Bytes +321.5 KiB +0.014%
ydbd stripped size 518 602 832 Bytes 518 658 960 Bytes +54.8 KiB +0.011%

*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 10, 2025

2025-11-10 19:11:04 UTC Pre-commit check linux-x86_64-release-asan for d951e66 has started.
2025-11-10 19:11:24 UTC Artifacts will be uploaded here
2025-11-10 19:13:38 UTC ya make is running...
🟡 2025-11-10 21:53:32 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?
18786 18392 0 144 217 33

🟢 2025-11-10 21:53:42 UTC Build successful.
🟡 2025-11-10 21:54:11 UTC ydbd size 3.8 GiB changed* by +494.9 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 8721579 merge: d951e66 diff diff %
ydbd size 4 080 530 648 Bytes 4 081 037 400 Bytes +494.9 KiB +0.012%
ydbd stripped size 1 514 729 768 Bytes 1 514 883 464 Bytes +150.1 KiB +0.010%

*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
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 implements a Dead Letter Queue (DLQ) policy for the MLP (Message Lock Processing) consumer, enabling messages that exceed the maximum processing attempts to be moved to a designated DLQ topic.

Key changes:

  • Added support for configurable DLQ policies (MOVE, DELETE, UNSPECIFIED) allowing different handling of messages that reach maximum processing attempts
  • Implemented TDLQMoverActor to move failed messages to a separate DLQ topic
  • Enhanced storage serialization to track DLQ state and deleted messages

Reviewed Changes

Copilot reviewed 24 out of 24 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
ydb/library/services/services.proto Added new service identifier for DLQ mover component
ydb/core/protos/pqconfig.proto Added WAL field to track messages deleted from DLQ
ydb/core/persqueue/writer/common.h Enhanced error logging with error reason details
ydb/core/persqueue/pqtablet/partition/mlp/mlp_storage.h Added DLQ policy configuration and changed message structure to ui32 fields
ydb/core/persqueue/pqtablet/partition/mlp/mlp_storage.cpp Implemented DLQ policy handling logic and message processing limits
ydb/core/persqueue/pqtablet/partition/mlp/mlp_dlq_mover.cpp New actor implementation for moving messages to DLQ topic
ydb/core/persqueue/pqtablet/partition/mlp/mlp_consumer.cpp Integrated DLQ mover into consumer workflow
ydb/core/persqueue/pqtablet/partition/mlp/mlp_storage_ut.cpp Added test coverage for DLQ policies
ydb/core/persqueue/pqtablet/partition/mlp/mlp_dlq_mover_ut.cpp New integration tests for DLQ moving functionality

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


if (!HasDataInProgress && RequireInflyMessageCount()) {
HasDataInProgress = true;
Send(TabletActorId, MakeEvHasData(SelfId(), PartitionId,Storage->GetLastOffset(), Config));
Copy link

Copilot AI Nov 10, 2025

Choose a reason for hiding this comment

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

Missing space after comma between 'PartitionId' and 'Storage->GetLastOffset()'. Should be PartitionId, Storage->GetLastOffset() for consistent formatting.

Suggested change
Send(TabletActorId, MakeEvHasData(SelfId(), PartitionId,Storage->GetLastOffset(), Config));
Send(TabletActorId, MakeEvHasData(SelfId(), PartitionId, Storage->GetLastOffset(), Config));

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

🟢 2025-11-10 19:11:13 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:21:37 UTC Pre-commit check linux-x86_64-relwithdebinfo for ff90d91 has started.
2025-11-11 06:21:52 UTC Artifacts will be uploaded here
2025-11-11 06:24:09 UTC ya make is running...
2025-11-11 06:54:57 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:21:58 UTC Pre-commit check linux-x86_64-release-asan for ff90d91 has started.
2025-11-11 06:22:18 UTC Artifacts will be uploaded here
2025-11-11 06:24:34 UTC ya make is running...
2025-11-11 06:54:56 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:57:38 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1a37707 has started.
2025-11-11 06:57:54 UTC Artifacts will be uploaded here
2025-11-11 07:00:11 UTC ya make is running...
2025-11-11 08:04:16 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 06:58:25 UTC Pre-commit check linux-x86_64-release-asan for 1a37707 has started.
2025-11-11 06:58:43 UTC Artifacts will be uploaded here
2025-11-11 07:01:00 UTC ya make is running...
2025-11-11 08:04:14 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 08:06:04 UTC Pre-commit check linux-x86_64-release-asan for 4b361e8 has started.
2025-11-11 08:06:22 UTC Artifacts will be uploaded here
2025-11-11 08:08:39 UTC ya make is running...
2025-11-11 08:21:18 UTC Check cancelled

@nshestakov nshestakov enabled auto-merge (squash) November 11, 2025 08:06
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 08:08:10 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4b361e8 has started.
2025-11-11 08:08:28 UTC Artifacts will be uploaded here
2025-11-11 08:10:53 UTC ya make is running...
2025-11-11 08:21:18 UTC Check cancelled

Copilot finished reviewing on behalf of nshestakov November 11, 2025 08:08
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

Copilot reviewed 25 out of 25 changed files in this pull request and generated 4 comments.


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

Comment on lines +6 to +7
#TIMEOUT(30)

Copy link

Copilot AI Nov 11, 2025

Choose a reason for hiding this comment

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

[nitpick] Commented-out TIMEOUT directive should either be removed or uncommented. Leaving commented-out configuration in build files can cause confusion.

Suggested change
#TIMEOUT(30)

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

github-actions bot commented Nov 11, 2025

2025-11-11 08:22:54 UTC Pre-commit check linux-x86_64-relwithdebinfo for 7a915b5 has started.
2025-11-11 08:23:12 UTC Artifacts will be uploaded here
2025-11-11 08:23:42 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 08:23:06 UTC Pre-commit check linux-x86_64-release-asan for 7a915b5 has started.
2025-11-11 08:23:35 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 08:24:55 UTC Pre-commit check linux-x86_64-relwithdebinfo for 5699dc5 has started.
2025-11-11 08:24:59 UTC Artifacts will be uploaded here
2025-11-11 08:27:03 UTC ya make is running...
🟡 2025-11-11 10:53:25 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
41376 38440 0 11 2893 32

2025-11-11 10:54:02 UTC ya make is running... (failed tests rerun, try 2)
🔴 2025-11-11 10:54:05 UTC Build failed, see the logs. Also see fail summary
🟡 2025-11-11 10:54:27 UTC ydbd size 2.3 GiB changed* by +325.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: fb94e2f merge: 5699dc5 diff diff %
ydbd size 2 437 870 152 Bytes 2 438 203 128 Bytes +325.2 KiB +0.014%
ydbd stripped size 518 656 528 Bytes 518 709 008 Bytes +51.2 KiB +0.010%

*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 11, 2025

2025-11-11 08:26:39 UTC Pre-commit check linux-x86_64-release-asan for 5699dc5 has started.
2025-11-11 08:26:43 UTC Artifacts will be uploaded here
2025-11-11 08:28:04 UTC ya make is running...
2025-11-11 11:03:01 UTC Check cancelled

ui64 DeadlineDelta: 16 = 0;
ui64 HasMessageGroupId: 1 = false;
ui32 DeadlineDelta: 16 = 0;
ui32 HasMessageGroupId: 1 = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

а почему не

Suggested change
ui32 HasMessageGroupId: 1 = false;
bool HasMessageGroupId: 1 = false;

?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

не, пусть остается ui32 т.к. тут битовая маска. так проще считать куда сколько бит потрачено. а сделаешь bool, а оно еще выравнивание поломает

@nshestakov nshestakov added the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 11:05:19 UTC Pre-commit check linux-x86_64-release-asan for bd943d3 has started.
2025-11-11 11:05:36 UTC Artifacts will be uploaded here
2025-11-11 11:07:43 UTC ya make is running...
2025-11-11 11:27:18 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 11:05:32 UTC Pre-commit check linux-x86_64-relwithdebinfo for bd943d3 has started.
2025-11-11 11:05:51 UTC Artifacts will be uploaded here
2025-11-11 11:08:04 UTC ya make is running...
2025-11-11 11:27:18 UTC Check cancelled

@nshestakov nshestakov added the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 11:29:57 UTC Pre-commit check linux-x86_64-release-asan for b1fe97d has started.
2025-11-11 11:30:14 UTC Artifacts will be uploaded here
2025-11-11 11:32:28 UTC ya make is running...
🟡 2025-11-11 14:22:06 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?
17902 17559 0 124 192 27

🟢 2025-11-11 14:22:15 UTC Build successful.
🟡 2025-11-11 14:22:47 UTC ydbd size 3.8 GiB changed* by +515.7 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 531f527 merge: b1fe97d diff diff %
ydbd size 4 081 237 048 Bytes 4 081 765 104 Bytes +515.7 KiB +0.013%
ydbd stripped size 1 515 018 120 Bytes 1 515 180 776 Bytes +158.8 KiB +0.011%

*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 11, 2025

2025-11-11 11:31:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for b1fe97d has started.
2025-11-11 11:31:24 UTC Artifacts will be uploaded here
2025-11-11 11:33:39 UTC ya make is running...
🟡 2025-11-11 13:57: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?
41376 38478 0 8 2866 24

2025-11-11 13:58:22 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-11-11 15:01:41 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?
14000 (only retried tests) 11113 0 7 2857 23

2025-11-11 15:02:08 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-11-11 16:10:28 UTC Some tests failed, follow the links below.

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

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
13350 (only retried tests) 10518 0 3 2799 30

🟢 2025-11-11 16:10:38 UTC Build successful.
🟡 2025-11-11 16:11:03 UTC ydbd size 2.3 GiB changed* by +325.2 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 531f527 merge: b1fe97d diff diff %
ydbd size 2 437 870 168 Bytes 2 438 203 128 Bytes +325.2 KiB +0.014%
ydbd stripped size 518 656 528 Bytes 518 709 008 Bytes +51.2 KiB +0.010%

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

@PavelEfarinov PavelEfarinov added the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions github-actions bot removed the rebase-and-check Rebase PR with the current base branch and check label Nov 11, 2025
@github-actions
Copy link

github-actions bot commented Nov 11, 2025

2025-11-11 16:47:53 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4c3049e has started.
2025-11-11 16:48:04 UTC Artifacts will be uploaded here
2025-11-11 16:49:37 UTC ya make is running...
🟡 2025-11-11 19:32:54 UTC Some tests failed, follow the links below. Going to retry failed tests...

Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
42412 39576 0 5 2796 35

2025-11-11 19:33:08 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-11-11 19:47:26 UTC Tests successful.

Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
69 (only retried tests) 48 0 0 1 20

🟢 2025-11-11 19:47:33 UTC Build successful.
🟡 2025-11-11 19:47:57 UTC ydbd size 2.3 GiB changed* by +321.1 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: ed7c647 merge: 4c3049e diff diff %
ydbd size 2 439 429 336 Bytes 2 439 758 144 Bytes +321.1 KiB +0.013%
ydbd stripped size 518 928 848 Bytes 518 977 168 Bytes +47.2 KiB +0.009%

*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 11, 2025

2025-11-11 16:48:12 UTC Pre-commit check linux-x86_64-release-asan for 4c3049e has started.
2025-11-11 16:48:21 UTC Artifacts will be uploaded here
2025-11-11 16:49:51 UTC ya make is running...
🟡 2025-11-11 19:39:43 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?
18797 18396 0 165 207 29

🟢 2025-11-11 19:39:52 UTC Build successful.
🟡 2025-11-11 19:40:19 UTC ydbd size 3.8 GiB changed* by +511.6 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: ed7c647 merge: 4c3049e diff diff %
ydbd size 4 084 372 304 Bytes 4 084 896 232 Bytes +511.6 KiB +0.013%
ydbd stripped size 1 516 379 880 Bytes 1 516 538 408 Bytes +154.8 KiB +0.010%

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

@nshestakov nshestakov merged commit bd4e29a into ydb-platform:main Nov 11, 2025
17 of 24 checks passed
@nshestakov nshestakov deleted the MLP-dlq branch November 12, 2025 05:02
);
}

std::unique_ptr<TEvPersQueue::TEvHasDataInfo> MakeEvHasData(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Зачем такая подпись? Проще же не подписываться, а со стороны партиции EndOffset на каждый чих пушить в MLP консумер-актор.


DLQMoverActorId = {};
for (auto offset : moved) {
AFL_ENSURE(Storage->MarkDLQMoved(offset))("o", offset);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Вот так писать нельзя никогда

read->SetTimeoutMs(0);

Send(TabletActorId, std::move(request), 0, ++Cookie);
SendToPQTablet(std::move(request));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Зачем тут через пайпу, это же локальный актор?

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.

4 participants