-
Notifications
You must be signed in to change notification settings - Fork 742
messages for shadow partition #1084
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6e70d57
[+] сообщения для служебной партиции
Alek5andr-Kotov c7ceff7
[+] код ошибки и сообщение об ошибке
Alek5andr-Kotov 57e69c3
[/] код ошибки
Alek5andr-Kotov deb4d3d
[*] SeqNo, ключи тела и голова
Alek5andr-Kotov 1ca8116
[*] голова передаётся как список TClientBlob
Alek5andr-Kotov 32351ec
[*] сообщения TEvGetWriteInfoResponse и TEvGetWriteInfoError
Alek5andr-Kotov 8fc84c4
[*] оптимизация конструктора
Alek5andr-Kotov File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ | |
|
|
||
| #include <ydb/core/base/row_version.h> | ||
| #include <ydb/core/protos/pqconfig.pb.h> | ||
| #include <ydb/core/persqueue/blob.h> | ||
| #include <ydb/core/persqueue/key.h> | ||
| #include <ydb/core/persqueue/metering_sink.h> | ||
| #include <ydb/core/tablet/tablet_counters.h> | ||
|
|
@@ -65,6 +66,18 @@ namespace NPQ { | |
| {} | ||
| }; | ||
|
|
||
| struct TDataKey { | ||
| TKey Key; | ||
| ui32 Size; | ||
| TInstant Timestamp; | ||
| ui64 CumulativeSize; | ||
| }; | ||
|
|
||
| struct TSeqNoRange { | ||
| ui64 Min; | ||
| ui64 Max; | ||
| }; | ||
|
|
||
| struct TErrorInfo { | ||
| NPersQueue::NErrorCode::EErrorCode ErrorCode; | ||
| TString ErrorStr; | ||
|
|
@@ -171,6 +184,9 @@ struct TEvPQ { | |
| EvProvideDirectReadInfo, | ||
| EvCheckPartitionStatusRequest, | ||
| EvCheckPartitionStatusResponse, | ||
| EvGetWriteInfoRequest, | ||
| EvGetWriteInfoResponse, | ||
| EvGetWriteInfoError, | ||
| EvEnd | ||
| }; | ||
|
|
||
|
|
@@ -1004,7 +1020,43 @@ struct TEvPQ { | |
| struct TEvCheckPartitionStatusResponse : public TEventPB<TEvCheckPartitionStatusResponse, NKikimrPQ::TEvCheckPartitionStatusResponse, EvCheckPartitionStatusResponse> { | ||
| }; | ||
|
|
||
| struct TEvGetWriteInfoRequest : public TEventLocal<TEvGetWriteInfoRequest, EvGetWriteInfoRequest> { | ||
| explicit TEvGetWriteInfoRequest(ui32 cookie) : | ||
| Cookie(cookie) | ||
| { | ||
| } | ||
|
|
||
| ui32 Cookie; // ShadowPartitionId | ||
| }; | ||
|
|
||
| struct TEvGetWriteInfoResponse : public TEventLocal<TEvGetWriteInfoResponse, EvGetWriteInfoResponse> { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. split in 2 messages - writeinforesponse and writeinfoerror
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| TEvGetWriteInfoResponse(ui32 cookie, | ||
| THashMap<TString, NPQ::TSeqNoRange>&& seqNo, | ||
| std::deque<NPQ::TDataKey>&& bodyKeys, | ||
| TVector<NPQ::TClientBlob>&& head) : | ||
| Cookie(cookie), | ||
| SeqNo(std::move(seqNo)), | ||
| BodyKeys(std::move(bodyKeys)), | ||
| Head(std::move(head)) | ||
| { | ||
| } | ||
|
|
||
| ui32 Cookie; // ShadowPartitionId | ||
| THashMap<TString, NPQ::TSeqNoRange> SeqNo; // SourceId -> (MinSeqNo, MaxSeqNo) | ||
| std::deque<NPQ::TDataKey> BodyKeys; | ||
| TVector<NPQ::TClientBlob> Head; | ||
| }; | ||
|
|
||
| struct TEvGetWriteInfoError : public TEventLocal<TEvGetWriteInfoError, EvGetWriteInfoError> { | ||
| ui32 Cookie; // ShadowPartitionId | ||
| TString Message; | ||
|
|
||
| TEvGetWriteInfoError(ui32 cookie, TString message) : | ||
| Cookie(cookie), | ||
| Message(std::move(message)) | ||
| { | ||
| } | ||
| }; | ||
| }; | ||
|
|
||
| } //NKikimr | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: Change caching proxy logic to process move commands too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added it to the task of transferring data