mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
update code comments
Signed-off-by: Chao Chen <chaochn@amazon.com>
This commit is contained in:
parent
67c272e8ba
commit
9e1e378e9e
@ -86,7 +86,6 @@ func (h hasherAdapter) TriggerCorruptAlarm(memberID types.ID) {
|
||||
// before serving any peer/client traffic. Only mismatch when hashes
|
||||
// are different at requested revision, with same compact revision.
|
||||
func (cm *corruptionChecker) InitialCheck() error {
|
||||
|
||||
cm.lg.Info(
|
||||
"starting initial corruption check",
|
||||
zap.String("local-member-id", cm.hasher.MemberId().String()),
|
||||
@ -260,7 +259,7 @@ func (cm *corruptionChecker) PeriodicCheck() error {
|
||||
// have different hashes.
|
||||
//
|
||||
// We might miss opportunity to perform the check if the compaction is still
|
||||
// ongoing on one of the members or it was unresponsive. In such situation the
|
||||
// ongoing on one of the members, or it was unresponsive. In such situation the
|
||||
// method still passes without raising alarm.
|
||||
func (cm *corruptionChecker) CompactHashCheck() {
|
||||
cm.lg.Info("starting compact hash check",
|
||||
|
@ -86,7 +86,12 @@ type KeyValueHash struct {
|
||||
}
|
||||
|
||||
type HashStorage interface {
|
||||
// Hash computes the hash of the KV's backend.
|
||||
// Hash computes the hash of the whole backend keyspace,
|
||||
// including key, lease, and other buckets in storage.
|
||||
// This is designed for testing ONLY!
|
||||
// Do not rely on this in production with ongoing transactions,
|
||||
// since Hash operation does not hold MVCC locks.
|
||||
// Use "HashByRev" method instead for "key" bucket consistency checks.
|
||||
Hash() (hash uint32, revision int64, err error)
|
||||
|
||||
// HashByRev computes the hash of all MVCC revisions up to a given revision.
|
||||
|
Loading…
x
Reference in New Issue
Block a user