File size: 2,014 Bytes
84d2a97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
syntax = "proto3";

import "collections.proto";

package qdrant;
option csharp_namespace = "Qdrant.Client.Grpc";

service CollectionsInternal {
  /*
  Get collection info
  */
  rpc Get (GetCollectionInfoRequestInternal) returns (GetCollectionInfoResponse) {}
  /*
  Initiate shard transfer
  */
  rpc Initiate (InitiateShardTransferRequest) returns (CollectionOperationResponse) {}
  /**
  Wait for a shard to get into the given state
  */
  rpc WaitForShardState (WaitForShardStateRequest) returns (CollectionOperationResponse) {}
  /*
  Get shard recovery point
  */
  rpc GetShardRecoveryPoint (GetShardRecoveryPointRequest) returns (GetShardRecoveryPointResponse) {}
  /*
  Update shard cutoff point
  */
  rpc UpdateShardCutoffPoint (UpdateShardCutoffPointRequest) returns (CollectionOperationResponse) {}
}

message GetCollectionInfoRequestInternal {
  GetCollectionInfoRequest get_collectionInfoRequest = 1;
  uint32 shard_id = 2;
}

message InitiateShardTransferRequest {
  string collection_name = 1; // Name of the collection
  uint32 shard_id = 2; // Id of the temporary shard
}

message WaitForShardStateRequest {
  string collection_name = 1; // Name of the collection
  uint32 shard_id = 2; // Id of the shard
  ReplicaState state = 3;  // Shard state to wait for
  uint64 timeout = 4; // Timeout in seconds
}

message GetShardRecoveryPointRequest {
  string collection_name = 1; // Name of the collection
  uint32 shard_id = 2; // Id of the shard
}

message GetShardRecoveryPointResponse {
  RecoveryPoint recovery_point = 1; // Recovery point of the shard
  double time = 2; // Time spent to process
}

message RecoveryPoint {
  repeated RecoveryPointClockTag clocks = 1;
}

message RecoveryPointClockTag {
  uint64 peer_id = 1;
  uint32 clock_id = 2;
  uint64 clock_tick = 3;
  uint64 token = 4;
}

message UpdateShardCutoffPointRequest {
  string collection_name = 1; // Name of the collection
  uint32 shard_id = 2; // Id of the shard
  RecoveryPoint cutoff = 3; // Cutoff point of the shard
}