-
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
linearizability tests - Add support for delete api #14802
Conversation
Codecov Report
@@ Coverage Diff @@
## main #14802 +/- ##
==========================================
- Coverage 75.64% 75.44% -0.20%
==========================================
Files 457 457
Lines 37423 37416 -7
==========================================
- Hits 28309 28230 -79
- Misses 7347 7403 +56
- Partials 1767 1783 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Please mark it |
tests/linearizability/model.go
Outdated
@@ -119,6 +129,9 @@ func initState(request etcdRequest, response etcdResponse) EtcdState { | |||
} else { | |||
state.FailedWrites[request.putData] = struct{}{} | |||
} | |||
case Delete: | |||
//TODO should state have 'deleted' field? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed.
You still need to integrate tests into
to
And add a case |
We are also missing tests for failed |
Overall it looks good, just need to handle delete errors. Great job! |
Checked the linearizability failure. As expected it's an issue with handling Delete error. Linearizability tests reported error as Get returned empty string. There is a missing Delete request in the graph. We need to also track failed requests as fail can a network error from perspective from client, but etcd managed to persist it. |
Can you fix DCO check? This can be done automatically on latest commit via As there are some more commits to be updated you should be able to do that with |
I started testing the model and found issues related to put request failed but was persisted and following delete checks if object was deleted. Will keep you posted if I figure out a solution. |
Signed-off-by: Geeta Gharpure <[email protected]>
Signed-off-by: Geeta Gharpure <[email protected]>
9edfdb3
to
1d82f4d
Compare
Signed-off-by: Marek Siarkowicz <[email protected]>
Signed-off-by: Marek Siarkowicz <[email protected]>
notes -
or - |
Marking ready for review based on checked - https://github.com/etcd-io/etcd/pull/14802/checks |
|
||
func stepDelete(state EtcdState, request etcdRequest, response etcdResponse) (bool, EtcdState) { | ||
if response.err != nil { | ||
state.FailedWrites[""] = struct{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
state.FailedWrites[""] = struct{}{} | |
state.FailedWrites[state.Value] = struct{}{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to record whatever value in state in FailedWrites
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, this PR doesn't implement correct handling of failed delete requests. I looked into fixing this, however code got so complicated that I decided to change our approach of handling errors. This PR without #14880 will introduce flakiness. I would be ok to merge this PR first assuming that we will merge #14880 right after. |
All PRs approved, let's start merging. |
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.