Skip to content

Commit 281877e

Browse files
committed
feat: assign to original error
1 parent 2044458 commit 281877e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tsdb/shard.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -726,12 +726,9 @@ func (s *Shard) validateSeriesAndFields(points []models.Point, tracker StatsTrac
726726
// Sometimes we will drop fields like 'time' but not an entire point
727727
// we want to inform the writer that something occurred.
728728
} else if partialWriteError != nil && partialWriteError.Dropped <= 0 {
729-
err = PartialWriteError{
730-
Reason: partialWriteError.Reason,
731-
Dropped: partialWriteError.Dropped,
732-
Database: s.Database(),
733-
RetentionPolicy: s.RetentionPolicy(),
734-
}
729+
partialWriteError.Database = s.Database()
730+
partialWriteError.RetentionPolicy = s.RetentionPolicy()
731+
err = *partialWriteError
735732
}
736733
points[j] = points[i]
737734
j++

0 commit comments

Comments
 (0)