Skip to content

Conversation

@adamruzicka
Copy link
Contributor

@adamruzicka adamruzicka commented Apr 12, 2023

Includes #462

Essentially it means wrapping all db interactions in the persistence adapter with retries. We don't really need the retries, but we need to wrap the db-specific errors with general dynflow persistence errors which the rest of the codebase expects.

@adamruzicka adamruzicka marked this pull request as ready for review November 12, 2025 10:36
@adamruzicka adamruzicka force-pushed the db-conn-drop branch 3 times, most recently from 2d3dd9d to e1a9865 Compare November 25, 2025 18:53
@ofedoren
Copy link

Thanks, @adamruzicka !

IIUC, this will help if a DB won't be available for cca 1 minute, and if more it will just kill the process now? If so, apologies for the newbie question, but looking at the related tickets, how will that help users to recover from the DB drop for e.g. 15 minutes? Is it a clear state that dynflow process is dead and needs to be started, is it that something will automatically try to restart the process since it's dead now?

@adamruzicka
Copy link
Contributor Author

IIUC, this will help if a DB won't be available for cca 1 minute, and if more it will just kill the process now?

Yup, that's about right. The timing isn't exact, but the breaking point between carrying on and crashing hard is somewhere around that 1 minute mark.

is it that something will automatically try to restart the process since it's dead now?

In Foreman deployment, systemd should attempt to restart it, once we move to containers I'd expect again systemd or the container runtime to monitor it and restart if needed. In worst case without anything restarting it, this would at least clearly mark it as being down, rather than leaving it "up" in a broken state.

Copy link

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given the explanation in #427 (comment) and that I'm not much familiar with dynflow internals, I don't have any concerns looking at the code changes themselves.

In other words, LGTM, but how would you like to proceed with the commits before merge?

@adamruzicka
Copy link
Contributor Author

In other words, LGTM, but how would you like to proceed with the commits before merge?

I'd prefer to get your blessing on #462 , squash and merge that and then rebase this one on top

@adamruzicka adamruzicka force-pushed the db-conn-drop branch 2 times, most recently from 7211e39 to 8f1596d Compare November 26, 2025 14:08
Essentially it means wrapping all db interactions in the persistence
adapter with retries. We don't really need the retries, but we need to
wrap the db-specific errors with general dynflow persistence errors
which the rest of the codebase expects.
Copy link

@ofedoren ofedoren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: as soon as it's green

@adamruzicka adamruzicka merged commit 25f2af6 into Dynflow:master Nov 26, 2025
11 checks passed
@adamruzicka adamruzicka deleted the db-conn-drop branch November 26, 2025 15:16
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.

2 participants