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

Create CacheStore, a merger of OreSatFileCache and a CFDP filestore #29

Merged
merged 1 commit into from
May 23, 2024

Conversation

ThirteenFish
Copy link
Contributor

The filestore specifically as implemented though cfdp-py, which has some "enhancements" to the base protocol spec. The defined API for an OreSatFileCache was insufficient to implement the filestore API, so I had build it on top of the internals. Special considerations:

  • Locking with a non-reentrant lock meant the API generally couldn't be reused internally
  • ._data needed to be kept up-to-date and in-order, this was aided by the bisect module
  • There are no directories in an OreSatFileCache so they're ignored in paths provided, only taking the basename portions. Additionally directory operations are no-ops except for list_directory which lists all files in the cache directory (not just those known to the cache)
  • All files should maintain the OreSatFile filename format.

The filestore specifically as implemented though cfdp-py, which has some
"enhancements" to the base protocol spec. The defined API for an
OreSatFileCache was insufficient to implement the filestore API, so I
had build it on top of the internals. Special considerations:
- Locking with a non-reentrant lock meant the API generally couldn't be
  reused internally
- ._data needed to be kept up-to-date and in-order, this was aided by
  the bisect module
- There are no directories in an OreSatFileCache so they're ignored in
  paths provided, only taking the basename portions. Additionally
  directory operations are no-ops except for list_directory which lists
  all files in the cache directory (not just those known to the cache)
- All files should maintain the OreSatFile filename format.
@ThirteenFish ThirteenFish requested a review from ryanpdx May 23, 2024 08:32
Copy link
Member

@ryanpdx ryanpdx left a comment

Choose a reason for hiding this comment

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

Looks good

@ryanpdx ryanpdx merged commit 978de63 into master May 23, 2024
1 check passed
@ryanpdx ryanpdx deleted the cachestore branch May 23, 2024 14:10
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