You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If two instances of the promdump binary manage to pass the export file existence check before writing out their first batch of metrics, they will step all over each other and produce a dump that is -- at best -- inconsistent.
The easiest way to prevent this is probably creating a lock file and having each instance lock it before attempting to dump any metrics. Locks are automatically cleaned up if the process exits, so we wouldn't have to worry about them going stale even if the lock file is left around.
Unfortunately Golang doesn't have a native library for advisory locks, so we might have to roll our own or vet a third party package.
The text was updated successfully, but these errors were encountered:
If two instances of the
promdump
binary manage to pass the export file existence check before writing out their first batch of metrics, they will step all over each other and produce a dump that is -- at best -- inconsistent.The easiest way to prevent this is probably creating a lock file and having each instance lock it before attempting to dump any metrics. Locks are automatically cleaned up if the process exits, so we wouldn't have to worry about them going stale even if the lock file is left around.
Unfortunately Golang doesn't have a native library for advisory locks, so we might have to roll our own or vet a third party package.
The text was updated successfully, but these errors were encountered: