Skip to content

[NBS] Disk Agent: use Ask method to send Acquire/Release requests to the actor#6592

Open
sharpeye wants to merge 1 commit into
mainfrom
users/sharpeye/use-ask-method
Open

[NBS] Disk Agent: use Ask method to send Acquire/Release requests to the actor#6592
sharpeye wants to merge 1 commit into
mainfrom
users/sharpeye/use-ask-method

Conversation

@sharpeye

@sharpeye sharpeye commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Replace the custom TPromiseActor with ActorSystem::Ask for AcquireDevices and ReleaseDevices requests.

This reduces boilerplate without changing behavior.

@sharpeye sharpeye added the blockstore Add this label to run only cloud/blockstore build and tests on PR label Jul 23, 2026
@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Note

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

Note

All workloads for linux-x86_64-relwithdebinfo have completed.

Tip

Planned checks for linux-x86_64-relwithdebinfo.

🟢 linux-x86_64-relwithdebinfo target: cloud/blockstore/ (test time: 1412s): all tests PASSED for commit ac4d9a2.

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
6852 6851 0 0 0 1 0

@sharpeye
sharpeye marked this pull request as ready for review July 24, 2026 14:11

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ac4d9a214d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

[](const auto& future)
{
NCloud::NProto::TAcquireDevicesResponse response;
const auto& ev = future.GetValue();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Handle Ask failures before reading the reply

When an in-flight acquire/release is interrupted during actor shutdown, the old TPromiseActor converted TEvPoisonPill into an E_REJECTED protobuf response, but TActorSystem::Ask completes with an exception for non-matching events such as poison pills (contrib/ydb/library/actors/core/ask.cpp:46-52). This future.GetValue() then turns that into an exceptional backend future, and the TCP server subscribers also call GetValue() without an exception fallback (cloud/storage/core/libs/journalled_device_tcp_server/server.cpp:327/:347), so clients can hang or lose the protocol response instead of receiving the previous error response; please translate future.HasException() back into an error response here and in the release path.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blockstore Add this label to run only cloud/blockstore build and tests on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants