Skip to content
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

tests: add robustness test for issue 17780 #18099

Merged
merged 1 commit into from
Nov 13, 2024
Merged

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented May 30, 2024

@k8s-ci-robot
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@fuweid
Copy link
Member Author

fuweid commented May 30, 2024

ping @ahrtr @serathius @siyuanfoundation

@@ -61,6 +61,18 @@ var (
{choice: LargePut, weight: 5},
},
}
// Issue17780EtcdPutDelete is to create high chance to have more delete
// requests so that it's likely to compact that revision which is tombstone.
Issue17780EtcdPutDelete = etcdTraffic{
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this be inline if it is not used by any other tests?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean inline is about anonymous value during assignment?
etcdTraffic is unexported type and choiceWeight is alsog unexported type...
I think it's hard to make it inline if I understand it correctly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see. How about just name it to EtcdPutDeleteHeavy?

Copy link
Member

@serathius serathius May 31, 2024

Choose a reason for hiding this comment

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

+1 merging it with other traffic and incorporating it with exploratory testing.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @siyuanfoundation @serathius , I want to keep it with special name here because it's hard to reproduce it without special input or setting. If we put it into exploratory testing, existing case might have chance to reproduce it. But it's unknown for us. I was trying many combinations of traffic but it runs one day without luck. And then we introduce compact traffic, it also makes it hard to trigger issue 17780.

If you have better idea, please let me know. Thanks

Copy link
Member

Choose a reason for hiding this comment

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

I would prefer to avoid having a issue specific traffic, to prevent regressions in robustness we don't need 100% reproducability, about 2-5% is ok.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was trying to use existing traffic to reproduce it. Unfortunately, I run it for 3 days. No luck :(

Copy link
Member

Choose a reason for hiding this comment

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

let me take a look at it

@serathius
Copy link
Member

I would like to better understand why this is not aligned with exploratory tests. The goal is to incorporate regressions into exploratory testing, not just create a new scenario.

Comment on lines 62 to 70

// AllowBatchCompactBeforeSetFinishedCompactPanic is used to trigger
// that compactBeforeSetFinishedCompact failpoint only if the current
// revision number is higher than that batch limit.
AllowBatchCompactBeforeSetFinishedCompactPanic Failpoint = goPanicFailpoint{
failpoint: "compactBeforeSetFinishedCompact",
trigger: triggerCompact{multiBatchCompaction: true},
target: AnyMember,
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// AllowBatchCompactBeforeSetFinishedCompactPanic is used to trigger
// that compactBeforeSetFinishedCompact failpoint only if the current
// revision number is higher than that batch limit.
AllowBatchCompactBeforeSetFinishedCompactPanic Failpoint = goPanicFailpoint{
failpoint: "compactBeforeSetFinishedCompact",
trigger: triggerCompact{multiBatchCompaction: true},
target: AnyMember,
}
CompactBeforeSetFinishedCompactPanic Failpoint = goPanicFailpoint{"compactBeforeSetFinishedCompact", triggerCompact{multiBatchCompaction: true}, AnyMember}

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi @serathius , CompactBeforeSetFinishedCompactPanic is already existing at

CompactBeforeSetFinishedCompactPanic Failpoint = goPanicFailpoint{"compactBeforeSetFinishedCompact", triggerCompact{}, AnyMember}
Do you mean that I should replace existing one?

I add new one here because this issue has a requirement that the compactor has to delete tombstone in one batch and update UnsafeSetFinishedCompact value in next round. IMO, it's better to have two go-failpoints here.

Copy link
Member

Choose a reason for hiding this comment

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

We can have both, best to even duplicate all failpoints with triggerCompact to have option with and without multiBatchCompaction.

@serathius
Copy link
Member

serathius commented Jun 15, 2024

See #17680 for an example of how to add new repro. I adjusted couple of parameters.

@serathius
Copy link
Member

ping any progress?

@fuweid
Copy link
Member Author

fuweid commented Nov 11, 2024

Hi @serathius I switched to use kubernetes profile and can reproduce it in my local.
I pick up 300 as batch limit and this value might be different from different local env.
Anyway, I can reproduce it without introducing new profile. :)

/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): {"level":"info","ts":"2024-11-11T20:23:03.747816Z","caller":"mvcc/index.go:214","msg":"compact tree index","revision":301}
    logger.go:146: 2024-11-11T20:23:03.748Z	INFO	Waiting for member to exit	{"member": "TestRobustnessRegressionIssue17780-test-0"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): panic: failpoint panic: {}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032):
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): goroutine 181 [running]:
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/gofail/runtime.actPanic(0x2?)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/[email protected]/runtime/terms.go:324 +0xc6
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/gofail/runtime.(*term).do(...)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/[email protected]/runtime/terms.go:293
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/gofail/runtime.(*terms).eval(0xc0008e9360)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/[email protected]/runtime/terms.go:108 +0xec
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/gofail/runtime.(*Failpoint).Acquire(0x12c?)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/[email protected]/runtime/failpoint.go:45 +0x71
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/etcd/server/v3/mvcc.(*store).scheduleCompaction(0xc00038f520, 0x12d, 0xffffffffffffffff)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/etcd/server/v3/mvcc/kvstore_compaction.go:62 +0x6ed
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/etcd/server/v3/mvcc.(*store).compact.func1({0x12bab08, 0xc000040a00})
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/etcd/server/v3/mvcc/kvstore.go:247 +0x85
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): go.etcd.io/etcd/pkg/v3/schedule.(*fifo).run(0xc0001324e0)
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/etcd/pkg/[email protected]/schedule/schedule.go:157 +0x105
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): created by go.etcd.io/etcd/pkg/v3/schedule.NewFIFOScheduler in goroutine 1
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): 	go.etcd.io/etcd/pkg/[email protected]/schedule/schedule.go:70 +0x156
    logger.go:146: 2024-11-11T20:23:03.772Z	INFO	server exited	{"name": "TestRobustnessRegressionIssue17780-test-0", "code": 2}
    logger.go:146: 2024-11-11T20:23:03.772Z	INFO	Member exited as expected	{"member": "TestRobustnessRegressionIssue17780-test-0"}
    logger.go:146: 2024-11-11T20:23:03.773Z	INFO	starting server...	{"name": "TestRobustnessRegressionIssue17780-test-0"}
    logger.go:146: 2024-11-11T20:23:03.773Z	INFO	spawning process	{"args": ["/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd", "--name=TestRobustnessRegressionIssue17780-test-0", "--listen-client-urls=http://localhost:20000", "--advertise-client-urls=http://localhost:20000", "--listen-peer-urls=http://localhost:20001", "--initial-advertise-peer-urls=http://localhost:20001", "--initial-cluster-token=new", "--data-dir", "/tmp/TestRobustnessRegressionIssue17780506300824/001", "--snapshot-count=1000", "--snapshot-count=1000", "--initial-cluster-token=new", "--experimental-compaction-batch-limit=300", "--initial-cluster=TestRobustnessRegressionIssue17780-test-0=http://localhost:20001", "--initial-cluster-state=new"], "working-dir": "/tmp/TestRobustnessRegression120504966/001", "name": "TestRobustnessRegressionIssue17780-test-0", "environment-variables": ["GOFAIL_HTTP=127.0.0.1:12381", "ETCD_VERIFY=all", "EXPECT_DEBUG=true", "PATH=/home/weifu/go/pkg/mod/golang.org/[email protected]/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/weifu/.fzf/bin:/usr/local/go/bin:/home/weifu/go/bin:/opt/bin:/opt/fuwei/bin:/usr/local/go/bin:/home/weifu/go/bin:/opt/bin:/opt/fuwei/bin:/usr/local/go/bin:/home/weifu/go/bin:/opt/bin:/opt/fuwei/bin", "ETCD_UNSUPPORTED_ARCH=amd64"]}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.783792Z","caller":"flags/flag.go:93","msg":"unrecognized environment variable","environment-variable":"ETCD_VERIFY=all"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.783843Z","caller":"flags/flag.go:93","msg":"unrecognized environment variable","environment-variable":"ETCD_UNSUPPORTED_ARCH=amd64"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.784023Z","caller":"embed/config.go:679","msg":"Running http and grpc server on single port. This is not recommended for production."}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.784065Z","caller":"etcdmain/etcd.go:73","msg":"Running: ","args":["/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd","--name=TestRobustnessRegressionIssue17780-test-0","--listen-client-urls=http://localhost:20000","--advertise-client-urls=http://localhost:20000","--listen-peer-urls=http://localhost:20001","--initial-advertise-peer-urls=http://localhost:20001","--initial-cluster-token=new","--data-dir","/tmp/TestRobustnessRegressionIssue17780506300824/001","--snapshot-count=1000","--snapshot-count=1000","--initial-cluster-token=new","--experimental-compaction-batch-limit=300","--initial-cluster=TestRobustnessRegressionIssue17780-test-0=http://localhost:20001","--initial-cluster-state=new"]}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.784148Z","caller":"etcdmain/etcd.go:116","msg":"server has been already initialized","data-dir":"/tmp/TestRobustnessRegressionIssue17780506300824/001","dir-type":"member"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.784181Z","caller":"embed/config.go:679","msg":"Running http and grpc server on single port. This is not recommended for production."}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.784202Z","caller":"embed/etcd.go:127","msg":"configuring peer listeners","listen-peer-urls":["http://localhost:20001"]}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.78472Z","caller":"embed/etcd.go:135","msg":"configuring client listeners","listen-client-urls":["http://localhost:20000"]}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.784833Z","caller":"embed/etcd.go:308","msg":"starting an etcd server","etcd-version":"3.5.13","git-sha":"c9063a0-FAILPOINTS","go-version":"go1.22.2","go-os":"linux","go-arch":"amd64","max-cpu-set":8,"max-cpu-available":8,"member-initialized":true,"name":"TestRobustnessRegressionIssue17780-test-0","data-dir":"/tmp/TestRobustnessRegressionIssue17780506300824/001","wal-dir":"","wal-dir-dedicated":"","member-dir":"/tmp/TestRobustnessRegressionIssue17780506300824/001/member","force-new-cluster":false,"heartbeat-interval":"100ms","election-timeout":"1s","initial-election-tick-advance":true,"snapshot-count":1000,"max-wals":5,"max-snapshots":5,"snapshot-catchup-entries":5000,"initial-advertise-peer-urls":["http://localhost:20001"],"listen-peer-urls":["http://localhost:20001"],"advertise-client-urls":["http://localhost:20000"],"listen-client-urls":["http://localhost:20000"],"listen-metrics-urls":[],"cors":["*"],"host-whitelist":["*"],"initial-cluster":"","initial-cluster-state":"new","initial-cluster-token":"","quota-backend-bytes":2147483648,"max-request-bytes":1572864,"max-concurrent-streams":4294967295,"pre-vote":true,"initial-corrupt-check":false,"corrupt-check-time-interval":"0s","compact-check-time-enabled":false,"compact-check-time-interval":"1m0s","auto-compaction-mode":"periodic","auto-compaction-retention":"0s","auto-compaction-interval":"0s","discovery-url":"","discovery-proxy":"","downgrade-check-interval":"5s"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.789807Z","caller":"etcdserver/backend.go:81","msg":"opened backend db","path":"/tmp/TestRobustnessRegressionIssue17780506300824/001/member/snap/db","took":"4.809657ms"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.790272Z","caller":"etcdserver/server.go:532","msg":"No snapshot found. Recovering WAL from scratch!"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.790861Z","caller":"etcdserver/raft.go:530","msg":"restarting local member","cluster-id":"34f27e83b3bc2ff","local-member-id":"ca50e9357181d758","commit-index":442}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.790965Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"ca50e9357181d758 switched to configuration voters=()"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.791005Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"ca50e9357181d758 became follower at term 2"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.791028Z","logger":"raft","caller":"etcdserver/zap_raft.go:77","msg":"newRaft ca50e9357181d758 [peers: [], term: 2, commit: 442, applied: 0, lastindex: 442, lastterm: 2]"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.79358Z","caller":"auth/store.go:1241","msg":"simple token is not cryptographically signed"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.796085Z","caller":"mvcc/kvstore.go:407","msg":"kvstore restored","current-rev":300}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.796109Z","caller":"mvcc/kvstore.go:411","msg":"compaction encountered error","error":"mvcc: required revision is a future revision"}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.796142Z","caller":"mvcc/kvstore.go:414","msg":"resume scheduled compaction","meta-bucket-name":"meta","meta-bucket-name-key":"scheduledCompactRev","scheduled-compact-revision":301}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582032): {"level":"info","ts":"2024-11-11T20:23:03.747816Z","caller":"mvcc/index.go:214","msg":"compact tree index","revision":301}

/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"info","ts":"2024-11-11T20:23:03.796085Z","caller":"mvcc/kvstore.go:407","msg":"kvstore restored","current-rev":300}
/tmp/etcd-v3.5.13-compactBeforeSetFinishedCompact/bin/etcd (TestRobustnessRegressionIssue17780-test-0) (2582049): {"level":"warn","ts":"2024-11-11T20:23:03.796109Z","caller":"mvcc/kvstore.go:411","msg":"compaction encountered error","error":"mvcc: required revision is a future revision"}

ping @ahrtr @ivanvc @jmhbnz

@codecov-commenter
Copy link

codecov-commenter commented Nov 11, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 23.07692% with 20 lines in your changes missing coverage. Please review.

Project coverage is 68.83%. Comparing base (bd88963) to head (aa22d0a).
Report is 40 commits behind head on main.

Current head aa22d0a differs from pull request most recent head fdfb5c0

Please upload reports for the commit fdfb5c0 to get more accurate results.

Files with missing lines Patch % Lines
server/storage/backend/backend.go 18.18% 9 Missing ⚠️
etcdctl/ctlv3/command/printer.go 0.00% 3 Missing ⚠️
etcdctl/ctlv3/command/check.go 0.00% 2 Missing ⚠️
server/embed/serve.go 0.00% 1 Missing and 1 partial ⚠️
etcdutl/etcdutl/snapshot_command.go 0.00% 1 Missing ⚠️
server/etcdserver/api/rafthttp/http.go 66.66% 0 Missing and 1 partial ⚠️
server/etcdserver/apply_v2.go 0.00% 0 Missing and 1 partial ⚠️
server/lease/leasehttp/http.go 0.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
Files with missing lines Coverage Δ
etcdctl/ctlv3/command/elect_command.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/ep_command.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/lease_command.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/printer_fields.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/printer_simple.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/printer_table.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/snapshot_command.go 0.00% <ø> (ø)
etcdctl/ctlv3/command/user_command.go 0.00% <ø> (ø)
etcdctl/ctlv3/ctl.go 0.00% <ø> (ø)
etcdutl/ctl.go 0.00% <ø> (ø)
... and 13 more

... and 22 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18099      +/-   ##
==========================================
+ Coverage   68.78%   68.83%   +0.05%     
==========================================
  Files         420      420              
  Lines       35523    35532       +9     
==========================================
+ Hits        24433    24459      +26     
+ Misses       9665     9652      -13     
+ Partials     1425     1421       -4     

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 bd88963...fdfb5c0. Read the comment docs.

@ahrtr
Copy link
Member

ahrtr commented Nov 12, 2024

I pick up 300 as batch limit and this value might be different from different local env.
Anyway, I can reproduce it without introducing new profile. :)

A quick question, did you reproduce the issue on the latest code of main branch or did you just reproduce it on the code before the fix?

@@ -72,7 +72,7 @@ func (t triggerCompact) Trigger(ctx context.Context, _ *testing.T, member e2e.Et
return nil, fmt.Errorf("failed to get revision: %w", err)
}

if !t.multiBatchCompaction || rev > int64(clus.Cfg.ServerConfig.ExperimentalCompactionBatchLimit) {
if !t.multiBatchCompaction || rev >= int64(clus.Cfg.ServerConfig.ExperimentalCompactionBatchLimit) {
Copy link
Member

Choose a reason for hiding this comment

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

How this change is related? Does it help with repro? I assumed ">" was intentional as we want have additional revision to ensure 2 batches execute.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah. Reverted this change.

Copy link
Member

@serathius serathius left a comment

Choose a reason for hiding this comment

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

Managed to reproduce the issue within ~100 runs.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

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

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

The pull request process is described here

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

@fuweid
Copy link
Member Author

fuweid commented Nov 12, 2024

A quick question, did you reproduce the issue on the latest code of main branch or did you just reproduce it on the code before the fix?

Hi @ahrtr , I can't reproduce this issue on main branch. It's used to reproduce it on the code before the fix.
This test scenario also applies to main branch just in case there is regression.

@fuweid
Copy link
Member Author

fuweid commented Nov 12, 2024

/retest

@serathius serathius merged commit b7ad87f into etcd-io:main Nov 13, 2024
32 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.

Revision decreasing after panic during compaction
6 participants