-
Notifications
You must be signed in to change notification settings - Fork 10.2k
[Robustness test] Patch the return time during validation with MaxInt64 in robustness test #19633
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
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: henrybear327 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
5d466a1 to
73627ed
Compare
73627ed to
142bde5
Compare
|
@serathius for the record, the robustness test that I ran locally over lunch passed. As discussed on Slack, I will now:
If all is good, we modify the logic to not set the return value to |
|
|
|
One force-generated report TestRobustnessExploratory_EtcdHighTraffic_ClusterOfSize3_blackholePeerNetwork.zip |
142bde5 to
660229b
Compare
660229b to
518df1b
Compare
518df1b to
0ca3d3c
Compare
|
|
||
| func (h History) Operations() []porcupine.Operation { | ||
| operations := make([]porcupine.Operation, 0, len(h.operations)) | ||
| maxTime := h.lastObservedTime() |
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.
@serathius Because of this removal, the unit tests would have to be updated, due to this pre-condition failing.
But if I am not mistaken, each client is sending the requests sequentially, thus, the requests in the tests can be non-overlapping / sequentially executed requests, right?
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.
Yes, updating unit tests here makes sense.
968ab20 to
8ee6e98
Compare
| func uniquePutReturnTime(allOperations []porcupine.Operation, reports []report.ClientReport, persistedRequests []model.EtcdRequest, clientPutCount map[keyValue]int64) map[keyValue]int64 { | ||
| func uniquePutReturnTime(allOperations []porcupine.Operation, reports []report.ClientReport, clientPutCount map[keyValue]int64) map[keyValue]int64 { | ||
| earliestReturnTime := map[keyValue]int64{} | ||
| var lastReturnTime int64 |
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.
@serathius can you help me understand what's the purpose of this variable? :) I am not sure what case is this variable trying to cover after reading through and experimenting with it during bug fixing.
Thank you!
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 was not expecting need to change this code. Please revert
Reference: - etcd-io#19579 Signed-off-by: Chun-Hung Tseng <[email protected]>
8ee6e98 to
a1c249b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 58 files with indirect coverage changes @@ Coverage Diff @@
## main #19633 +/- ##
==========================================
+ Coverage 64.12% 68.78% +4.65%
==========================================
Files 421 421
Lines 35854 35854
==========================================
+ Hits 22993 24661 +1668
+ Misses 11443 9764 -1679
- Partials 1418 1429 +11 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/retest |
| operations []porcupine.Operation, | ||
| timeout time.Duration, | ||
| ) (results Results) { | ||
| operations = patchResponseTimeOfFailedOperations(operations) |
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.
This should happen before we patch operations, because then patching will not have opportunity to modify the return time.
| persistedPutCount := countPersistedPuts(persistedRequests) | ||
| clientPutCount := countClientPuts(reports) | ||
| putReturnTime := uniquePutReturnTime(allOperations, reports, persistedRequests, clientPutCount) | ||
| putReturnTime := uniquePutReturnTime(allOperations, reports, clientPutCount) |
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.
Please revert
|
Discussed offline, we will start a new PR with minimal changes and improved append validation rules. |
Instead of marking the return time with -1 during operation data collection phase, we patch the failed request's response time during validation so we get to preserve the original data, and we get to avoid the problem we see mentioned in issue #19579.
Reference: #19579
Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.