From 1a314ac2c1180acea565f32942ccbf6f81099dc1 Mon Sep 17 00:00:00 2001 From: kqzh <35095889+kqzh@users.noreply.github.com> Date: Mon, 21 Nov 2022 15:26:24 +0800 Subject: [PATCH] upgrade nebula-go version --- go.mod | 2 +- go.sum | 3 ++- pkg/backup/backup.go | 2 +- pkg/clients/meta.go | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/go.mod b/go.mod index 586830d..1d62f8a 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,6 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.7.0 github.com/vesoft-inc/nebula-agent v0.1.1 - github.com/vesoft-inc/nebula-go/v3 v3.0.0 + github.com/vesoft-inc/nebula-go/v3 v3.3.1 golang.org/x/sys v0.0.0-20211124211545-fe61309f8881 // indirect ) diff --git a/go.sum b/go.sum index 312fb3d..4811422 100644 --- a/go.sum +++ b/go.sum @@ -225,8 +225,9 @@ github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69 github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/vesoft-inc/nebula-agent v0.1.1 h1:HGrKJV02uLQydgBTn8/eVdyxkY3cLGC1B5ra/xet52Y= github.com/vesoft-inc/nebula-agent v0.1.1/go.mod h1:JovCbyojVT665zWtlsss9SL9cVX969XKkZKO3NhrcMQ= -github.com/vesoft-inc/nebula-go/v3 v3.0.0 h1:ii5T3vps4xAQZkzPvGn6NuiUWlH/rm1zdIS5VTEA71A= github.com/vesoft-inc/nebula-go/v3 v3.0.0/go.mod h1:+sXv05jYQBARdTbTcIEsWVXCnF/6ttOlDK35xQ6m54s= +github.com/vesoft-inc/nebula-go/v3 v3.3.1 h1:5DxUxswEQvK9gkK6Y/X4fhX+bmIeHIJrn+b2q7tE3HM= +github.com/vesoft-inc/nebula-go/v3 v3.3.1/go.mod h1:+sXv05jYQBARdTbTcIEsWVXCnF/6ttOlDK35xQ6m54s= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= diff --git a/pkg/backup/backup.go b/pkg/backup/backup.go index f9ffca7..2e33b2d 100644 --- a/pkg/backup/backup.go +++ b/pkg/backup/backup.go @@ -198,7 +198,7 @@ func (b *Backup) Backup() (string, error) { hostDirs[hostStr] = make(map[string][]string) } - hostDirs[hostStr][idStr] = append(hostDirs[hostStr][idStr], string(cp.GetPath())) + hostDirs[hostStr][idStr] = append(hostDirs[hostStr][idStr], string(cp.GetDataPath())) } } } diff --git a/pkg/clients/meta.go b/pkg/clients/meta.go index 7b91c3a..343dde2 100644 --- a/pkg/clients/meta.go +++ b/pkg/clients/meta.go @@ -119,7 +119,8 @@ func (m *NebulaMeta) CreateBackup(spaces []string) (*meta.CreateBackupResp, erro func (m *NebulaMeta) DropBackup(name []byte) error { req := meta.NewDropSnapshotReq() - req.Name = name + // for nebulaGraph 3.3.0 compatibility + req.Names = [][]byte{name} for { resp, err := m.client.DropSnapshot(req)