-
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
Implement WAL static analysis to ensure that new entries will be properly annotated #13490
Conversation
4afafd1
to
f2305d4
Compare
5021629
to
a3150d8
Compare
if valueOpts != nil { | ||
maxVer = maxVersion(maxVer, etcdVersionFromOptionsString(valueOpts.String())) | ||
ver, _ := etcdVersionFromOptionsString(valueOpts.String()) |
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.
I wonder whether we are not parsing these options too frequently (e.g. on each interpreted data enum).
Alternatively we could build a map(s):
- field-> version
- enum -> version
The way we build the version file... and during the data processing just keep performing lookups in the map.
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.
Sure, we will definitely need this for version API calls as they will be latency sensitive, however I would skip this optimization of static analysis.
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.
Aren't we afraid that start time of etcd server that will keep processing WAL log (ReadWALVersion) will get significantly slower. Have you tested it with realistic: O(64MB) Wal files ?
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 don't verify WAL during server start, we do it during downgrade and after we created a snapshot.
bd865e5
to
0cd493b
Compare
0cd493b
to
76bdd0c
Compare
76bdd0c
to
7104b7a
Compare
ping @ptabor |
7104b7a
to
f4187b4
Compare
if valueOpts != nil { | ||
maxVer = maxVersion(maxVer, etcdVersionFromOptionsString(valueOpts.String())) | ||
ver, _ := etcdVersionFromOptionsString(valueOpts.String()) |
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.
Aren't we afraid that start time of etcd server that will keep processing WAL log (ReadWALVersion) will get significantly slower. Have you tested it with realistic: O(64MB) Wal files ?
@ptabor PTAL |
Codecov Report
@@ Coverage Diff @@
## main #13490 +/- ##
=======================================
Coverage ? 72.68%
=======================================
Files ? 472
Lines ? 39361
Branches ? 0
=======================================
Hits ? 28610
Misses ? 8861
Partials ? 1890
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
Thank you ! |
Part of #13168
cc @hexfusion @ptabor