RUMM-2235: Rework file persistence layer#947
Merged
0xnm merged 1 commit intoJun 17, 2022
Merged
Conversation
0xnm
marked this pull request as ready for review
June 14, 2022 07:22
xgouchet
approved these changes
Jun 15, 2022
| // is requested with granted orchestrator (due to consent change). Not an issue, because | ||
| // batch file should be migrated to the same folder, but leaving this debug point | ||
| // just in case. | ||
| internalLogger.debugWithTelemetry( |
mariusc83
reviewed
Jun 15, 2022
| uploader.upload(batch) | ||
| handler.delete(it) | ||
| fileMover.delete(it) | ||
| val metaFile = fileOrchestrator.getMetadataFile(it) |
Member
There was a problem hiding this comment.
where is this data uploaded if you delete it here ?
Member
Author
There was a problem hiding this comment.
The data is uploaded few lines above (uploader.upload(batch)), basically the logic is the same, I just added metadata deletion.
But I see your concern: metadata is requested for the file which is deleted and while it is ok to have (File object stays there still and we just use its path to get associated metadata file), I swapped the lines - now metadata file is requested before batch file deletion, which makes the operation more clear.
0xnm
force-pushed
the
nogorodnikov/rumm-2235/rework-file-persistence-layer
branch
from
June 16, 2022 08:38
fea0141 to
9b09887
Compare
mariusc83
approved these changes
Jun 16, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This change makes some re-work of the file persistence layer to answer the new requirements:
To support these requirements the following was done in this PR:
FileMover(not the best name, I know, butFileOrchestratorwas already taken).FileOrchestrator- this gives an advantage for the proper file cleanup once batch is dropped, expired or simply disk space should be freed.Review checklist (to be filled by reviewers)