-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Added support for no timeout locks on db files #494
Conversation
Hello is there any problem with this patch, or required updates? |
@rgeronimi Sorry, I'm just terrible at managing PRs. Can you add a test for this change? Otherwise it lgtm. |
Is ok, I thought there was a code reason :) |
Hello, I freed up the time to add the missing test. Unfortunately I was about to add a variant of the exact piece of code removed through I see 2 alternatives:
Unfortunately the second alternative requires an external executable (Fork and not ForkExec is not safe to call from within a Go process, as it forgets about Go runtime-related threads in the forked process) which is, depending on how and when tests are run, not trivial. Should I continue down that second alternative? If yes, I need a separate Go executable which will need to be go-built before the go-test stage begins. Do you see any simpler approach than that? Thanks |
Currently the bolt library supports timeouts for db file locking, as well as infinite timeouts. This patch adds support for no timeouts at all.