telegraf icon indicating copy to clipboard operation
telegraf copied to clipboard

feat(agent): output buffer persistence

Open mstrandboge opened this issue 1 year ago • 1 comments

Summary

Implements the write-through buffer persistence strategy detailed in the spec added in #14928.

Currently this PR is mostly a draft of separating the output buffer into multiple implementations, as well as experimentation with a WAL file library. Largest outstanding issue is around metric serialization to []byte.

  • Using the influx parser+serializer causes a cyclical import, but also drops the metric value type field. However this is probably the cleanest option to investigate since it would make the WAL files easy to re-import
  • Another suggestion was to use encoding/gob, which is what the PR is currently doing. However this has issues with un-exported fields, so I need to look more into how to work around this

Checklist

  • [X] No AI generated code was used in this PR

Related issues

Related to #802, #14805

mstrandboge avatar Apr 24 '24 18:04 mstrandboge

@DStrand1,

Thanks for the PR, super excided to see this. To capture what we talked about in pairs; specifically, to have you address some of the initial comments and switch to the proposed WAL library.

Let's plan to talk through where you are at or any issues with the new library in Monday's pairs.

Thanks!

powersj avatar Apr 25 '24 17:04 powersj

Remaining comments are related to using the WAL file Batch function, I will work on switching to that next

mstrandboge avatar Jun 19 '24 20:06 mstrandboge

Superseded by #15564

mstrandboge avatar Jun 25 '24 20:06 mstrandboge