Skip to content

fix: prevent concurrent runs for same file - #802

Open
mitar wants to merge 1 commit into
nginx-proxy:mainfrom
mitar:locking
Open

mitar wants to merge 1 commit into
nginx-proxy:mainfrom
mitar:locking

Conversation

@mitar

@mitar mitar commented Oct 27, 2026

Copy link
Copy Markdown

We noticed that sometimes generated files were stale. It looks like this was happening because we use both events and signals to trigger file generation and if they happen at the same time, an old file version can be written out last. (They run in separate goroutines.)

This PR adds locking per destination file. It mostly extracts shared logic into generateConfig and adds locking per destination around it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant