Skip to content

Conversation

@drbasic
Copy link
Collaborator

@drbasic drbasic commented Oct 25, 2025

  1. The main idea is to make for each type of requests enumerated by the BLOCKSTORE_SERVICE macro (NProto::TReadBlocksRequest, NProto::TCreateCheckPointRequest, etc.) your template TBlockStoreMethod<TRequest, TResponse>
  2. In this template TBlockStoreMethod, there will be convenient access to the types of request and response, the name of the request, and some query classifications, for example, IsReadWriteRequest()
  3. Such a template TBlockStoreMethod is easy to get by request type or response type.
  4. TBlockStoreMethod allows you to call the desired method from the IBlockStore
  5. TBlockStoreImpl does the opposite transformation, inherits from IBlockStore, and when calling the virtual method, IBlockStore dispatches the call to the template method of the user class, immediately passing the TBlockStoreMethod type to it in the template. Which allows you to write IBlockStore heirs without macros.

@drbasic drbasic added the blockstore Add this label to run only cloud/blockstore build and tests on PR label Oct 25, 2025
@github-actions
Copy link
Contributor

Note

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

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

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
5458 5457 0 0 0 1 0

sharpeye
sharpeye previously approved these changes Oct 27, 2025
@github-actions
Copy link
Contributor

Note

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

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

TESTS PASSED ERRORS FAILED FAILED BUILD SKIPPED MUTED?
5458 5457 0 0 0 1 0

@drbasic drbasic merged commit 35fd5f3 into main Oct 27, 2025
12 of 14 checks passed
@drbasic drbasic deleted the users/drbasic/block-store-template-method branch October 27, 2025 14:46
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.

3 participants