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

memory storage #306

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

elee1766
Copy link
Contributor

@elee1766 elee1766 commented Aug 15, 2024

renames existing memoryStorage -> testingMemoryStorage, as it is a special storage only used for testing

creates memoryStorage, which can only be created through calling NewMemoryStorage

memory storage is thread safe, supports lock keyed by file

@elee1766 elee1766 changed the title noot memory storage Aug 15, 2024
@mholt
Copy link
Member

mholt commented Aug 15, 2024

Thanks! Is there a reason we need two? Like, why not just use the new memoryStorage for testing too?

@elee1766
Copy link
Contributor Author

Thanks! Is there a reason we need two? Like, why not just use the new memoryStorage for testing too?

i'm not sure.

// testingMemoryStorage is an in-memory storage implementation with known contents and fixed iteration order for List.

i assume those things matter for testing, and the map based in-memory store can't do things, so my guess is we can't.

@mholt
Copy link
Member

mholt commented Aug 23, 2024

Hmm. I still wonder if we can just use the one for both. (In other words, keep the new memoryStorage type, and just use it instead of the new testingMemoryStorage type.) I haven't had a chance to explore this but could we possibly try it if anyone has a chance?

@elee1766
Copy link
Contributor Author

elee1766 commented Aug 23, 2024

i can try to look for some time to investigate. i am usually afraid of changing existing tests.

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