Merge pull request #18212 from Willhow-Gao/main

mvcc: fix typo
This commit is contained in:
James Blair 2024-06-22 20:10:26 +12:00 committed by GitHub
commit 16ed0fe86e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,7 +19,7 @@ import (
"go.etcd.io/etcd/server/v3/storage/schema" "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) _, finishedCompactBytes := tx.UnsafeRange(schema.Meta, schema.FinishedCompactKeyName, nil, 0)
if len(finishedCompactBytes) != 0 { if len(finishedCompactBytes) != 0 {
return BytesToRev(finishedCompactBytes[0]).Main, true return BytesToRev(finishedCompactBytes[0]).Main, true
@ -27,7 +27,7 @@ func UnsafeReadFinishedCompact(tx backend.UnsafeReader) (finishedComact int64, f
return 0, false 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) _, scheduledCompactBytes := tx.UnsafeRange(schema.Meta, schema.ScheduledCompactKeyName, nil, 0)
if len(scheduledCompactBytes) != 0 { if len(scheduledCompactBytes) != 0 {
return BytesToRev(scheduledCompactBytes[0]).Main, true return BytesToRev(scheduledCompactBytes[0]).Main, true