-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(tsdb): minimize lock contention when adding new fields or measure #20912
Merged
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
danxmoran
approved these changes
Mar 9, 2021
…ments (#20504) fields.idx frequent writes cause lock contention and fields.idx is recreated when a field or measurement is added in a WritePointsWithContext() This eliminates locking during the actual file rewrite, and limits it to the times when the MeasurementFieldSet is actually being read or written in memory and when the new file is being renamed. Test verification of correct behavior by checking the fields.idx file matches the in-memory copy after heavily parallel measurement addition. Fixes #20500 (cherry picked from commit fe3af66)
davidby-influx
force-pushed
the
DSB_lock_contention
branch
from
March 9, 2021 23:14
8e18bfb
to
8248920
Compare
been2io
pushed a commit
to been2io/influxdb
that referenced
this pull request
Apr 1, 2021
* '1.8' of github.com:influxdata/influxdb: (41 commits) chore: Late to the party fix for influxdata/plutonium#3339 (influxdata#21080) fix: fix help test for influx_inspect (influxdata#21052) (influxdata#21053) fix: Set go version to 1.13 in go.mod; see influxdata/plutonium#3339 (influxdata#21034) refactor: separate coarse and fine permission interfaces (influxdata#20996) (influxdata#21035) feat: Log query text for POST requests (influxdata#20993) (influxdata#21021) feat: influx_inspect export to standard out (influxdata#20977) (influxdata#20989) feat(inspect): Add report-disk for disk usage by measurement (influxdata#20917) fix: infinite recursion bug (influxdata#20862) (influxdata#20914) fix(tsdb): minimize lock contention when adding new fields or measure (influxdata#20912) fix(tsm1): fix data race when accessing tombstone stats (influxdata#20909) Update changelog feat: Make meta queries respect QueryTimeout values (influxdata#20910) chore: run goimports on 1.8 branch to bring it up to new check-in standards (influxdata#20907) fix(error): SELECT INTO doesn't return error with unsupported value (influxdata#20429) (influxdata#20432) build: switch tested centos base images (influxdata#20417) (influxdata#20418) chore: update CHANGELOG.md for typo and community PR (influxdata#20389) fix(prometheus): regexp handling should comply with PromQL (influxdata#19832) fix: cp.Mux.Serve() closes all net.Listener instances silently on error (influxdata#20295) Update changelog chore: fix CHANGELOG formating (influxdata#20286) ...
been2io
pushed a commit
to been2io/influxdb
that referenced
this pull request
Apr 2, 2021
* 1.8: (41 commits) chore: Late to the party fix for influxdata/plutonium#3339 (influxdata#21080) fix: fix help test for influx_inspect (influxdata#21052) (influxdata#21053) fix: Set go version to 1.13 in go.mod; see influxdata/plutonium#3339 (influxdata#21034) refactor: separate coarse and fine permission interfaces (influxdata#20996) (influxdata#21035) feat: Log query text for POST requests (influxdata#20993) (influxdata#21021) feat: influx_inspect export to standard out (influxdata#20977) (influxdata#20989) feat(inspect): Add report-disk for disk usage by measurement (influxdata#20917) fix: infinite recursion bug (influxdata#20862) (influxdata#20914) fix(tsdb): minimize lock contention when adding new fields or measure (influxdata#20912) fix(tsm1): fix data race when accessing tombstone stats (influxdata#20909) Update changelog feat: Make meta queries respect QueryTimeout values (influxdata#20910) chore: run goimports on 1.8 branch to bring it up to new check-in standards (influxdata#20907) fix(error): SELECT INTO doesn't return error with unsupported value (influxdata#20429) (influxdata#20432) build: switch tested centos base images (influxdata#20417) (influxdata#20418) chore: update CHANGELOG.md for typo and community PR (influxdata#20389) fix(prometheus): regexp handling should comply with PromQL (influxdata#19832) fix: cp.Mux.Serve() closes all net.Listener instances silently on error (influxdata#20295) Update changelog chore: fix CHANGELOG formating (influxdata#20286) ... # Conflicts: # cmd/influxd/run/server.go # go.sum # services/httpd/service.go # storage/reads/datatypes/predicate.pb.go # storage/reads/datatypes/storage_common.pb.go
been2io
pushed a commit
to been2io/influxdb
that referenced
this pull request
Apr 2, 2021
* seriescache: (41 commits) chore: Late to the party fix for influxdata/plutonium#3339 (influxdata#21080) fix: fix help test for influx_inspect (influxdata#21052) (influxdata#21053) fix: Set go version to 1.13 in go.mod; see influxdata/plutonium#3339 (influxdata#21034) refactor: separate coarse and fine permission interfaces (influxdata#20996) (influxdata#21035) feat: Log query text for POST requests (influxdata#20993) (influxdata#21021) feat: influx_inspect export to standard out (influxdata#20977) (influxdata#20989) feat(inspect): Add report-disk for disk usage by measurement (influxdata#20917) fix: infinite recursion bug (influxdata#20862) (influxdata#20914) fix(tsdb): minimize lock contention when adding new fields or measure (influxdata#20912) fix(tsm1): fix data race when accessing tombstone stats (influxdata#20909) Update changelog feat: Make meta queries respect QueryTimeout values (influxdata#20910) chore: run goimports on 1.8 branch to bring it up to new check-in standards (influxdata#20907) fix(error): SELECT INTO doesn't return error with unsupported value (influxdata#20429) (influxdata#20432) build: switch tested centos base images (influxdata#20417) (influxdata#20418) chore: update CHANGELOG.md for typo and community PR (influxdata#20389) fix(prometheus): regexp handling should comply with PromQL (influxdata#19832) fix: cp.Mux.Serve() closes all net.Listener instances silently on error (influxdata#20295) Update changelog chore: fix CHANGELOG formating (influxdata#20286) ...
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.
…ments (#20504)
fields.idx frequent writes cause lock contention and fields.idx is recreated
when a field or measurement is added in a WritePointsWithContext()
This eliminates locking during the actual file rewrite, and limits it to
the times when the MeasurementFieldSet is actually being read or written
in memory and when the new file is being renamed.
Test verification of correct behavior by checking the fields.idx
file matches the in-memory copy after heavily parallel measurement addition.
Fixes #20500
(cherry picked from commit fe3af66)