Fixed deadlock causing 100% CPU spike

I have seen this issue appear online a few times, the CPU locks at 100% when throwing a bad reference.

This happened because the local ‘lock’ used by the rolodex file loader, was not releasing correctly when a
lookup occurred, that could not be found via a rolodex file lookup.

https://github.com/daveshanley/vacuum/issues/393
Signed-off-by: quobix <dave@quobix.com>
This commit is contained in:
quobix
2023-12-12 13:25:26 -05:00
parent 1b079afad9
commit 1f5357ba45

View File

@@ -152,6 +152,7 @@ func (l *LocalFS) Open(name string) (fs.File, error) {
} }
} }
} }
l.processingFiles.Delete(name)
return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist} return nil, &fs.PathError{Op: "open", Path: name, Err: fs.ErrNotExist}
} }