-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
Remove v2 apply logic #16989
Remove v2 apply logic #16989
Conversation
c9b4af3
to
2e2536c
Compare
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
Need to remove the unused function |
6f78a84
to
b316a4f
Compare
9835a60
to
32b8885
Compare
Could you breakdown this PR into 2+ PRs?
|
5eb1a4e
to
9ebd89e
Compare
9ebd89e
to
2c011a4
Compare
Done |
ffd42f3
to
276c811
Compare
All the subsequent PRs were merged. ping @ahrtr for review. For simplicity I have opted to not delete the code, just to an early check and panic. This allows to make logic change very clear and visible. We can clean up the code slowly in subsequent PR. |
/retest |
/retest |
1 similar comment
/retest |
v2 store is no longer available in v3.6. We can remove apply logic for it as they will never be used. Only v2 PUT is neeeded as it applies to v3 storage and etcd v3.5 uses it for setting member attributes and cluster version. Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
276c811
to
ed3375e
Compare
@@ -58,6 +58,34 @@ func TestV2DeprecationNotYet(t *testing.T) { | |||
assert.NoError(t, err) | |||
} | |||
|
|||
func TestV2DeprecationWriteOnlyWAL(t *testing.T) { |
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.
Note: this case won't work anymore if we bootstrap etcd based on v3store. But that isn't finalized yet, and may not be done in 3.6. But please let's add a comment/note.
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.
We might need to update the test, however the test is still relevant.
v2 store is no longer available in v3.6.
We can remove apply logic for it as they will never be used.
Only V2 PUT is needed as it applies to v3 storage and etcd v3.5 uses it for setting member attributes and cluster version.
I'm proposing etcd v3.6 to panic when encountering v2 store change. This can only happened if user has run v3.5 with
--enable-v2
. As documented in--v2-deprecation=write-only
(default in etcd v3.6) will not allow custom v2 state.etcd/server/etcdmain/help.go
Line 169 in fd0882b
If etcd still has some v2 data, users are expected to either:
--v2-deprecation=write-only-drop-data
which is expected to delete the data. Implementation pending.Note for reviewers:
etcd/tests/common/e2e_test.go
Lines 55 to 73 in 28d9564
cc @ahrtr @fuweid @chaochn47 @siyuanfoundation