aboutsummaryrefslogtreecommitdiff
path: root/weed/command/filer_remote_sync_dir.go
diff options
context:
space:
mode:
authorPatrick Schmidt <patrick.schmidt@innogames.com>2022-08-21 20:54:02 +0200
committerGitHub <noreply@github.com>2022-08-21 11:54:02 -0700
commitf49a9297c2d140cd8a8ba3e80842ad64db9be29d (patch)
tree123a59a79ffaa994708f9cd03fb9ecfb43dbdb4f /weed/command/filer_remote_sync_dir.go
parent388f82f322fcadfeb91ccaf14109162f1641888a (diff)
downloadseaweedfs-f49a9297c2d140cd8a8ba3e80842ad64db9be29d.tar.xz
seaweedfs-f49a9297c2d140cd8a8ba3e80842ad64db9be29d.zip
Fix hanging reads in chunk cacher (#3473)
Sometimes when an unexpected error occurs the cacher would set an error and return. However, it would not broadcast the condition signal in that case, therefore leaving the goroutine that runs readChunkAt stuck forever. I figured that the condition is unnecessary because readChunkAt is acquiring a lock that is still held by the cacher goroutine anyway. Callees of startCaching have to wait for a WaitGroup which makes sure that readChunkAt can't acquire the lock before startCaching. This way readChunkAt can execute normally and check for the error.
Diffstat (limited to 'weed/command/filer_remote_sync_dir.go')
0 files changed, 0 insertions, 0 deletions