This repository was archived by the owner on Aug 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 107
Conversation
This file contains 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
7b19cb3
to
9de455c
Compare
Add support for a writeQueue that holds new MetricDefinitions in a buffer, then writes them into the index as a single batch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good, I haven't run the tests on my system yet.
Looks good to me, except the things that robert already commented |
- fix races caused by using atomic operations only some of the time. The most common issue was dereferencing *idx.Archive structs. This is unsafe as the process of defeferencing requires reading the values of the struct fields. However we use atomic operations to update some fields. The fix is to use our own CloneArchive function to safely dereference an *idx.Archive. - handle races where archives are flushed from the writeQueue after we fail to find the archive in the index, but before we check if they are in the writeQueue.
robert-milan
suggested changes
Jun 26, 2019
robert-milan
approved these changes
Jun 26, 2019
some stats could be useful? |
This branch has been thoroughly tested with a load-simulator. Stats from Master:
stats from this Branch
as well as ingesting data 2x as fast, the p90 query latency dropped from 30s to 7ms. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add support for a writeQueue that holds new MetricDefinitions in a
buffer, then writes them into the index as a single batch.
issue #1353
see also: #1152 (probably fixes)