Skip to content
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

Rewriting fields.idx is a bottleneck with many new fields and measurements #21577

Closed
davidby-influx opened this issue May 28, 2021 · 0 comments · Fixed by #21592 or #21610
Closed

Rewriting fields.idx is a bottleneck with many new fields and measurements #21577

davidby-influx opened this issue May 28, 2021 · 0 comments · Fixed by #21592 or #21610

Comments

@davidby-influx
Copy link
Contributor

When using schema designs that involve many (hundreds of thousands) of
measurements and fields, the non-incremental rewrites of fields.idx can
become a serious bottleneck. While the IOx storage engine will solve this
in the long run, as a temporary improvement, influxdb should abandon
rewrites that will be immediately overwritten by subsequent fields and
measurement creation, whenever possible.

@davidby-influx davidby-influx self-assigned this May 28, 2021
davidby-influx added a commit that referenced this issue Jun 3, 2021
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations.

Closes #21577
davidby-influx added a commit that referenced this issue Jun 3, 2021
Add syntactic sugar to wrap the error return
channel, with a writeRequest struct.  Add an explicit
Close() methods to MeasurementFieldSet and
MeasurementsFieldSetWriter. Update
tests and engine to call Close() methods.

Closes #21577
@davidby-influx davidby-influx linked a pull request Jun 3, 2021 that will close this issue
4 tasks
davidby-influx added a commit that referenced this issue Jun 4, 2021
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new 
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577
davidby-influx added a commit that referenced this issue Jun 4, 2021
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be28)
davidby-influx added a commit that referenced this issue Jun 4, 2021
…21609)

Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be28)

Closes #21597
davidby-influx added a commit that referenced this issue Jun 4, 2021
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be28)
davidby-influx added a commit that referenced this issue Jun 4, 2021
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be28)

Closes #21598
lesam pushed a commit to lesam/influxdb that referenced this issue Jun 15, 2021
…t to 1.9] (influxdata#21609)

Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes influxdata#21577

(cherry picked from commit f64be28)

Closes influxdata#21597
lesam added a commit that referenced this issue Jun 15, 2021
* fix: avoid rewriting fields.idx unnecessarily (#21592) [Port to 1.9] (#21609)

Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes #21577

(cherry picked from commit f64be28)

Closes #21597

* chore: minor refactor suggested by go lint (#21614) (#21616)

(cherry picked from commit 7d10228)
(cherry picked from commit f820287)

Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
chengshiwen pushed a commit to chengshiwen/influxdb that referenced this issue Aug 27, 2024
Under heavy write load creating new fields and measurements
the rewrite of the fields.idx file is a bottleneck. This
enhancement combines multiple writes into a single one and
shares any error return value with all of the combined
invocations. MeasurementFieldSet and the new
MeasurementFieldSetWriter must both now be explicitly
closed.

Closes influxdata#21577
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant