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

Reindex permissions in batches #10697

Closed
qqmyers opened this issue Jul 18, 2024 · 0 comments · Fixed by #10698
Closed

Reindex permissions in batches #10697

qqmyers opened this issue Jul 18, 2024 · 0 comments · Fixed by #10698
Labels
Type: Feature a feature request
Milestone

Comments

@qqmyers
Copy link
Member

qqmyers commented Jul 18, 2024

Overview of the Feature Request
The reindexFilesInBatches method actually indexes in one batch and, when called from indexPermissionsOnSelfAndChildren for a permission change on a collection, results in a list of all datafiles in datasets in that collection and all permission docs for them being loaded into memory. Adding some batching would reduce the memory requirements significantly.

What inspired the request?
Out-of-memory errors at QDR

PR to follow

@qqmyers qqmyers added the Type: Feature a feature request label Jul 18, 2024
pdurbin added a commit to QualitativeDataRepository/dataverse that referenced this issue Oct 2, 2024
pdurbin added a commit to QualitativeDataRepository/dataverse that referenced this issue Oct 2, 2024
pdurbin added a commit to QualitativeDataRepository/dataverse that referenced this issue Oct 2, 2024
pdurbin added a commit to QualitativeDataRepository/dataverse that referenced this issue Oct 2, 2024
stevenwinship pushed a commit that referenced this issue Oct 16, 2024
* reindex batches of 20 files instead of all at once

* Also only keep 100 files in list at a time

* release note

* Just do collections/datasets as you go

Avoids keeping everything in memory, also helps in tracking progress as
you can see the permissionindextime getting updated per dataset.

* fix merge issues, add logging

* put comments back to how they were #10697

* reduce logging #10697

* rename release note and add PR number #10697

* fix logging - finest for per file, space in message

* adding a space in log message - per review

---------

Co-authored-by: Philip Durbin <philip_durbin@harvard.edu>
@pdurbin pdurbin added this to the 6.5 milestone Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature a feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants