mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
When updating a `JobScalingEvent`, the state store function did not copy the existing object before mutating it. This corrupts the state store because it modifies the leaf node without committing it in a transaction. It can also cause the Nomad server to crash with a "fatal error: concurrent map read and map write" if its `ScalingEvents` map is read via the `ScaleStatus` RPC at the same time as it's being written. This changeset also removes some mostly-unused public methods on the struct that dangerously encourage you to mutate it outside of a copy. Ref: https://hashicorp.atlassian.net/browse/NET-10529
4 lines
114 B
Plaintext
4 lines
114 B
Plaintext
```release-note:bug
|
|
scaling: Fixed a bug where state store corruption could occur when writing scaling events
|
|
```
|