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

Problem: has operation could be more efficient than get #7

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

yihuang
Copy link
Collaborator

@yihuang yihuang commented Apr 10, 2024

Solution:

  • validate has operations differently.
  • update readme.

TODO:

  • add test
  • think deeper about the correctness.

Solution:
- validate has operation differently.
- update readme.
@yihuang yihuang requested a review from mmsqe April 10, 2024 06:32
README.md Outdated Show resolved Hide resolved
@yihuang yihuang changed the title Problem: has operation can be more efficient than get Problem: has operation could be more efficient than get Apr 10, 2024
Signed-off-by: yihuang <[email protected]>
}

// record the has descriptor, has operation is validated by value rather than version.
s.readSet.Hases = append(s.readSet.Hases, HasDescriptor{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure why we record has, won't we have append bigger readSet when call has operation?

return false
}
exists := !d.isZero(value)
if exists != desc.Exists {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and not sure why we need loop and compare exist

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

Successfully merging this pull request may close these issues.

2 participants