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:
authorJames Fargher <proglottis@gmail.com>2020-07-30 05:26:34 +0300
committerJames Fargher <proglottis@gmail.com>2020-07-30 05:26:34 +0300
commit8e731456707441f9e22bfb3b668885f0f983c449 (patch)
tree6114cec71f297b1b69bb2e62ceb72323e0b36b21
parent40cc531944e22832147ab3cd693fe8b74981c6eb (diff)
parentdb7767ad3febe68c4f376886d62a05bba5200f83 (diff)
Merge branch 'smh-repository-generations-dataloss' into 'master'
Generate data loss report from repository generation info See merge request gitlab-org/gitaly!2403
-rw-r--r--changelogs/unreleased/smh-repository-generations-dataloss.yml5
-rw-r--r--cmd/praefect/subcmd_dataloss.go31
-rw-r--r--cmd/praefect/subcmd_dataloss_test.go142
-rw-r--r--internal/praefect/service/info/dataloss.go39
-rw-r--r--proto/go/gitalypb/praefect.pb.go231
-rw-r--r--proto/praefect.proto26
-rw-r--r--ruby/proto/gitaly/praefect_pb.rb18
7 files changed, 254 insertions, 238 deletions
diff --git a/changelogs/unreleased/smh-repository-generations-dataloss.yml b/changelogs/unreleased/smh-repository-generations-dataloss.yml
new file mode 100644
index 000000000..1eb3f6a8c
--- /dev/null
+++ b/changelogs/unreleased/smh-repository-generations-dataloss.yml
@@ -0,0 +1,5 @@
+---
+title: Generate data loss report from repository generation info
+merge_request: 2403
+author:
+type: changed
diff --git a/cmd/praefect/subcmd_dataloss.go b/cmd/praefect/subcmd_dataloss.go
index f9c7f2d22..c66ca1a1b 100644
--- a/cmd/praefect/subcmd_dataloss.go
+++ b/cmd/praefect/subcmd_dataloss.go
@@ -74,27 +74,24 @@ func (cmd *datalossSubcommand) Exec(flags *flag.FlagSet, cfg config.Config) erro
return fmt.Errorf("error checking: %v", err)
}
- mode := "write-enabled"
- if resp.IsReadOnly {
- mode = "read-only"
- }
-
cmd.println(0, "Virtual storage: %s", vs)
- cmd.println(1, "Current %s primary: %s", mode, resp.CurrentPrimary)
- if resp.PreviousWritablePrimary == "" {
- fmt.Fprintln(cmd.output, " No data loss as the virtual storage has not encountered a failover")
- continue
- }
-
- cmd.println(1, "Previous write-enabled primary: %s", resp.PreviousWritablePrimary)
- if len(resp.OutdatedNodes) == 0 {
- cmd.println(2, "No data loss from failing over from %s", resp.PreviousWritablePrimary)
+ cmd.println(1, "Primary: %s", resp.Primary)
+ if len(resp.Repositories) == 0 {
+ cmd.println(1, "All repositories are up to date!")
continue
}
- cmd.println(2, "Nodes with data loss from failing over from %s:", resp.PreviousWritablePrimary)
- for _, odn := range resp.OutdatedNodes {
- cmd.println(3, "%s: %s", odn.RelativePath, strings.Join(odn.Nodes, ", "))
+ cmd.println(1, "Outdated repositories:")
+ for _, r := range resp.Repositories {
+ cmd.println(2, "%s:", r.RelativePath)
+ for _, s := range r.Storages {
+ plural := ""
+ if s.BehindBy > 1 {
+ plural = "s"
+ }
+
+ cmd.println(3, "%s is behind by %d change%s or less", s.Name, s.BehindBy, plural)
+ }
}
}
diff --git a/cmd/praefect/subcmd_dataloss_test.go b/cmd/praefect/subcmd_dataloss_test.go
index 569cf7caa..4c24741b9 100644
--- a/cmd/praefect/subcmd_dataloss_test.go
+++ b/cmd/praefect/subcmd_dataloss_test.go
@@ -5,9 +5,12 @@ import (
"context"
"testing"
- "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"gitlab.com/gitlab-org/gitaly/internal/praefect/config"
+ "gitlab.com/gitlab-org/gitaly/internal/praefect/datastore"
+ "gitlab.com/gitlab-org/gitaly/internal/praefect/nodes"
+ "gitlab.com/gitlab-org/gitaly/internal/praefect/service/info"
+ "gitlab.com/gitlab-org/gitaly/internal/testhelper"
"gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"
)
@@ -26,117 +29,92 @@ func (m mockPraefectInfoService) EnableWrites(ctx context.Context, r *gitalypb.E
}
func TestDatalossSubcommand(t *testing.T) {
- mockSvc := &mockPraefectInfoService{}
- ln, clean := listenAndServe(t, []svcRegistrar{registerPraefectInfoServer(mockSvc)})
+ mgr := &nodes.MockManager{
+ GetShardFunc: func(vs string) (nodes.Shard, error) {
+ var primary string
+ switch vs {
+ case "virtual-storage-1":
+ primary = "gitaly-1"
+ case "virtual-storage-2":
+ primary = "gitaly-4"
+ default:
+ t.Error("unexpected virtual storage")
+ }
+
+ return nodes.Shard{Primary: &nodes.MockNode{StorageName: primary}}, nil
+ },
+ }
+
+ gs := datastore.NewMemoryRepositoryStore(map[string][]string{
+ "virtual-storage-1": {"gitaly-1", "gitaly-2", "gitaly-3"},
+ "virtual-storage-2": {"gitaly-4"},
+ })
+
+ ctx, cancel := testhelper.Context()
+ defer cancel()
+
+ require.NoError(t, gs.SetGeneration(ctx, "virtual-storage-1", "repository-1", "gitaly-1", 1))
+ require.NoError(t, gs.SetGeneration(ctx, "virtual-storage-1", "repository-1", "gitaly-2", 0))
+
+ require.NoError(t, gs.SetGeneration(ctx, "virtual-storage-1", "repository-2", "gitaly-2", 0))
+ require.NoError(t, gs.SetGeneration(ctx, "virtual-storage-1", "repository-2", "gitaly-3", 0))
+
+ ln, clean := listenAndServe(t, []svcRegistrar{
+ registerPraefectInfoServer(info.NewServer(mgr, config.Config{}, nil, gs))})
defer clean()
for _, tc := range []struct {
desc string
args []string
virtualStorages []*config.VirtualStorage
- datalossCheck func(context.Context, *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error)
output string
error error
}{
{
desc: "positional arguments",
- args: []string{"-virtual-storage=test-virtual-storage", "positional-arg"},
+ args: []string{"-virtual-storage=virtual-storage-1", "positional-arg"},
error: UnexpectedPositionalArgsError{Command: "dataloss"},
},
{
- desc: "no failover",
- args: []string{"-virtual-storage=test-virtual-storage"},
- datalossCheck: func(ctx context.Context, req *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error) {
- assert.Equal(t, "test-virtual-storage", req.GetVirtualStorage())
- return &gitalypb.DatalossCheckResponse{
- CurrentPrimary: "test-current-primary",
- }, nil
- },
- output: `Virtual storage: test-virtual-storage
- Current write-enabled primary: test-current-primary
- No data loss as the virtual storage has not encountered a failover
-`,
- },
- {
- desc: "no data loss",
- args: []string{"-virtual-storage=test-virtual-storage"},
- datalossCheck: func(ctx context.Context, req *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error) {
- assert.Equal(t, "test-virtual-storage", req.GetVirtualStorage())
- return &gitalypb.DatalossCheckResponse{
- PreviousWritablePrimary: "test-previous-primary",
- IsReadOnly: false,
- CurrentPrimary: "test-current-primary",
- }, nil
- },
- output: `Virtual storage: test-virtual-storage
- Current write-enabled primary: test-current-primary
- Previous write-enabled primary: test-previous-primary
- No data loss from failing over from test-previous-primary
-`,
- },
- {
desc: "data loss",
- args: []string{"-virtual-storage=test-virtual-storage"},
- datalossCheck: func(ctx context.Context, req *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error) {
- assert.Equal(t, "test-virtual-storage", req.GetVirtualStorage())
- return &gitalypb.DatalossCheckResponse{
- PreviousWritablePrimary: "test-previous-primary",
- IsReadOnly: true,
- CurrentPrimary: "test-current-primary",
- OutdatedNodes: []*gitalypb.DatalossCheckResponse_Nodes{
- {RelativePath: "repository-1", Nodes: []string{"gitaly-2", "gitaly-3"}},
- {RelativePath: "repository-2", Nodes: []string{"gitaly-1"}},
- },
- }, nil
- },
- output: `Virtual storage: test-virtual-storage
- Current read-only primary: test-current-primary
- Previous write-enabled primary: test-previous-primary
- Nodes with data loss from failing over from test-previous-primary:
- repository-1: gitaly-2, gitaly-3
- repository-2: gitaly-1
+ args: []string{"-virtual-storage=virtual-storage-1"}, output: `Virtual storage: virtual-storage-1
+ Primary: gitaly-1
+ Outdated repositories:
+ repository-1:
+ gitaly-2 is behind by 1 change or less
+ gitaly-3 is behind by 2 changes or less
+ repository-2:
+ gitaly-1 is behind by 1 change or less
`,
},
{
desc: "multiple virtual storages",
- virtualStorages: []*config.VirtualStorage{{Name: "test-virtual-storage-2"}, {Name: "test-virtual-storage-1"}},
- datalossCheck: func(ctx context.Context, req *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error) {
- return &gitalypb.DatalossCheckResponse{
- PreviousWritablePrimary: "test-previous-primary",
- IsReadOnly: true,
- CurrentPrimary: "test-current-primary",
- OutdatedNodes: []*gitalypb.DatalossCheckResponse_Nodes{
- {RelativePath: "repository-1", Nodes: []string{"gitaly-2", "gitaly-3"}},
- {RelativePath: "repository-2", Nodes: []string{"gitaly-1"}},
- },
- }, nil
- },
- output: `Virtual storage: test-virtual-storage-1
- Current read-only primary: test-current-primary
- Previous write-enabled primary: test-previous-primary
- Nodes with data loss from failing over from test-previous-primary:
- repository-1: gitaly-2, gitaly-3
- repository-2: gitaly-1
-Virtual storage: test-virtual-storage-2
- Current read-only primary: test-current-primary
- Previous write-enabled primary: test-previous-primary
- Nodes with data loss from failing over from test-previous-primary:
- repository-1: gitaly-2, gitaly-3
- repository-2: gitaly-1
+ virtualStorages: []*config.VirtualStorage{{Name: "virtual-storage-2"}, {Name: "virtual-storage-1"}},
+ output: `Virtual storage: virtual-storage-1
+ Primary: gitaly-1
+ Outdated repositories:
+ repository-1:
+ gitaly-2 is behind by 1 change or less
+ gitaly-3 is behind by 2 changes or less
+ repository-2:
+ gitaly-1 is behind by 1 change or less
+Virtual storage: virtual-storage-2
+ Primary: gitaly-4
+ All repositories are up to date!
`,
},
} {
t.Run(tc.desc, func(t *testing.T) {
- mockSvc.DatalossCheckFunc = tc.datalossCheck
cmd := newDatalossSubcommand()
output := &bytes.Buffer{}
cmd.output = output
fs := cmd.FlagSet()
require.NoError(t, fs.Parse(tc.args))
- require.Equal(t, tc.error, cmd.Exec(fs, config.Config{
+ err := cmd.Exec(fs, config.Config{
VirtualStorages: tc.virtualStorages,
SocketPath: ln.Addr().String(),
- }))
+ })
+ require.Equal(t, tc.error, err, err)
require.Equal(t, tc.output, output.String())
})
}
diff --git a/internal/praefect/service/info/dataloss.go b/internal/praefect/service/info/dataloss.go
index 9c6a898ba..5ce72ce7f 100644
--- a/internal/praefect/service/info/dataloss.go
+++ b/internal/praefect/service/info/dataloss.go
@@ -8,37 +8,38 @@ import (
)
func (s *Server) DatalossCheck(ctx context.Context, req *gitalypb.DatalossCheckRequest) (*gitalypb.DatalossCheckResponse, error) {
- shard, err := s.nodeMgr.GetShard(req.VirtualStorage)
+ shard, err := s.nodeMgr.GetShard(req.GetVirtualStorage())
if err != nil {
return nil, err
}
- if shard.PreviousWritablePrimary == nil {
- return &gitalypb.DatalossCheckResponse{
- CurrentPrimary: shard.Primary.GetStorage(),
- IsReadOnly: shard.IsReadOnly,
- }, nil
- }
-
- repos, err := s.queue.GetOutdatedRepositories(ctx, req.GetVirtualStorage(), shard.PreviousWritablePrimary.GetStorage())
+ outdatedRepos, err := s.rs.GetOutdatedRepositories(ctx, req.GetVirtualStorage())
if err != nil {
return nil, err
}
- outdatedNodes := make([]*gitalypb.DatalossCheckResponse_Nodes, 0, len(repos))
- for repo, nodes := range repos {
- outdatedNodes = append(outdatedNodes, &gitalypb.DatalossCheckResponse_Nodes{
- RelativePath: repo,
- Nodes: nodes,
+ pbRepos := make([]*gitalypb.DatalossCheckResponse_Repository, 0, len(outdatedRepos))
+ for relativePath, storages := range outdatedRepos {
+ pbStorages := make([]*gitalypb.DatalossCheckResponse_Repository_Storage, 0, len(storages))
+ for name, behindBy := range storages {
+ pbStorages = append(pbStorages, &gitalypb.DatalossCheckResponse_Repository_Storage{
+ Name: name,
+ BehindBy: int64(behindBy),
+ })
+ }
+
+ sort.Slice(pbStorages, func(i, j int) bool { return pbStorages[i].Name < pbStorages[j].Name })
+
+ pbRepos = append(pbRepos, &gitalypb.DatalossCheckResponse_Repository{
+ RelativePath: relativePath,
+ Storages: pbStorages,
})
}
- sort.Slice(outdatedNodes, func(i, j int) bool { return outdatedNodes[i].RelativePath < outdatedNodes[j].RelativePath })
+ sort.Slice(pbRepos, func(i, j int) bool { return pbRepos[i].RelativePath < pbRepos[j].RelativePath })
return &gitalypb.DatalossCheckResponse{
- PreviousWritablePrimary: shard.PreviousWritablePrimary.GetStorage(),
- CurrentPrimary: shard.Primary.GetStorage(),
- IsReadOnly: shard.IsReadOnly,
- OutdatedNodes: outdatedNodes,
+ Primary: shard.Primary.GetStorage(),
+ Repositories: pbRepos,
}, nil
}
diff --git a/proto/go/gitalypb/praefect.pb.go b/proto/go/gitalypb/praefect.pb.go
index 4841823a7..06703bb14 100644
--- a/proto/go/gitalypb/praefect.pb.go
+++ b/proto/go/gitalypb/praefect.pb.go
@@ -221,15 +221,13 @@ func (m *DatalossCheckRequest) GetVirtualStorage() string {
}
type DatalossCheckResponse struct {
- VirtualStorage string `protobuf:"bytes,1,opt,name=virtual_storage,json=virtualStorage,proto3" json:"virtual_storage,omitempty"`
- PreviousWritablePrimary string `protobuf:"bytes,2,opt,name=previous_writable_primary,json=previousWritablePrimary,proto3" json:"previous_writable_primary,omitempty"`
- CurrentPrimary string `protobuf:"bytes,3,opt,name=current_primary,json=currentPrimary,proto3" json:"current_primary,omitempty"`
- // whether the virtual storage is currently in read-only mode
- IsReadOnly bool `protobuf:"varint,4,opt,name=is_read_only,json=isReadOnly,proto3" json:"is_read_only,omitempty"`
- OutdatedNodes []*DatalossCheckResponse_Nodes `protobuf:"bytes,5,rep,name=outdated_nodes,json=outdatedNodes,proto3" json:"outdated_nodes,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // current primary storage
+ Primary string `protobuf:"bytes,1,opt,name=primary,proto3" json:"primary,omitempty"`
+ // repositories with data loss
+ Repositories []*DatalossCheckResponse_Repository `protobuf:"bytes,2,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *DatalossCheckResponse) Reset() { *m = DatalossCheckResponse{} }
@@ -257,88 +255,118 @@ func (m *DatalossCheckResponse) XXX_DiscardUnknown() {
var xxx_messageInfo_DatalossCheckResponse proto.InternalMessageInfo
-func (m *DatalossCheckResponse) GetVirtualStorage() string {
+func (m *DatalossCheckResponse) GetPrimary() string {
if m != nil {
- return m.VirtualStorage
+ return m.Primary
}
return ""
}
-func (m *DatalossCheckResponse) GetPreviousWritablePrimary() string {
+func (m *DatalossCheckResponse) GetRepositories() []*DatalossCheckResponse_Repository {
if m != nil {
- return m.PreviousWritablePrimary
+ return m.Repositories
}
- return ""
+ return nil
}
-func (m *DatalossCheckResponse) GetCurrentPrimary() string {
- if m != nil {
- return m.CurrentPrimary
- }
- return ""
+type DatalossCheckResponse_Repository struct {
+ // relative path of the repository with outdated replicas
+ RelativePath string `protobuf:"bytes,1,opt,name=relative_path,json=relativePath,proto3" json:"relative_path,omitempty"`
+ // storages on which the repository is outdated
+ Storages []*DatalossCheckResponse_Repository_Storage `protobuf:"bytes,2,rep,name=storages,proto3" json:"storages,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
+}
+
+func (m *DatalossCheckResponse_Repository) Reset() { *m = DatalossCheckResponse_Repository{} }
+func (m *DatalossCheckResponse_Repository) String() string { return proto.CompactTextString(m) }
+func (*DatalossCheckResponse_Repository) ProtoMessage() {}
+func (*DatalossCheckResponse_Repository) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d32bf44842ead735, []int{5, 0}
}
-func (m *DatalossCheckResponse) GetIsReadOnly() bool {
+func (m *DatalossCheckResponse_Repository) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DatalossCheckResponse_Repository.Unmarshal(m, b)
+}
+func (m *DatalossCheckResponse_Repository) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DatalossCheckResponse_Repository.Marshal(b, m, deterministic)
+}
+func (m *DatalossCheckResponse_Repository) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DatalossCheckResponse_Repository.Merge(m, src)
+}
+func (m *DatalossCheckResponse_Repository) XXX_Size() int {
+ return xxx_messageInfo_DatalossCheckResponse_Repository.Size(m)
+}
+func (m *DatalossCheckResponse_Repository) XXX_DiscardUnknown() {
+ xxx_messageInfo_DatalossCheckResponse_Repository.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_DatalossCheckResponse_Repository proto.InternalMessageInfo
+
+func (m *DatalossCheckResponse_Repository) GetRelativePath() string {
if m != nil {
- return m.IsReadOnly
+ return m.RelativePath
}
- return false
+ return ""
}
-func (m *DatalossCheckResponse) GetOutdatedNodes() []*DatalossCheckResponse_Nodes {
+func (m *DatalossCheckResponse_Repository) GetStorages() []*DatalossCheckResponse_Repository_Storage {
if m != nil {
- return m.OutdatedNodes
+ return m.Storages
}
return nil
}
-type DatalossCheckResponse_Nodes struct {
- // relative path of the repository with outdated nodes
- RelativePath string `protobuf:"bytes,1,opt,name=relative_path,json=relativePath,proto3" json:"relative_path,omitempty"`
- // nodes whose copy of the repository is not up to date
- Nodes []string `protobuf:"bytes,2,rep,name=nodes,proto3" json:"nodes,omitempty"`
+type DatalossCheckResponse_Repository_Storage struct {
+ // name of the storage
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // behind_by indicates how many generations this storage is behind.
+ BehindBy int64 `protobuf:"varint,2,opt,name=behind_by,json=behindBy,proto3" json:"behind_by,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
-func (m *DatalossCheckResponse_Nodes) Reset() { *m = DatalossCheckResponse_Nodes{} }
-func (m *DatalossCheckResponse_Nodes) String() string { return proto.CompactTextString(m) }
-func (*DatalossCheckResponse_Nodes) ProtoMessage() {}
-func (*DatalossCheckResponse_Nodes) Descriptor() ([]byte, []int) {
- return fileDescriptor_d32bf44842ead735, []int{5, 0}
+func (m *DatalossCheckResponse_Repository_Storage) Reset() {
+ *m = DatalossCheckResponse_Repository_Storage{}
+}
+func (m *DatalossCheckResponse_Repository_Storage) String() string { return proto.CompactTextString(m) }
+func (*DatalossCheckResponse_Repository_Storage) ProtoMessage() {}
+func (*DatalossCheckResponse_Repository_Storage) Descriptor() ([]byte, []int) {
+ return fileDescriptor_d32bf44842ead735, []int{5, 0, 0}
}
-func (m *DatalossCheckResponse_Nodes) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DatalossCheckResponse_Nodes.Unmarshal(m, b)
+func (m *DatalossCheckResponse_Repository_Storage) XXX_Unmarshal(b []byte) error {
+ return xxx_messageInfo_DatalossCheckResponse_Repository_Storage.Unmarshal(m, b)
}
-func (m *DatalossCheckResponse_Nodes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DatalossCheckResponse_Nodes.Marshal(b, m, deterministic)
+func (m *DatalossCheckResponse_Repository_Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+ return xxx_messageInfo_DatalossCheckResponse_Repository_Storage.Marshal(b, m, deterministic)
}
-func (m *DatalossCheckResponse_Nodes) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DatalossCheckResponse_Nodes.Merge(m, src)
+func (m *DatalossCheckResponse_Repository_Storage) XXX_Merge(src proto.Message) {
+ xxx_messageInfo_DatalossCheckResponse_Repository_Storage.Merge(m, src)
}
-func (m *DatalossCheckResponse_Nodes) XXX_Size() int {
- return xxx_messageInfo_DatalossCheckResponse_Nodes.Size(m)
+func (m *DatalossCheckResponse_Repository_Storage) XXX_Size() int {
+ return xxx_messageInfo_DatalossCheckResponse_Repository_Storage.Size(m)
}
-func (m *DatalossCheckResponse_Nodes) XXX_DiscardUnknown() {
- xxx_messageInfo_DatalossCheckResponse_Nodes.DiscardUnknown(m)
+func (m *DatalossCheckResponse_Repository_Storage) XXX_DiscardUnknown() {
+ xxx_messageInfo_DatalossCheckResponse_Repository_Storage.DiscardUnknown(m)
}
-var xxx_messageInfo_DatalossCheckResponse_Nodes proto.InternalMessageInfo
+var xxx_messageInfo_DatalossCheckResponse_Repository_Storage proto.InternalMessageInfo
-func (m *DatalossCheckResponse_Nodes) GetRelativePath() string {
+func (m *DatalossCheckResponse_Repository_Storage) GetName() string {
if m != nil {
- return m.RelativePath
+ return m.Name
}
return ""
}
-func (m *DatalossCheckResponse_Nodes) GetNodes() []string {
+func (m *DatalossCheckResponse_Repository_Storage) GetBehindBy() int64 {
if m != nil {
- return m.Nodes
+ return m.BehindBy
}
- return nil
+ return 0
}
type RepositoryReplicasRequest struct {
@@ -629,7 +657,8 @@ func init() {
proto.RegisterType((*EnableWritesResponse)(nil), "gitaly.EnableWritesResponse")
proto.RegisterType((*DatalossCheckRequest)(nil), "gitaly.DatalossCheckRequest")
proto.RegisterType((*DatalossCheckResponse)(nil), "gitaly.DatalossCheckResponse")
- proto.RegisterType((*DatalossCheckResponse_Nodes)(nil), "gitaly.DatalossCheckResponse.Nodes")
+ proto.RegisterType((*DatalossCheckResponse_Repository)(nil), "gitaly.DatalossCheckResponse.Repository")
+ proto.RegisterType((*DatalossCheckResponse_Repository_Storage)(nil), "gitaly.DatalossCheckResponse.Repository.Storage")
proto.RegisterType((*RepositoryReplicasRequest)(nil), "gitaly.RepositoryReplicasRequest")
proto.RegisterType((*RepositoryReplicasResponse)(nil), "gitaly.RepositoryReplicasResponse")
proto.RegisterType((*RepositoryReplicasResponse_RepositoryDetails)(nil), "gitaly.RepositoryReplicasResponse.RepositoryDetails")
@@ -640,57 +669,55 @@ func init() {
func init() { proto.RegisterFile("praefect.proto", fileDescriptor_d32bf44842ead735) }
var fileDescriptor_d32bf44842ead735 = []byte{
- // 790 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0xdd, 0x6e, 0xe2, 0x46,
- 0x14, 0x96, 0x09, 0x6c, 0xc9, 0x09, 0xb0, 0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0xad, 0x56, 0x3d, 0x3f, 0xfd, 0x3e, 0xca, 0xf1, 0xe9, 0xa8, 0xeb,
- 0xf2, 0xc7, 0x5e, 0xf2, 0xf3, 0x84, 0x8b, 0x71, 0x2f, 0x51, 0xea, 0xc5, 0xff, 0x1b, 0x7a, 0x63,
- 0xae, 0xd7, 0xe1, 0x68, 0xf4, 0x22, 0x0e, 0x9d, 0xfd, 0x17, 0x00, 0x00, 0xff, 0xff, 0x9f, 0x63,
- 0x92, 0x96, 0x7e, 0x08, 0x00, 0x00,
+ // 754 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6e, 0xd3, 0x40,
+ 0x14, 0x96, 0xd3, 0xd0, 0xa6, 0x2f, 0x69, 0x9b, 0x4e, 0xff, 0x82, 0x5b, 0xda, 0xd4, 0x08, 0x1a,
+ 0x89, 0x36, 0xa9, 0x52, 0x24, 0x24, 0x76, 0xf4, 0x67, 0x51, 0x54, 0x41, 0xe5, 0x48, 0x20, 0xb1,
+ 0x89, 0xc6, 0xce, 0x34, 0x19, 0x70, 0x3c, 0x66, 0x66, 0x52, 0x29, 0x5b, 0x56, 0xdc, 0x80, 0x03,
+ 0xb0, 0xe2, 0x0c, 0x88, 0x2d, 0x37, 0xe0, 0x18, 0x5c, 0x80, 0x15, 0xb2, 0x3d, 0x76, 0x1d, 0xc7,
+ 0x69, 0x51, 0xd8, 0x79, 0xde, 0xcf, 0xf7, 0xe6, 0x7b, 0xdf, 0x9b, 0x19, 0xc3, 0xa2, 0xc7, 0x31,
+ 0xb9, 0x22, 0xb6, 0xac, 0x7b, 0x9c, 0x49, 0x86, 0x66, 0xbb, 0x54, 0x62, 0x67, 0xa8, 0x83, 0x43,
+ 0x5d, 0x65, 0xd3, 0x4b, 0xa2, 0x87, 0x39, 0xe9, 0x84, 0x2b, 0xe3, 0x9b, 0x06, 0xdb, 0x2d, 0x22,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0x0a, 0xc1, 0x1f, 0xdc, 0x7a, 0x8f, 0x25, 0xb6, 0xde, 0x82,
+ 0x52, 0xf2, 0x5d, 0x40, 0x9b, 0x51, 0x62, 0xc6, 0x9b, 0xa3, 0x6f, 0x65, 0x3b, 0x47, 0x40, 0xb5,
+ 0x72, 0x0e, 0x49, 0xd8, 0x98, 0xf0, 0xaa, 0xa1, 0xc7, 0x11, 0xc4, 0xed, 0x2f, 0xb4, 0xbe, 0x77,
+ 0x67, 0x5c, 0xba, 0xea, 0xf1, 0xe1, 0x3b, 0x3f, 0xc7, 0xc1, 0x56, 0xdd, 0x66, 0xfd, 0x46, 0xf8,
+ 0x79, 0xc0, 0x78, 0xb7, 0x11, 0x22, 0x35, 0x82, 0xbf, 0x83, 0x46, 0x97, 0xa9, 0xb5, 0x67, 0x59,
+ 0xb3, 0x81, 0xe9, 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe5, 0x56, 0xd8, 0xc4, 0x64, 0x08,
+ 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/proto/praefect.proto b/proto/praefect.proto
index 22c2d61b7..1e2f4ef45 100644
--- a/proto/praefect.proto
+++ b/proto/praefect.proto
@@ -74,19 +74,25 @@ message DatalossCheckRequest {
}
message DatalossCheckResponse {
- message Nodes {
- // relative path of the repository with outdated nodes
+ message Repository {
+ message Storage {
+ // name of the storage
+ string name = 1;
+ // behind_by indicates how many generations this storage is behind.
+ int64 behind_by = 2;
+ }
+
+ // relative path of the repository with outdated replicas
string relative_path = 1;
- // nodes whose copy of the repository is not up to date
- repeated string nodes = 2;
+ // storages on which the repository is outdated
+ repeated Storage storages = 2;
}
- string virtual_storage = 1;
- string previous_writable_primary = 2;
- string current_primary = 3;
- // whether the virtual storage is currently in read-only mode
- bool is_read_only = 4;
- repeated Nodes outdated_nodes = 5;
+ // current primary storage
+ string primary = 1;
+
+ // repositories with data loss
+ repeated Repository repositories = 2;
}
message RepositoryReplicasRequest{
diff --git a/ruby/proto/gitaly/praefect_pb.rb b/ruby/proto/gitaly/praefect_pb.rb
index 1ad2ce827..cd8fb9abb 100644
--- a/ruby/proto/gitaly/praefect_pb.rb
+++ b/ruby/proto/gitaly/praefect_pb.rb
@@ -22,15 +22,16 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
optional :virtual_storage, :string, 1
end
add_message "gitaly.DatalossCheckResponse" do
- optional :virtual_storage, :string, 1
- optional :previous_writable_primary, :string, 2
- optional :current_primary, :string, 3
- optional :is_read_only, :bool, 4
- repeated :outdated_nodes, :message, 5, "gitaly.DatalossCheckResponse.Nodes"
+ optional :primary, :string, 1
+ repeated :repositories, :message, 2, "gitaly.DatalossCheckResponse.Repository"
end
- add_message "gitaly.DatalossCheckResponse.Nodes" do
+ add_message "gitaly.DatalossCheckResponse.Repository" do
optional :relative_path, :string, 1
- repeated :nodes, :string, 2
+ repeated :storages, :message, 2, "gitaly.DatalossCheckResponse.Repository.Storage"
+ end
+ add_message "gitaly.DatalossCheckResponse.Repository.Storage" do
+ optional :name, :string, 1
+ optional :behind_by, :int64, 2
end
add_message "gitaly.RepositoryReplicasRequest" do
optional :repository, :message, 1, "gitaly.Repository"
@@ -65,7 +66,8 @@ module Gitaly
EnableWritesResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.EnableWritesResponse").msgclass
DatalossCheckRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DatalossCheckRequest").msgclass
DatalossCheckResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DatalossCheckResponse").msgclass
- DatalossCheckResponse::Nodes = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DatalossCheckResponse.Nodes").msgclass
+ DatalossCheckResponse::Repository = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DatalossCheckResponse.Repository").msgclass
+ DatalossCheckResponse::Repository::Storage = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.DatalossCheckResponse.Repository.Storage").msgclass
RepositoryReplicasRequest = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RepositoryReplicasRequest").msgclass
RepositoryReplicasResponse = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RepositoryReplicasResponse").msgclass
RepositoryReplicasResponse::RepositoryDetails = Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.RepositoryReplicasResponse.RepositoryDetails").msgclass