-
Notifications
You must be signed in to change notification settings - Fork 10.2k
[release-3.6] deflakey: TestCompactionHash in integration #19541
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
[release-3.6] deflakey: TestCompactionHash in integration #19541
Conversation
We should use WithCompactPhysical to wait for compaction to finish,
because 50ms sleep can't guarantee compaction is done.
Based on the log, the defragment is finished before compaction, which is
not expected. This patch is to make sure compaction should be finished
before assertation.
```
=========================== defragment ==============
logger.go:146: 2025-02-27T07:57:18.652Z INFO m0 finished defragment {"member": "m0"}
=====================================================
logger.go:146: 2025-02-27T07:57:18.652Z INFO m0 grpc service status changed {"member": "m0", "service": "", "status": "SERVING"}
logger.go:146: 2025-02-27T07:57:18.653Z INFO grpc [[core] [Channel etcd-io#1457]Channel Connectivity change to SHUTDOWN]
logger.go:146: 2025-02-27T07:57:18.653Z INFO grpc [[core] [Channel etcd-io#1457]Closing the name resolver]
logger.go:146: 2025-02-27T07:57:18.653Z INFO grpc [[core] [Channel etcd-io#1457]ccBalancerWrapper: closing]
logger.go:146: 2025-02-27T07:57:18.653Z INFO grpc [[core] [Channel etcd-io#1457 SubChannel etcd-io#1458]Subchannel Connectivity change to SHUTDOWN]
logger.go:146: 2025-02-27T07:57:18.653Z INFO grpc [[core] [Channel etcd-io#1457 SubChannel etcd-io#1458]Subchannel deleted]
logger.go:146: 2025-02-27T07:57:18.654Z INFO grpc [[transport] [client-transport 0xc00237bd48] Closing: rpc error: code = Canceled desc = grpc: the client connection is closing]
logger.go:146: 2025-02-27T07:57:18.654Z INFO grpc [[transport] [client-transport 0xc00237bd48] loopyWriter exiting with error: rpc error: code = Canceled desc = grpc: the client connection is closing]
logger.go:146: 2025-02-27T07:57:18.654Z INFO grpc [[transport] [server-transport 0xc0006bb520] Closing: EOF]
logger.go:146: 2025-02-27T07:57:18.654Z INFO grpc [[core] [Channel etcd-io#1457]Channel deleted]
logger.go:146: 2025-02-27T07:57:18.654Z INFO grpc [[transport] [server-transport 0xc0006bb520] loopyWriter exiting with error: transport closed by client]
hash.go:82:
Error Trace: /home/prow/go/src/github.com/etcd-io/etcd/server/storage/mvcc/testutil/hash.go:82
/home/prow/go/src/github.com/etcd-io/etcd/server/storage/mvcc/testutil/hash.go:44
Error: Not equal:
expected: testutil.KeyValueHash{Hash:0x94694091, CompactRevision:1278, Revision:2507}
actual : testutil.KeyValueHash{Hash:0x58af47dc, CompactRevision:2488, Revision:2507}
Diff:
--- Expected
+++ Actual
@@ -1,4 +1,4 @@
(testutil.KeyValueHash) {
- Hash: (uint32) 2489925777,
- CompactRevision: (int64) 1278,
+ Hash: (uint32) 1487882204,
+ CompactRevision: (int64) 2488,
Revision: (int64) 2507
Test: TestCompactionHash
Messages: hashes do not match on rev 2488
cluster.go:1423: ========= Cluster termination started =====================
logger.go:146: 2025-02-27T07:57:18.655Z INFO grpc [[core] [Channel etcd-io#1377]Channel Connectivity change to SHUTDOWN]
logger.go:146: 2025-02-27T07:57:18.655Z INFO grpc [[core] [Channel etcd-io#1377]Closing the name resolver]
logger.go:146: 2025-02-27T07:57:18.655Z INFO grpc [[core] [Channel etcd-io#1377]ccBalancerWrapper: closing]
logger.go:146: 2025-02-27T07:57:18.656Z INFO grpc [[core] [Channel etcd-io#1377 SubChannel etcd-io#1378]Subchannel Connectivity change to SHUTDOWN]
logger.go:146: 2025-02-27T07:57:18.656Z INFO grpc [[core] [Channel etcd-io#1377 SubChannel etcd-io#1378]Subchannel deleted]
logger.go:146: 2025-02-27T07:57:18.656Z INFO grpc [[transport] [client-transport 0xc0025f2248] Closing: rpc error: code = Canceled desc = grpc: the client connection is closing]
logger.go:146: 2025-02-27T07:57:18.656Z INFO grpc [[transport] [client-transport 0xc0025f2248] loopyWriter exiting with error: rpc error: code = Canceled desc = grpc: the client connection is closing]
logger.go:146: 2025-02-27T07:57:18.656Z INFO grpc [[transport] [server-transport 0xc000b56ea0] Closing: EOF]
=========================== compaction ==============
logger.go:146: 2025-02-27T07:57:18.656Z INFO m0 finished scheduled compaction {"member": "m0", "compact-revision": 2488, "took": "129.590742ms", "hash": 2489925777, "current-db-size-bytes": 40960, "current-db-size": "41 kB", "current-db-size-in-use-bytes": 40960, "current-db-size-in-use": "41 kB"}
=====================================================
```
Fixes: etcd-io#19497
Signed-off-by: Wei Fu <[email protected]>
|
Hi @k8s-infra-cherrypick-robot. Thanks for your PR. I'm waiting for a etcd-io member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
/ok-to-test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted filessee 24 files with indirect coverage changes @@ Coverage Diff @@
## release-3.6 #19541 +/- ##
===============================================
- Coverage 68.95% 68.92% -0.03%
===============================================
Files 420 420
Lines 35788 35788
===============================================
- Hits 24677 24668 -9
- Misses 9686 9693 +7
- Partials 1425 1427 +2 Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
/retest |
ivanvc
left a comment
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.
LGTM.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ahrtr, ivanvc, k8s-infra-cherrypick-robot 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 |
This is an automated cherry-pick of #19538
/assign ahrtr