Skip to content
This repository has been archived by the owner on May 10, 2022. It is now read-only.

Commit

Permalink
feat: add a batch get client interface which uses 'BATCH_GET' rpc for…
Browse files Browse the repository at this point in the history
… read optimization (#175)
  • Loading branch information
cauchy1988 authored Mar 3, 2022
1 parent fd2c32a commit fe4bfa2
Show file tree
Hide file tree
Showing 12 changed files with 3,690 additions and 4 deletions.
24 changes: 24 additions & 0 deletions idl/rrdb.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,29 @@ struct multi_get_response
6:string server;
}

struct batch_get_request {
1:list<full_key> keys;
}

struct full_key {
1:base.blob hash_key;
2:base.blob sort_key;
}

struct batch_get_response {
1:i32 error;
2:list<full_data> data;
3:i32 app_id;
4:i32 partition_index;
6:string server;
}

struct full_data {
1:base.blob hash_key;
2:base.blob sort_key;
3:base.blob value;
}

struct incr_request
{
1:base.blob key;
Expand Down Expand Up @@ -264,6 +287,7 @@ service rrdb
check_and_mutate_response check_and_mutate(1:check_and_mutate_request request);
read_response get(1:base.blob key);
multi_get_response multi_get(1:multi_get_request request);
batch_get_response batch_get(1:batch_get_request request);
count_response sortkey_count(1:base.blob hash_key);
ttl_response ttl(1:base.blob key);
scan_response get_scanner(1:get_scanner_request request);
Expand Down
Loading

0 comments on commit fe4bfa2

Please sign in to comment.