Skip to content

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

Merged
davidby-influx merged 1 commit intomaster-1.xfrom
DSB_field_creation_sync
Feb 14, 2025
Merged

fix: switch MeasurementFields from atomic.Value to sync.Map#26022
davidby-influx merged 1 commit intomaster-1.xfrom
DSB_field_creation_sync

Conversation

@davidby-influx
Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Contributor

@stuartcarnie stuartcarnie left a comment

Choose a reason for hiding this comment

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

Very nice – code becomes a lot cleaner 🥳

@davidby-influx davidby-influx merged commit b617eb2 into master-1.x Feb 14, 2025
9 checks passed
@davidby-influx davidby-influx deleted the DSB_field_creation_sync branch February 14, 2025 00:54
davidby-influx added a commit that referenced this pull request Feb 14, 2025
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
davidby-influx added a commit that referenced this pull request Feb 14, 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
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.

2 participants