Skip to content

fix: prevent differing field types in the same shard#26025

Merged
davidby-influx merged 2 commits intomain-2.xfrom
DSB_field_creation_2.x
Feb 14, 2025
Merged

fix: prevent differing field types in the same shard#26025
davidby-influx merged 2 commits intomain-2.xfrom
DSB_field_creation_2.x

Conversation

@davidby-influx
Copy link
Copy Markdown
Contributor

There was a window where a race between writes with
differing types for the same field were being validated.
Lock the  MeasurementFields struct during field
validation to avoid this.

closes #23756

(cherry picked from commit 5a20a83)

helps #26001
Simplify and speed up synchronization for
MeasurementFields structures by switching
from a mutex and atomic.Value to a sync.Map

(cherry picked from commit b617eb2)

closes #26001
Copy link
Copy Markdown
Member

@gwossum gwossum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown

@devanbenz devanbenz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nearly a clean cherrypick

lgtm

@davidby-influx davidby-influx merged commit 8711e2d into main-2.x Feb 14, 2025
25 checks passed
@davidby-influx davidby-influx deleted the DSB_field_creation_2.x branch February 14, 2025 20:30
devanbenz pushed a commit that referenced this pull request May 9, 2025
* fix: lock MeasurementFields while validating (#25998)

There was a window where a race between writes with
differing types for the same field were being validated.
Lock the  MeasurementFields struct during field
validation to avoid this.

closes #23756

(cherry picked from commit 5a20a83)

helps #26001

* fix: switch MeasurementFields from atomic.Value to sync.Map (#26022)

Simplify and speed up synchronization for
MeasurementFields structures by switching
from a mutex and atomic.Value to a sync.Map

(cherry picked from commit b617eb2)

closes #26001

(cherry picked from commit 8711e2d)
devanbenz pushed a commit that referenced this pull request May 9, 2025
* fix: lock MeasurementFields while validating (#25998)

There was a window where a race between writes with
differing types for the same field were being validated.
Lock the  MeasurementFields struct during field
validation to avoid this.

closes #23756

(cherry picked from commit 5a20a83)

helps #26001

* fix: switch MeasurementFields from atomic.Value to sync.Map (#26022)

Simplify and speed up synchronization for
MeasurementFields structures by switching
from a mutex and atomic.Value to a sync.Map

(cherry picked from commit b617eb2)

closes #26001

(cherry picked from commit 8711e2d)
devanbenz added a commit that referenced this pull request May 12, 2025
Co-authored-by: davidby-influx <72418212+davidby-influx@users.noreply.github.com>
fix: lock MeasurementFields while validating (#25998)
closes #23756
fix: switch MeasurementFields from atomic.Value to sync.Map (#26022)
closes #26001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mismatched field type within shard causes panic [Port to main-2.x]

3 participants