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

capsules: tickv: invalidate may need another read #3983

Merged
merged 1 commit into from
May 17, 2024

Conversation

bradjc
Copy link
Contributor

@bradjc bradjc commented May 10, 2024

Pull Request Overview

Typically, the flow for set(k, v) is:

  1. Try to append (k, v).
  2. That fails, because k exists.
  3. Try to invalidate key k.
  4. Since we read the flash to find the key already existed, we don't need to read again.
  5. Invalidate k.

However, if k has rolled to a new page, then we will need a new read. We just need to handle that case by ignoring read not ready even for invalidate.

Testing Strategy

This pull request was tested by working on the HOTP apps.

TODO or Help Wanted

n/a

Documentation Updated

  • Updated the relevant files in /docs, or no updates are required.

Formatting

  • Ran make prepush.

Typically, the flow for set(k, v) is:
1. Try to append (k, v).
2. That fails, because k exists.
3. Try to invalidate key k.
4. Since we read the flash to find the key already existed, we don't
   need to read again.
5. Invalidate k.

However, if k has rolled to a new page, then we will need a new read. We
just need to handle that case by ignoring read not ready even for
invalidate.
@brghena brghena added this pull request to the merge queue May 17, 2024
Merged via the queue into master with commit e41bc45 May 17, 2024
18 checks passed
@brghena brghena deleted the tickv-invalidate-additional-read branch May 17, 2024 15:58
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.

None yet

4 participants