Skip to content

Commit

Permalink
Merge pull request #18212 from Willhow-Gao/main
Browse files Browse the repository at this point in the history
mvcc: fix typo
  • Loading branch information
jmhbnz authored Jun 22, 2024
2 parents 1d13fc5 + c0076a7 commit 16ed0fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/storage/mvcc/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import (
"go.etcd.io/etcd/server/v3/storage/schema"
)

func UnsafeReadFinishedCompact(tx backend.UnsafeReader) (finishedComact int64, found bool) {
func UnsafeReadFinishedCompact(tx backend.UnsafeReader) (int64, bool) {
_, finishedCompactBytes := tx.UnsafeRange(schema.Meta, schema.FinishedCompactKeyName, nil, 0)
if len(finishedCompactBytes) != 0 {
return BytesToRev(finishedCompactBytes[0]).Main, true
}
return 0, false
}

func UnsafeReadScheduledCompact(tx backend.UnsafeReader) (scheduledComact int64, found bool) {
func UnsafeReadScheduledCompact(tx backend.UnsafeReader) (int64, bool) {
_, scheduledCompactBytes := tx.UnsafeRange(schema.Meta, schema.ScheduledCompactKeyName, nil, 0)
if len(scheduledCompactBytes) != 0 {
return BytesToRev(scheduledCompactBytes[0]).Main, true
Expand Down

0 comments on commit 16ed0fe

Please sign in to comment.