Skip to content
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

Add support for specifying lock timeout for declarative workflow #2915

Open
tonycosentini opened this issue Jul 2, 2024 · 3 comments
Open

Comments

@tonycosentini
Copy link

(Sorry if this exists, I couldn't find it when searching through the docs/source.)

Is it possible to add an option to set the lock timeout for atlas schema apply?

I have a use case for some high write-throughput tables where we need to run with a very low lock timeout to prevent performance issues (basically we use this workflow with a low lock timeout that retries until it can safely get the lock and apply the change).

@a8m
Copy link
Member

a8m commented Jul 2, 2024

Hey! If you're using the latest builds (and logged in), you can use the migration hooks for the declarative workflow as well - I'll update the docs.

Let me know if this helps, or you need more assistance.

@tonycosentini
Copy link
Author

Are there no plans to just have a plain old parameter like --lock-timeout in the migrations-based flow?

@a8m
Copy link
Member

a8m commented Jul 3, 2024

The lock-timeout defines the maximum duration that Atlas waits to acquire an advisory lock before starting the migration, ensuring that there are no concurrent runs. It does not set the session/transaction lock_timeout.

This flag name is ambiguous, so I think we should change it to wait_timeout instead.

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

No branches or pull requests

2 participants