From d9af2e4f8af04dae72ff35a0bf424ff12d6015cf Mon Sep 17 00:00:00 2001 From: Tom Clegg Date: Fri, 5 Jan 2024 15:33:38 -0500 Subject: [PATCH] 20318: Update stale comment. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- sdk/go/arvados/keep_cache.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/go/arvados/keep_cache.go b/sdk/go/arvados/keep_cache.go index f2618b9d00..ff9a742fb1 100644 --- a/sdk/go/arvados/keep_cache.go +++ b/sdk/go/arvados/keep_cache.go @@ -456,9 +456,10 @@ func (cache *DiskCache) quickReadAt(cachefilename string, dst []byte, offset int cache.heldopenLock.Unlock() if isnew { - // Open and flock the file, then call wg.Done() to - // unblock any other goroutines that are waiting in - // the !isnew case above. + // Open and flock the file, save the filehandle (or + // error) in heldopen.f, and release the write lock so + // other goroutines waiting at heldopen.RLock() below + // can use the shared filehandle (or shared error). f, err := os.Open(cachefilename) if err == nil { err = syscall.Flock(int(f.Fd()), syscall.LOCK_SH) -- 2.39.5