-
Notifications
You must be signed in to change notification settings - Fork 21
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
Always respond with E_REJECT when killing a volume tablet actor #1988
base: main
Are you sure you want to change the base?
Conversation
b7d8ab2
to
757227e
Compare
10072e5
to
4be0511
Compare
4be0511
to
f3b10ca
Compare
@@ -55,8 +55,6 @@ class TMultiPartitionRequestActor final | |||
{ | |||
private: | |||
const TRequestInfoPtr RequestInfo; | |||
const NActors::TActorId VolumeActorId; |
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.
Теперь не нужно отправлять отдельно уведомление что завершилась многопартиционная запись, вольюм и так об этом узнает, так как все запросы проходят через него
const TCallContextPtr ForkedContext; | ||
const ui64 ReceiveTime; | ||
TCancelRoutine* const CancelRoutine; | ||
const bool IsMultipartitionWriteOrZero; |
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.
если запрос был на запись и мультипартиционный, запоминаем этот факь
@@ -167,46 +228,26 @@ void TVolumeActor::SendRequestToPartition( | |||
ToString(partActorId).data()); | |||
} | |||
|
|||
const bool processed = SendRequestToPartitionWithUsedBlockTracking<TMethod>( | |||
ctx, | |||
auto wrappedRequest = WrapRequest<TMethod>( |
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.
переношу подготовку запроса к отправке в партишен в отдельный метод
FillResponse<TMethod>(*msg, cc, volumeRequest.ReceiveTime); | ||
template <typename TMethod> | ||
bool TVolumeActor::ReplyToOriginalRequest( | ||
const NActors::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.
унификация перенаправления ответа от партишена к тому кто присылал запрос
isTraced, | ||
now)) | ||
{ | ||
if constexpr (IsWriteMethod<TMethod>) { |
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.
запрос не был зарегистрирован в VolumeRequests, к тому же отменен из-за того что клиент передумал.
по этому отвечаем не через ReplyToOriginalRequest.
@@ -349,11 +348,6 @@ struct TEvVolumePrivate | |||
EvPartStatsSaved | |||
>; | |||
|
|||
using TEvMultipartitionWriteOrZeroCompleted = TRequestEvent< |
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.
сообщение больше не нужно
Раньше не всегда запросы, которые отправлялись в партишен, сохранялись в акторе вольюма в векторе VolumeRequests. Это работало только если паришен был один, и не происходило отслеживание записанных блоков.
Сейчас сохранение происходит во всех случаях. А значит, если таблетка вольюма умирает, то и E_REJECTED будет отправляться всегда https://github.com/ydb-platform/nbs/blob/main/cloud/blockstore/libs/storage/volume/volume_actor.cpp#L531
Поведение стало консистентным.