aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_remote_uncache.go
diff options
context:
space:
mode:
authorRain Li <blacktear23@gmail.com>2021-08-30 15:52:54 +0800
committerGitHub <noreply@github.com>2021-08-30 15:52:54 +0800
commite5f9ff983d7153ec9c3966d896c69c3901a873fc (patch)
treeb64f53d9fa36fc2c2c796e9c8385f7be1407fc6f /weed/shell/command_remote_uncache.go
parentc1dc5ab4ac90589fd5c4eaf75f7f2d4e870ae91d (diff)
parent44d0ac95f6a068203edc4568660a720c6f5cdf8b (diff)
downloadseaweedfs-e5f9ff983d7153ec9c3966d896c69c3901a873fc.tar.xz
seaweedfs-e5f9ff983d7153ec9c3966d896c69c3901a873fc.zip
Merge branch 'master' into filerstore-tikv
Diffstat (limited to 'weed/shell/command_remote_uncache.go')
-rw-r--r--weed/shell/command_remote_uncache.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/weed/shell/command_remote_uncache.go b/weed/shell/command_remote_uncache.go
index ac7e44a7d..369f2b3d4 100644
--- a/weed/shell/command_remote_uncache.go
+++ b/weed/shell/command_remote_uncache.go
@@ -83,6 +83,7 @@ func (c *commandRemoteUncache) Do(args []string, commandEnv *CommandEnv, writer
func (c *commandRemoteUncache) uncacheContentData(commandEnv *CommandEnv, writer io.Writer, dirToCache util.FullPath, fileFilter *FileFilter) error {
return recursivelyTraverseDirectory(commandEnv, dirToCache, func(dir util.FullPath, entry *filer_pb.Entry) bool {
+
if !mayHaveCachedToLocal(entry) {
return true // true means recursive traversal should continue
}
@@ -98,7 +99,7 @@ func (c *commandRemoteUncache) uncacheContentData(commandEnv *CommandEnv, writer
entry.RemoteEntry.LastLocalSyncTsNs = 0
entry.Chunks = nil
- println(dir, entry.Name)
+ fmt.Fprintf(writer, "Uncache %+v ... ", dir.Child(entry.Name))
err := commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
_, updateErr := client.UpdateEntry(context.Background(), &filer_pb.UpdateEntryRequest{
@@ -111,6 +112,7 @@ func (c *commandRemoteUncache) uncacheContentData(commandEnv *CommandEnv, writer
fmt.Fprintf(writer, "uncache %+v: %v\n", dir.Child(entry.Name), err)
return false
}
+ fmt.Fprintf(writer, "Done\n")
return true
})