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

Update file cache logic #17

Open
sambles opened this issue May 15, 2024 · 1 comment
Open

Update file cache logic #17

sambles opened this issue May 15, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@sambles
Copy link
Contributor

sambles commented May 15, 2024

Issue Description

The file caching in the OasisDataManager package is based on the filename rather than the hash of the file data.
This causes a problem with filenames like analysis_1_inputs.tar.gz which is the input tar (oasis files)

Example

  1. Generate inputs With loc_file = A --> File stored analysis_1_inputs.tar.gz
  2. Run Generate Losses loc_file = A --> File cached analysis_1_inputs.tar.gz
  3. Update portfolio with loc_file = B
  4. Generate inputs With loc_file = B --> File overwritten with same name analysis_1_inputs.tar.gz
  5. Generate Losses:
run_analysis[8fa67556-5a22-4c79-885c-d78f7c4c90d7]: {'oasislmf': '2.3.4', 'ktools': 'fmcalc : version: 3.12.2 - git update: ', 'platform': '2.3.4'}
[2024-05-02 09:12:49,079: INFO/ForkPoolWorker-1] Get from Cache: oasis/server/analysis_1_inputs.tar.gz

(This is the original analysis_1_inputs.tar.gz Tar file from Step 1

@sambles sambles added the bug Something isn't working label May 15, 2024
@sambles
Copy link
Contributor Author

sambles commented May 15, 2024

Workaround to prevent the above from happening: OasisLMF/OasisPlatform#1037

However, still might be an issue with filenames we don't have control over (like model data)

@benhayes21 benhayes21 moved this to In Progress in Oasis Dev Team Tasks May 23, 2024
@benhayes21 benhayes21 moved this from In Progress to Todo in Oasis Dev Team Tasks Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant