Skip to content
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

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

Conversation

drbasic
Copy link
Collaborator

@drbasic drbasic commented Sep 10, 2024

Раньше не всегда запросы, которые отправлялись в партишен, сохранялись в акторе вольюма в векторе VolumeRequests. Это работало только если паришен был один, и не происходило отслеживание записанных блоков.

Сейчас сохранение происходит во всех случаях. А значит, если таблетка вольюма умирает, то и E_REJECTED будет отправляться всегда https://github.com/ydb-platform/nbs/blob/main/cloud/blockstore/libs/storage/volume/volume_actor.cpp#L531

Поведение стало консистентным.

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit b7d8ab2.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5747 5744 0 0 1 2

@drbasic drbasic force-pushed the users/drbasic/save-all-partition-requests branch from b7d8ab2 to 757227e Compare September 18, 2024 10:53
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 757227e.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
5793 5793 0 0 0 0

@drbasic drbasic added large-tests Launch large tests for PR blockstore Add this label to run only cloud/blockstore build and tests on PR asan Launch builds with address sanitizer along with regular build labels Sep 19, 2024
@drbasic drbasic force-pushed the users/drbasic/save-all-partition-requests branch from 10072e5 to 4be0511 Compare September 19, 2024 08:23
@drbasic drbasic force-pushed the users/drbasic/save-all-partition-requests branch from 4be0511 to f3b10ca Compare September 19, 2024 08:24
@drbasic drbasic changed the title Save all partition requests info in VolumeRequests Always respond with E_REJECT when killing a volume tablet actor Sep 19, 2024
@@ -55,8 +55,6 @@ class TMultiPartitionRequestActor final
{
private:
const TRequestInfoPtr RequestInfo;
const NActors::TActorId VolumeActorId;
Copy link
Collaborator Author

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;
Copy link
Collaborator Author

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>(
Copy link
Collaborator Author

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,
Copy link
Collaborator Author

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>) {
Copy link
Collaborator Author

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<
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

сообщение больше не нужно

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit f3b10ca.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3459 3459 0 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
asan Launch builds with address sanitizer along with regular build blockstore Add this label to run only cloud/blockstore build and tests on PR large-tests Launch large tests for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant