Skip to content

Use static list of keys in model#21486

Merged
serathius merged 1 commit intoetcd-io:mainfrom
serathius:robustness-static
Apr 11, 2026
Merged

Use static list of keys in model#21486
serathius merged 1 commit intoetcd-io:mainfrom
serathius:robustness-static

Conversation

@serathius
Copy link
Copy Markdown
Member

@serathius serathius commented Mar 15, 2026

Continuation of #19973
PoC for #21133

After improvements in #21488

goos: linux
goarch: amd64
pkg: go.etcd.io/etcd/tests/v3/robustness/validate
cpu: AMD Ryzen Threadripper PRO 3945WX 12-Cores     
                                                               │   old.txt    │               new.txt               │
                                                               │    sec/op    │   sec/op     vs base                │
ValidateLinearizableOperations/SequentialSuccessPuts-24           17.14m ± 3%   15.09m ± 3%  -11.97% (p=0.000 n=10)
ValidateLinearizableOperations/SequentialFailedPuts-24            15.68m ± 2%   10.89m ± 1%  -30.57% (p=0.000 n=10)
ValidateLinearizableOperations/ConcurrentFailedPutsWithRead-24    16.61m ± 2%   12.92m ± 2%  -22.23% (p=0.000 n=10)
ValidateLinearizableOperations/ConcurrentFailedPuts-24            18.42m ± 1%   12.09m ± 3%  -34.38% (p=0.000 n=10)
ValidateLinearizableOperations/BacktrackingHeavy-24              26.638m ± 1%   1.521m ± 1%  -94.29% (p=0.000 n=10)
geomean                                                           18.54m        8.284m       -55.32%

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.37%. Comparing base (59a250f) to head (711d868).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files

see 25 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #21486      +/-   ##
==========================================
+ Coverage   68.30%   68.37%   +0.06%     
==========================================
  Files         429      429              
  Lines       35389    35389              
==========================================
+ Hits        24172    24196      +24     
+ Misses       9809     9785      -24     
  Partials     1408     1408              

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59a250f...711d868. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@serathius serathius force-pushed the robustness-static branch 5 times, most recently from 42756c1 to 458d1cf Compare March 23, 2026 16:37
@serathius serathius force-pushed the robustness-static branch from 458d1cf to edb9dc3 Compare April 6, 2026 16:34
@serathius
Copy link
Copy Markdown
Member Author

/retest

@serathius
Copy link
Copy Markdown
Member Author

/test pull-etcd-robustness-amd64
/test pull-etcd-robustness-arm64

@serathius
Copy link
Copy Markdown
Member Author

/cc @nwnt @henrybear327
Should be good to review.

Comment thread tests/robustness/model/describe.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/replay.go Outdated
Comment thread tests/robustness/validate/operations_test.go Outdated
@serathius serathius force-pushed the robustness-static branch 2 times, most recently from ff35e8b to 4c0ab2b Compare April 7, 2026 09:14
@serathius
Copy link
Copy Markdown
Member Author

Extracted #21578

@serathius
Copy link
Copy Markdown
Member Author

PTAL @nwnt @henrybear327 @fuweid

Comment thread tests/robustness/model/describe.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/deterministic.go
Comment thread tests/robustness/model/deterministic.go
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/deterministic.go Outdated
Comment thread tests/robustness/model/replay.go Outdated
err = errBrokePrevKV
if event.PrevValue != nil {
val, ok := state.GetValue(event.Key)
if !ok {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I'm making things too complicated just to avoid the duplication...

Suggested change
if !ok {
var previousValueErrField *zap.Field
switch {
case !ok:
previousValueErrField = &zap.Any("previousValue", nil)
case *event.PrevValue != *val:
previousValueErrField = &zap.Any("previousValue", nil)
}
if previousValueErrField != nil {
lg.Error("Incorrect event prevValue field", zap.Int("client", report.ClientID), zap.Any("event", event), zap.Any("previousValue", *previousValueErrField))
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meant to highlight the whole if/else statement.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not mix refactor and feature work.

@serathius serathius force-pushed the robustness-static branch 5 times, most recently from 3224417 to 0449ae9 Compare April 9, 2026 12:35
@serathius serathius force-pushed the robustness-static branch from 0449ae9 to 912053f Compare April 9, 2026 12:36
@serathius
Copy link
Copy Markdown
Member Author

Extracted #21597 to make review easier.

Comment thread tests/robustness/model/describe.go
Comment thread tests/robustness/model/non_deterministic.go Outdated
@k8s-ci-robot
Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: henrybear327, serathius

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@serathius serathius force-pushed the robustness-static branch 3 times, most recently from 90bd616 to 95a5f67 Compare April 11, 2026 16:11
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
Co-authored-by: Nont <9658731+nwnt@users.noreply.github.com>
@serathius serathius merged commit 2798ad7 into etcd-io:main Apr 11, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants