carbonserver: introduce file list cache v2 #470
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.
This commit introduces flc v2, the main purpose is to have better quota support during restart.
Mainly for saving physical and logical size info in the flc.
Users can transparently switch from v1 to v2 and vice versa.
More context on quota friendly: with flc v1, when go-carbon is restarted, it would create a trie index
tree using the logical size as physical size for metrics and this would potentially temporary high
physical size accounting and leads to unnecessary throttling if physical size quota is enabled.
With flc v2, go-carbon would keep physical, logical, data points, and first_seen_at timestamp in the
cache file and use that for rebuilding the trie index after restart. This would avoids temporary incorrect
physical size accounting issues with flcv1.