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

db: temporal KV client index_range API via gRPC #2189

Merged
merged 5 commits into from
Jul 30, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented Jul 21, 2024

This PR implements temporal KV index_range API in gRPC client. The following interface changes become necessary:

  • first of all, the declaration of such API must be moved from api::Service to api::Transaction, as the input api::IndexRangeQuery always needs to specify the tx_id, i.e. the unique identifier of the enclosing db transaction
  • then, the return type becomes api::PaginatedTimestamps, which is a sequence of timestamps paginated by using the api::PaginatedSequence<T> abstraction introduced in db: paginated sequence for temporal KV API #2186

Extras

  • cmd: add kv_index_range command in grpc_toolbox to allow testing IndexRange KV RPC wrt Erigon3
  • infra: relax parameter type from std::unique_ptr<Stub>& to Stub& in unary_rpc function to allow easy usage of ::remote::MockKVStub in unit tests
  • infra: add utility function translating ::grpc::StatusCode into boost::system::error_code
  • infra: add utility functions to produce gRPC status codes in unit tests
  • rpc: refactor engine_api_test module to use DummyTransaction test utility

@canepat canepat marked this pull request as ready for review July 29, 2024 20:24
@canepat canepat added enhancement New feature or improvement temporal kv Related to Temporal KV internal gRPC interface labels Jul 29, 2024
@canepat canepat merged commit f9ae709 into master Jul 30, 2024
5 checks passed
@canepat canepat deleted the db_temporal_kv_index_range_grpc branch July 30, 2024 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement temporal kv Related to Temporal KV internal gRPC interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants