fix: fix wrong max age transformation from seconds #23684
Merged
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.
Required checklist
/etc
folder andNewDemoConfig
methods) (influxdb and plutonium)Description
1-3 sentences describing the PR (or link to well written issue)
Creating a replication stream with maxAgeSeconds (following this guide https://docs.influxdata.com/influxdb/v2.4/write-data/replication/replicate-data/?t=API)
Creates a replication stream with max age in nanoseconds (100_000_000ns = 1s) which makes the maxAgeSeconds=604800 in the docs to be 0.6048ms instead of 168h
Related issue #23681
Context
Why was this added? What value does it add? What are risks/best practices?
Converts the maxAgeSeconds to be seconds instead of nanoseconds.
Affected areas (delete section if not relevant):
List of user-visible changes. As a user, what would I need to see in docs?
Examples:
CLI commands, subcommands, and flags
API changes
Configuration (sample config blocks)
A quick workaround was to add 100_000_000 to the value stored in maxAgeSeconds. Using this fix would make those 100_000_000 times longer.
Severity (delete section if not relevant)
i.e., ("recommend to upgrade immediately", "upgrade at your leisure", etc.)
Note for reviewers:
Check the semantic commit type: