Skip to content

Bad condition in code #144

@serathius

Description

@serathius

auger/pkg/data/data.go

Lines 279 to 282 in 2b3f358

if kv.ModRevision > ks.Version {
ks.Version = kv.ModRevision
ks.Stats.ValueSize = len(kv.Value)
}
seems like it will always be true.
Key version increases on every update key, but revision increases on any key modification (including delete). So when key is updated the modrevision it's set will always be greater than version. Also it seems weird to compare version and modrevision as they are different types of counters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions