Fixed runaway rolodex.

The rolodex was running away and locking up vacuum.

Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2024-01-31 15:15:24 -08:00
parent c55527066a
commit a24c05036b
4 changed files with 13 additions and 2 deletions

View File

@@ -108,6 +108,7 @@ func (l *LocalFS) Open(name string) (fs.File, error) {
extractedFile, extErr = l.extractFile(name)
if extErr != nil {
l.processingFiles.Delete(name)
processingWaiter.done = true
return nil, extErr
}
if extractedFile != nil {
@@ -152,6 +153,10 @@ func (l *LocalFS) Open(name string) (fs.File, error) {
}
}
}
waiter, _ := l.processingFiles.Load(name)
if waiter != nil {
waiter.(*waiterLocal).done = true
}
l.processingFiles.Delete(name)
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist}
}