Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Implement max size logic for local storage #74

Merged
merged 1 commit into from Apr 2, 2020

Conversation

lzchen
Copy link
Contributor

@lzchen lzchen commented Apr 2, 2020

Previously, storage_max_size configuration in exporters did not do anything.
Implements this logic in storage to stop storing files in local storage once max size has been reached (may have some spillage if the envelope is actually larger than the remaining size).

Runs size check everytime a put is called in storage, instead of saving the size of the folder. Keeping state will require us to handle concurrency issues and also introduces complications when adding/deleting.

See dot net and java implementations of this logic.

@lzchen lzchen requested a review from hectorhdzg as a code owner April 2, 2020 16:08
Copy link
Member

@hectorhdzg hectorhdzg left a comment

Choose a reason for hiding this comment

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

LGTM

@lzchen lzchen merged commit 017f470 into microsoft:master Apr 2, 2020
@lzchen lzchen deleted the storage branch April 2, 2020 17:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants