-
Notifications
You must be signed in to change notification settings - Fork 507
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
Completion of the transaction #4407
Completion of the transaction #4407
Conversation
⚪
|
⚪
|
ydb/core/persqueue/pq_impl.cpp
Outdated
void TPersQueue::Handle(TEvPQ::TEvDeletePartitionDone::TPtr& ev, const TActorContext& ctx) | ||
{ | ||
auto* event = ev->Get(); | ||
const ui64 writeId = event->Cookie; |
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.
Return writeId in EvDeletePartitionDone response, no Cookie field required anymore.
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.
PartitionId
is used instead of WriteId
76c2d74
ydb/core/persqueue/pq_impl.cpp
Outdated
Y_ABORT_UNLESS(Partitions.contains(partitionId)); | ||
const TPartitionInfo& partition = Partitions.at(partitionId); | ||
|
||
Send(partition.Actor, new TEvents::TEvPoisonPill()); |
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.
Call die() or PassAway() in partition actor on sending EvDeletePartitionDone.
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.
Done
1b4b028
ydb/core/persqueue/partition.cpp
Outdated
|
||
void TPartition::ScheduleNegativeReply(const TEvPQ::TEvSetClientInfo&) | ||
{ | ||
Y_ABORT_UNLESS(false, "The supportive partition does not accept read operations"); |
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.
Y_ABORT
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.
Fixed
8b94486
ydb/core/persqueue/partition.h
Outdated
@@ -91,6 +91,10 @@ class TPartition : public TActorBootstrapped<TPartition> { | |||
static const ui32 MAX_ERRORS_COUNT_TO_STORE = 10; | |||
static const ui32 SCALE_REQUEST_REPEAT_MIN_SECONDS = 60; | |||
|
|||
enum ECookie : ui64 { |
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.
Remove cookie.
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.
Done
76c2d74
ydb/core/persqueue/partition.h
Outdated
@@ -795,6 +804,19 @@ class TPartition : public TActorBootstrapped<TPartition> { | |||
bool ClosedInternalPartition = false; | |||
|
|||
bool IsSupportive() const; | |||
|
|||
ui64 DeletePartitionCookie = 0; |
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.
Change to ENUM:
DELETEION_NOT_INITED
DELETION_INITED
DELETION_IN_PROCESS
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.
Done
76c2d74
@@ -483,10 +483,12 @@ class TPersQueue : public NKeyValue::TKeyValueFlat { | |||
void CreateSupportivePartitionActor(const TPartitionId& shadowPartitionId, const TActorContext& ctx); | |||
NKikimrPQ::TPQTabletConfig MakeSupportivePartitionConfig() const; | |||
void SubscribeWriteId(ui64 writeId, const TActorContext& ctx); | |||
void UnsubscribeWriteId(ui64 writeId, const TActorContext& ctx); |
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.
No EvDeletePartition called!
⚪
|
⚪
|
⚪ |
⚪ |
⚪ |
f22b220
to
1b4b028
Compare
⚪
|
⚪
|
1b4b028
to
f0d7ba3
Compare
⚪
|
⚪
|
⚪
|
⚪
|
NPQ::AddCmdDeleteRange(request, TKeyPrefix::TypeInfo, Partition); | ||
NPQ::AddCmdDeleteRange(request, TKeyPrefix::TypeData, Partition); | ||
NPQ::AddCmdDeleteRange(request, TKeyPrefix::TypeTmpData, Partition); | ||
NPQ::AddCmdDeleteRange(request, TKeyPrefix::TypeMeta, Partition); |
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.
Remove TypeTxMeta
Changelog entry
Added the TEvDeletePartition, TEvDeletePartitionDone and TEvTransactionCompleted messages. Upon completion of the transaction, the PQ tablet sends TEvDeletePartition to the auxiliary partitions and waits for TEvDeletePartitionDone from them
Changelog category
Additional information
...