Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad condition in code #144

Open
serathius opened this issue Oct 29, 2024 · 0 comments
Open

Bad condition in code #144

serathius opened this issue Oct 29, 2024 · 0 comments

Comments

@serathius
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant