-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
collector/filesystem: s/MNT_NOWAIT/MNT_WAIT
#2960
base: master
Are you sure you want to change the base?
Conversation
d9f495a
to
514d009
Compare
`getfsstat(2)` spec mentions that using `MNT_NOWAIT` will return the information it has available without requesting an update from each file system. Hence, use `MNT_WAIT` in place of the earlier used mode, and make changes to the affected collectors to avoid being stuck for long intervals. Fixes: prometheus#1498 Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
I wonder if we could refactor the timeout logic implemented in https://github.com/prometheus/node_exporter/pull/997/files and re-use it here? |
@discordianfish Sure! Do you think it'd be better to do that in a separate PR? |
@rexagod I think you can just do it here and use to to address the MNT_WAIT change |
@discordianfish I revisited the machinery introduced in #997, and although it seems fitting for that use case, I've had to drop it entirely in this patch to accommodate for the varying design patterns for different filesystems. As such, I believe a per-filesystem case makes sense here since encapsulating that logic such that it fits all filesystems can get non-scalable in the future as more corner cases are added to satisfy the various implementations. Please note that while the previous machinery is being dropped here, the expected behavior is still the same. LMK if you think otherwise, though. :) |
Would be nice if we could avoid duplicating the channel/goroutine/timeout logic |
getfsstat(2)
spec mentions that usingMNT_NOWAIT
will return the information it has available without requesting an update from each file system. Hence, useMNT_WAIT
in place of the earlier used mode, and make changes to the affected collectors to avoid being stuck for long intervals.Fixes: #1498