fix: Avoid double usage calculation on every restart (#8856)
On every restart of the server, usage was being calculated which is not useful instead wait for sufficient time to start the crawling routine. This PR also avoids lots of double allocations through strings, optimizes usage of string builders and also avoids crawling through symbolic links. Fixes #8844
This commit is contained in:
committed by
kannappanr
parent
e2b3c083aa
commit
f14f60a487
@@ -58,6 +58,11 @@ func isSysErrTooLong(err error) bool {
|
||||
return errors.Is(err, syscall.ENAMETOOLONG)
|
||||
}
|
||||
|
||||
// Check if the given error corresponds to the ELOOP (too many symlinks).
|
||||
func isSysErrTooManySymlinks(err error) bool {
|
||||
return errors.Is(err, syscall.ELOOP)
|
||||
}
|
||||
|
||||
// Check if the given error corresponds to ENOTEMPTY for unix
|
||||
// and ERROR_DIR_NOT_EMPTY for windows (directory not empty).
|
||||
func isSysErrNotEmpty(err error) bool {
|
||||
|
||||
Reference in New Issue
Block a user