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

Improve database context manager robustness #53

Open
oberstet opened this issue May 6, 2022 · 2 comments
Open

Improve database context manager robustness #53

oberstet opened this issue May 6, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@oberstet
Copy link
Contributor

oberstet commented May 6, 2022

See crossbario/crossbar#2011

We should handle:

  • LockError
  • MDB_BAD_RSLOT

in

def __enter__(self):

@oberstet
Copy link
Contributor Author

oberstet commented May 6, 2022

adding a more or less clever microsleep and auto-retry: one problem is, the context manager isn't an asynch context manager, and hence any "microsleep" will need to run synchronously. we should be good with a micro (=very short) sleep though, and hence forcing sync should not bother the app much ..

@oberstet
Copy link
Contributor Author

alright, this change should improve the situation c952f42

I'll leave this issue open for now .. as an anchor until we have more feedback in using the new code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant