diff --git a/pkg/server/sync.go b/pkg/server/sync.go index 2e56b64da..d60226365 100644 --- a/pkg/server/sync.go +++ b/pkg/server/sync.go @@ -87,9 +87,9 @@ type SyncHandler struct { totalCopyBytes int64 totalErrors int64 vshards []string // validation shards. if 0, validation not running - vshardDone int // shards validated + vshardDone int // shards already processed (incl. errors) vshardErrs []string - vmissing int64 // missing blobs found during validat + vmissing int64 // missing blobs found during validate vdestCount int // number of blobs seen on dest during validate vdestBytes int64 // number of blob bytes seen on dest during validate vsrcCount int // number of blobs seen on src during validate @@ -389,14 +389,14 @@ func (sh *SyncHandler) ServeHTTP(rw http.ResponseWriter, req *http.Request) { f("") f("
Background scan of source and destination to ensure that the destination has everything the source does, or is at least enqueued to sync.
") + if len(sh.vshards) == 0 || sh.vshardDone == len(sh.vshards) { token := xsrftoken.Generate(auth.Token(), "user", "runFullValidate") f("", token) - } else { - f("Background scan of source and destination to ensure that the destination has everything the source does, or is at least enqueued to sync.
") + } + if len(sh.vshards) != 0 { f("