mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
lib/storage/table.go: add missing tb.ptwsLock.Unlock()
before the return
This is a follow-up for a1083d0531
See https://github.com/VictoriaMetrics/VictoriaMetrics/pull/2103
This commit is contained in:
parent
1999bbfe82
commit
96aa3761fc
1 changed files with 1 additions and 0 deletions
|
@ -362,6 +362,7 @@ func (tb *table) AddRows(rows []rawRow) error {
|
|||
pt, err := createPartition(r.Timestamp, tb.smallPartitionsPath, tb.bigPartitionsPath, tb.getDeletedMetricIDs, tb.retentionMsecs)
|
||||
if err != nil {
|
||||
// Return only the first error, since it has no sense in returning all errors.
|
||||
tb.ptwsLock.Unlock()
|
||||
return fmt.Errorf("errors while adding rows to table %q: %w", tb.path, err)
|
||||
}
|
||||
pt.AddRows(missingRows[i : i+1])
|
||||
|
|
Loading…
Reference in a new issue