Skip to content

Commit 8f447cf

Browse files
authored
Merge pull request #19047 from ahrtr/comment_storageversion_20241212
Add a TODO comment for UnsafeDetectSchemaVersion on how to simplify t…
2 parents f03dee9 + 50e7f9f commit 8f447cf

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server/storage/schema/schema.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ func UnsafeDetectSchemaVersion(lg *zap.Logger, tx backend.UnsafeReader) (v semve
9595
if vp != nil {
9696
return *vp, nil
9797
}
98+
99+
// TODO: remove the operations of reading the fields `confState`
100+
// and `term` in 3.7. We only need to be back-compatible
101+
// with 3.6 when we are running 3.7, and the `storageVersion`
102+
// already exists in all versions >= 3.6, so we don't need to
103+
// use any other fields to identify the etcd's storage version.
98104
confstate := UnsafeConfStateFromBackend(lg, tx)
99105
if confstate == nil {
100106
return v, fmt.Errorf("missing confstate information")

0 commit comments

Comments
 (0)