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

Fix race on measurementFields #6190

Merged
merged 2 commits into from
Apr 6, 2016
Merged

Fix race on measurementFields #6190

merged 2 commits into from
Apr 6, 2016

Commits on Apr 2, 2016

  1. Fix race on measurementFields

    Both Shard and Engine had the same reference to the measurementField map,
    but they each protected it with their own locks.  This causes a race when
    write and queries are occurring because writes can add new fields to the
    map while queries are reading from it.
    
    The fix moves the ownership to the Engine and provides protected accessors
    to that Shard now users.  For the most parts, the access on shard were old
    dead code.
    
    Fixing the measurementFields map race created a new race on the internal
    fields map.  This is now unexported and protected via MeasurementFields
    exported funcs.
    
    Fixes #6188
    jwilder committed Apr 2, 2016
    Configuration menu
    Copy the full SHA
    3f4c5a5 View commit details
    Browse the repository at this point in the history
  2. Optimize locking in CreateFieldIfNotExists

    Also remove some dead code that is no longer relevant with tsm.
    jwilder committed Apr 2, 2016
    Configuration menu
    Copy the full SHA
    ca8b0ca View commit details
    Browse the repository at this point in the history