| 545 | } |
| 546 | |
| 547 | func (a *Appendable) AppenderV2(ctx context.Context) storage.AppenderV2 { |
| 548 | ret := &appenderV2{baseAppender: baseAppender{a: a}} |
| 549 | if a.openAppenders.Inc() > 1 { |
| 550 | ret.err = errors.New("teststorage.Appendable.AppenderV2() concurrent use is not supported; attempted opening new AppenderV2() without Commit/Rollback of the previous one. Extend the implementation if concurrent mock is needed") |
| 551 | return ret |
| 552 | } |
| 553 | |
| 554 | if a.next != nil { |
| 555 | app := a.next.AppenderV2(ctx) |
| 556 | ret.next, ret.nextTr = app, app |
| 557 | } |
| 558 | return ret |
| 559 | } |
| 560 | |
| 561 | func (a *appenderV2) Append(ref storage.SeriesRef, ls labels.Labels, st, t int64, v float64, h *histogram.Histogram, fh *histogram.FloatHistogram, opts storage.AOptions) (_ storage.SeriesRef, err error) { |
| 562 | if err := a.checkErr(); err != nil { |