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

mvcc/*_test.go: should not use duplicate revision.Main for one key #18321

Conversation

fuweid
Copy link
Member

@fuweid fuweid commented Jul 14, 2024

In commit [1], the newTestKeyIndex function creates one key with two Revision{Main: 14} revisions. However, starting from version [2], etcd server does not allow duplicate keys in a single transaction. This update to newTestKeyIndex is to avoid confusion and ensure consistency with the latest etcd server behavior.

REF:

Please read https://github.com/etcd-io/etcd/blob/main/CONTRIBUTING.md#contribution-flow.

In commit [[1]], the newTestKeyIndex function creates one key with two
Revision{Main: 14} revisions. However, starting from version [[2]], etcd server
does not allow duplicate keys in a single transaction. This update to
newTestKeyIndex is to avoid confusion and ensure consistency with the
latest etcd server behavior.

REF:

[1]: etcd-io@be80d11
[2]: etcd-io#4376

Signed-off-by: Wei Fu <fuweid89@gmail.com>
@codecov-commenter
Copy link

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.95%. Comparing base (f0612bb) to head (46b112c).

Current head 46b112c differs from pull request most recent head 5e178e2

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

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

Additional details and impacted files

see 29 files with indirect coverage changes

@@            Coverage Diff             @@
##             main   #18321      +/-   ##
==========================================
+ Coverage   68.87%   68.95%   +0.08%     
==========================================
  Files         417      417              
  Lines       35333    35333              
==========================================
+ Hits        24334    24365      +31     
+ Misses       9577     9556      -21     
+ Partials     1422     1412      -10     

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 f0612bb...5e178e2. Read the comment docs.

@fuweid
Copy link
Member Author

fuweid commented Jul 14, 2024

/retest

Copy link
Member

@ahrtr ahrtr left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks

@ahrtr
Copy link
Member

ahrtr commented Jul 14, 2024

Link to #18089

@ahrtr
Copy link
Member

ahrtr commented Jul 14, 2024

The first next step as mentioned in #18274 (comment)

@ahrtr
Copy link
Member

ahrtr commented Jul 19, 2024

Copy link
Contributor

@siyuanfoundation siyuanfoundation left a comment

Choose a reason for hiding this comment

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

Thanks for fixing the confusion :)

Copy link
Member

@jmhbnz jmhbnz left a comment

Choose a reason for hiding this comment

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

LGTM - Thanks @fuweid

Copy link
Member

@ivanvc ivanvc left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks, @fuweid.

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, fuweid, ivanvc, jmhbnz, siyuanfoundation

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

@ahrtr ahrtr merged commit d6c0127 into etcd-io:main Jul 20, 2024
43 checks passed
fuweid added a commit to fuweid/etcd that referenced this pull request Aug 17, 2024
Backport of etcd-io#18321

Signed-off-by: Wei Fu <fuweid89@gmail.com>
fuweid added a commit to fuweid/etcd that referenced this pull request Aug 18, 2024
Backport of etcd-io#18321

Signed-off-by: Wei Fu <fuweid89@gmail.com>
@fuweid fuweid deleted the mvcc-test/should-not-allow-duplicate-keys-in-one-txn branch August 18, 2024 12:57
aneesh1 pushed a commit to DataDog/etcd that referenced this pull request Sep 25, 2024
Backport of etcd-io#18321

Signed-off-by: Wei Fu <fuweid89@gmail.com>
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.

7 participants