fix: Avoid file truncation in munmap
We've been seeing issues with client metrics being truncated after the Puma master (worker 0) process is killed. It appears that this was happening:
- Puma
parentprocess starts and openshistogram_puma_master-0.dband creates a bunch of metrics, causing the file size to increase to 16K. - Puma
parentforks this process asworker 0. - Puma
worker 0continues to add more metrics and increases the size of the metrics, from 32K to 64K, and so on. - Puma
worker 0is killed. - A new Puma worker forks from
parentand attempts toclose. Although the actual length is 64K, this new worker inherits fromparentand erroneously truncates the metrics file to 16K.
The simplest solution is to disable this truncation since it causes issues and doesn't really add value.
Closes #53 (closed)
Edited by Stan Hu