Browse Source

filer.backup: fix cloud sinks when updating entry

pull/2097/head
Chris Lu 4 years ago
parent
commit
45bffc92a8
  1. 3
      weed/replication/sink/azuresink/azure_sink.go
  2. 5
      weed/replication/sink/b2sink/b2_sink.go
  3. 3
      weed/replication/sink/gcssink/gcs_sink.go
  4. 3
      weed/replication/sink/s3sink/s3_sink.go

3
weed/replication/sink/azuresink/azure_sink.go

@ -129,8 +129,7 @@ func (g *AzureSink) CreateEntry(key string, entry *filer_pb.Entry, signatures []
func (g *AzureSink) UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error) {
key = cleanKey(key)
// TODO improve efficiency
return false, nil
return true, g.CreateEntry(key, newEntry, signatures)
}
func cleanKey(key string) string {

5
weed/replication/sink/b2sink/b2_sink.go

@ -118,11 +118,8 @@ func (g *B2Sink) CreateEntry(key string, entry *filer_pb.Entry, signatures []int
}
func (g *B2Sink) UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error) {
key = cleanKey(key)
// TODO improve efficiency
return false, nil
return true, g.CreateEntry(key, newEntry, signatures)
}
func cleanKey(key string) string {

3
weed/replication/sink/gcssink/gcs_sink.go

@ -116,6 +116,5 @@ func (g *GcsSink) CreateEntry(key string, entry *filer_pb.Entry, signatures []in
}
func (g *GcsSink) UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error) {
// TODO improve efficiency
return false, nil
return true, g.CreateEntry(key, newEntry, signatures)
}

3
weed/replication/sink/s3sink/s3_sink.go

@ -147,8 +147,7 @@ func (s3sink *S3Sink) CreateEntry(key string, entry *filer_pb.Entry, signatures
func (s3sink *S3Sink) UpdateEntry(key string, oldEntry *filer_pb.Entry, newParentPath string, newEntry *filer_pb.Entry, deleteIncludeChunks bool, signatures []int32) (foundExistingEntry bool, err error) {
key = cleanKey(key)
// TODO improve efficiency
return false, nil
return true, s3sink.CreateEntry(key, newEntry, signatures)
}
func cleanKey(key string) string {

Loading…
Cancel
Save