vmstorage: add more context to the flock acquiring msg (#3584)

See https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3578

Signed-off-by: hagen1778 <roman@victoriametrics.com>

Signed-off-by: hagen1778 <roman@victoriametrics.com>
This commit is contained in:
Roman Khavronenko 2023-01-06 03:30:42 +01:00 committed by GitHub
parent 9f348cf8a1
commit 5bdd880142
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View file

@ -316,7 +316,8 @@ func OpenTable(path string, flushCallback func(), prepareBlock PrepareBlockCallb
// Protect from concurrent opens.
flockF, err := fs.CreateFlockFile(path)
if err != nil {
return nil, err
return nil, fmt.Errorf("cannot create lock file in %q; "+
"make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err)
}
// Open table parts.

View file

@ -176,7 +176,8 @@ func OpenStorage(path string, retentionMsecs int64, maxHourlySeries, maxDailySer
// Protect from concurrent opens.
flockF, err := fs.CreateFlockFile(path)
if err != nil {
return nil, err
return nil, fmt.Errorf("cannot create lock file in %q; "+
"make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err)
}
s.flockF = flockF

View file

@ -90,7 +90,8 @@ func openTable(path string, s *Storage) (*table, error) {
// Protect from concurrent opens.
flockF, err := fs.CreateFlockFile(path)
if err != nil {
return nil, err
return nil, fmt.Errorf("cannot create lock file in %q; "+
"make sure the dir isn't used by other processes or manually delete the file if you recover from abrupt VictoriaMetrics crash; error: %w", path, err)
}
// Create directories for small and big partitions if they don't exist yet.