Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Hiltunen <shiltunen@gitlab.com>2022-04-04 19:39:54 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2022-04-19 19:06:32 +0300
commitb850c3990c3eb2e5f42024ca3409b1dfc078ffb7 (patch)
treedfe61b2029fc78677f5c15439ec1e9a6a763e157 /proto/praefect.proto
parentef18681a6f171af027a31de9ce335a1887d31e81 (diff)
Add proto definitions for MarkUnverified RPC
With the introduction of metadata verification, Praefect needs a tool to manually mark a repository as needing verification immediately rather than after the specified verification interval has passed. That tool will require a new RPC that it can call achieve its goal. This commit adds the proto definitions for MarkUnverified RPC which can be called to either mark a single repository by ID, a whole virtual storage, or a whole storage as needing verification. Changelog: added
Diffstat (limited to 'proto/praefect.proto')
-rw-r--r--proto/praefect.proto32
1 files changed, 32 insertions, 0 deletions
diff --git a/proto/praefect.proto b/proto/praefect.proto
index c26a22c20..2e913b99f 100644
--- a/proto/praefect.proto
+++ b/proto/praefect.proto
@@ -21,6 +21,10 @@ service PraefectInfoService {
// latest and overwrite any other version on the virtual storage.
rpc SetAuthoritativeStorage(SetAuthoritativeStorageRequest) returns (SetAuthoritativeStorageResponse);
+ // MarkUnverified marks replicas as unverified. This will trigger verification as Praefect's metadata
+ // verifier prioritizes unverified replicas.
+ rpc MarkUnverified(MarkUnverifiedRequest) returns (MarkUnverifiedResponse);
+
// SetReplicationFactor assigns or unassigns host nodes from the repository to meet the desired replication factor.
// SetReplicationFactor returns an error when trying to set a replication factor that exceeds the storage node count
// in the virtual storage. An error is also returned when trying to set a replication factor below one. The primary node
@@ -34,6 +38,34 @@ service PraefectInfoService {
rpc GetRepositoryMetadata(GetRepositoryMetadataRequest) returns (GetRepositoryMetadataResponse);
}
+// MarkUnverifiedRequest specifies the replicas which to mark unverified.
+message MarkUnverifiedRequest {
+ // Storage identifies a single storage in a virtual storage.
+ message Storage {
+ // virtual_storage is the virtual storage the storage is part of.
+ string virtual_storage = 1;
+ // storage is the name of the storage.
+ string storage = 2;
+ }
+
+ // selector specifies the replicas which to mark unverified.
+ oneof selector {
+ // repository_id is the id of a repository to mark all replicas for unverified.
+ int64 repository_id = 1;
+ // virtual_storage is the name of virtual storage which will have all of its replicas
+ // marked unverified.
+ string virtual_storage = 2;
+ // storage specifies a single storage. The replicas on the storage marked unverified.
+ Storage storage = 3;
+ }
+}
+
+// MarkUnverifiedResponse returns the number of replicas marked unverified.
+message MarkUnverifiedResponse {
+ // replicas_marked indicates the number of replicas that were marked unverified.
+ int64 replicas_marked = 1;
+}
+
// GetRepositoryMetadataRequest specifies the repository to retrieve metadata for.
message GetRepositoryMetadataRequest {
message Path {