-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Implement injecting sleep in go failpoints #14729
Comments
I started working on this, and then noticed that gofail doesn't disable the fail points properly through the http DELETE request: |
Thanks for looking into this! |
@serathius, sure no problem, currently I can register sleep fail point and check whether it was successfully enabled. However I am not sure when it should be deactivated. Once sleep is enabled in the code, it will trigger sleep every time when it is executed. PR: #14796 |
Wrote on #14796 that we care about failpoint execution not failpoint enablement. |
@serathius, one suggestion I have is resetting sleep duration value to 0 and deleting description in the terms field of the failpoint, once sleep is executed. |
@ramil600 Are you still working on this issue? I think this is going to be very useful. |
I can take this up and can build on ramil600 PR : #14796 |
@pchan assigned to you. To fix this you'll need etcd-io/gofail#37 first |
@ramil600 apologies for reassigning without checking with you first. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions. |
What would you like to be added?
Linearization tests only support injecting panic https://github.com/etcd-io/etcd/blob/main/tests/linearizability/failpoints.go#L33-L53, it would be useful to extend it to also support injecting a sleep. It should already be supported by gofail.
Main change that needs to be implemented is detecting that failpoint was executed. For panic it's simple, we wait for process to exit. Injecting sleep is much more subtle. I think this can be achieved by listing the failpoints via http endpoint.
Why is this needed?
This will allow for easier detection of race conditions in etcd code.
The text was updated successfully, but these errors were encountered: