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

fix: chunked backup creation #496

Merged
merged 1 commit into from
Sep 27, 2021
Merged

Conversation

vasco-santos
Copy link
Contributor

@vasco-santos vasco-santos commented Sep 27, 2021

#417 was merged but follow up chunk backup URLs were not properly stored. Only the first one was stored, instead of each single one. This was because of the short circuit where we just return an upload if there is one. In this situation, we need to update the Backup collection

Considering comment #417 (comment) , an index was also added to verify if the backup url for the given upload already exists. Considering that we will not create the upload entry and we will not create the content entry, this should not result in much more computing power to finish the mutation.

},
If(
IsNonEmpty(Var('backupMatch')),
Get(Var('backupMatch')),
Copy link
Contributor

Choose a reason for hiding this comment

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

to verify my understanding here, the true_expr in this If ... Get(Var('backupMatch')),is basically unused right? it's just there because Fauna doesn't support a simple If...then only an If...then...else.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes sir! I "return" the Backup because the Create below also returns the Backup, either way nothing uses the returned value

@vasco-santos vasco-santos merged commit 4c8cf17 into main Sep 27, 2021
@vasco-santos vasco-santos deleted the fix/chunked-backup-creation branch September 27, 2021 14:07
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