influxdb: Add session.data with connection status#459
Merged
BrianJKoopman merged 2 commits intomainfrom Apr 3, 2026
Merged
Conversation
Member
Author
|
Connection tracking is a bit trickier in v2 due to the batch writing happening in a separate background thread. Working on it, but I'd ignore a220e74 and beyond if you look at this before it's "ready for review". |
a220e74 to
2d6a730
Compare
Member
Author
|
This is ready for review now. The implementations differ between v1 and v2 because in the v2 client they use a background thread to do all the writes -- they even seem to cache things for a time and retry the writes if it can reconnect in time. I don't distinguish between a retry-able connection loss and a more serious one, just mark it as not connected as soon as we can't successfully write. |
Member
Author
|
Going to go ahead with this merge, as I'm building the new tagging features on top of this branch, and I'm happy with its functionality. |
2d6a730 to
9b642b5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a
session.dataobject for the InfluxDB Publisher agents. This contains just the InfluxDB connection state and a timestamp at the moment, but can easily be expanded.The implementation differs a bit between the v1 and v2 agents, but connection status was added to the driver's
Publisherclass as an attribute, and the connection state is used to set the session as 'degraded' or not.Motivation and Context
Resolves #326.
How Has This Been Tested?
I have tested this with a local test setup that includes InfluxDB, the Publisher agents, and other supporting ocs infrastructure like crossbar. I've checked the session output:
And the degraded state:
Types of changes
Checklist: