Skip to content

Commit

Permalink
Add a TODO comment for UnsafeDetectSchemaVersion on how to simplify t…
Browse files Browse the repository at this point in the history
…he implementation

Signed-off-by: Benjamin Wang <[email protected]>
  • Loading branch information
ahrtr committed Dec 12, 2024
1 parent f03dee9 commit 50e7f9f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/storage/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,12 @@ func UnsafeDetectSchemaVersion(lg *zap.Logger, tx backend.UnsafeReader) (v semve
if vp != nil {
return *vp, nil
}

// TODO: remove the operations of reading the fields `confState`
// and `term` in 3.7. We only need to be back-compatible
// with 3.6 when we are running 3.7, and the `storageVersion`
// already exists in all versions >= 3.6, so we don't need to
// use any other fields to identify the etcd's storage version.
confstate := UnsafeConfStateFromBackend(lg, tx)
if confstate == nil {
return v, fmt.Errorf("missing confstate information")
Expand Down

0 comments on commit 50e7f9f

Please sign in to comment.