Skip to content

Commit

Permalink
remove ExportPayload from protos. Export returns Status and ExportReq…
Browse files Browse the repository at this point in the history
…uest. (#2741)
  • Loading branch information
srfrog authored Nov 8, 2018
1 parent 981a4fd commit 6b474ff
Show file tree
Hide file tree
Showing 4 changed files with 509 additions and 590 deletions.
38 changes: 14 additions & 24 deletions protos/pb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -367,22 +367,6 @@ message MovePredicatePayload {
MembershipState state = 4;
}

// ExportPayload is used both as a request and a response.
// When used in request, groups represents the list of groups that need to be backed up.
// When used in response, groups represent the list of groups that were backed up.
message ExportPayload {
enum Status {
NONE = 0;
SUCCESS = 1;
DUPLICATE = 2;
FAILED = 3;
}
uint32 group_id = 1; // Group id to back up.
Status status = 2;
uint64 read_ts = 3;
int64 unix_ts = 4;
}

message TxnStatus {
uint64 start_ts = 1;
uint64 commit_ts = 2;
Expand Down Expand Up @@ -427,14 +411,14 @@ service Zero {

service Worker {
// Data serving RPCs.
rpc Mutate (Mutations) returns (api.TxnContext) {}
rpc ServeTask (Query) returns (Result) {}
rpc StreamSnapshot (stream Snapshot) returns (stream KVS) {}
rpc Sort (SortMessage) returns (SortResult) {}
rpc Schema (SchemaRequest) returns (SchemaResult) {}
rpc PurgeTs (api.Payload) returns (Num) {}
rpc Mutate (Mutations) returns (api.TxnContext) {}
rpc ServeTask (Query) returns (Result) {}
rpc StreamSnapshot (stream Snapshot) returns (stream KVS) {}
rpc Sort (SortMessage) returns (SortResult) {}
rpc Schema (SchemaRequest) returns (SchemaResult) {}
rpc PurgeTs (api.Payload) returns (Num) {}
rpc Backup (BackupRequest) returns (Status) {}
rpc Export (ExportPayload) returns (ExportPayload) {}
rpc Export (ExportRequest) returns (Status) {}
rpc ReceivePredicate(stream KVS) returns (api.Payload) {}
rpc MovePredicate(MovePredicatePayload) returns (api.Payload) {}
}
Expand All @@ -458,7 +442,7 @@ message SnapshotMeta {
}

// Status describes a general status response.
// code: 0 = success, -1 = unknown failure
// code: 0 = success, 0 != failure.
message Status {
int32 code = 1;
string msg = 2;
Expand All @@ -471,4 +455,10 @@ message BackupRequest {
string target = 4;
}

message ExportRequest {
uint32 group_id = 1; // Group id to back up.
uint64 read_ts = 2;
int64 unix_ts = 3;
}

// vim: noexpandtab sw=2 ts=2
Loading

0 comments on commit 6b474ff

Please sign in to comment.