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

IQSS/6993-use-single-AWS-client-per-store #6994

Merged
merged 52 commits into from Aug 24, 2020

Conversation

qqmyers
Copy link
Member

@qqmyers qqmyers commented Jun 17, 2020

What this PR does / why we need it: Refactors the S3AccessIO class to avoid creating a new AWS client for each instance, and instead keeping track of one AWS client per store.

Which issue(s) this PR closes:

Closes #6993

Special notes for your reviewer:

Suggestions on how to test this: This should do nothing :-) - behavior should be the same (except lower memory use perhaps). Since it's S3-related, testing should focus on getting/putting files to S3. Nominally, since the change is related to keeping track of S3 stores correctly, testing should probably use a couple stores and verify that read/writes are still happening to the correct store/bucket.

Does this PR introduce a user interface change? If mockups are available, please link/include them here: No

Is there a release notes update needed for this change?: No

Additional documentation:

also refactor S3StorageIO to re-use single client per store, use more
static methods
Nominally useful if code ever changes the storageIdentifier of the
dvObject after the S3AccessIO instance is created, but real code
shouldn't do that :-)
and the dataset pid being set multiple times.
used in DatasetPage and editFilesFragment.xhtml
@coveralls
Copy link

coveralls commented Jun 17, 2020

Coverage Status

Coverage decreased (-0.01%) to 19.543% when pulling 10c2fb7 on GlobalDataverseCommunityConsortium:IQSS/6993 into fa33c7a on IQSS:develop.

Copy link
Contributor

@landreev landreev left a comment

Choose a reason for hiding this comment

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

Looks good.
@qqmyers could you please sync up the branch with develop? - There are are no conflicts, but updating the version in pom.xml would help with QA deployments.
Everything appears to work. I was also curious to measure how much exactly we are saving per access call... Got strange results, then realized my experiment was faulty... Then decided not to hold the PR on account of it. So maybe I can instead help with that during QA (since it really is a QA task).

IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from Code Review 🦁 to QA 🔎✅ Aug 20, 2020
@qqmyers
Copy link
Member Author

qqmyers commented Aug 20, 2020

@landreev - I'll be curious as well w.r.t. any memory/performance improvement - could be fun with 1K+ files in a dataset.

In any case - note/reminder for testing - #6995 depends on this PR (includes it) so this should probably be tested/merged first.

@kcondon kcondon assigned kcondon and unassigned landreev Aug 24, 2020
@kcondon kcondon merged commit cdbb7f2 into IQSS:develop Aug 24, 2020
IQSS/dataverse (TO BE RETIRED / DELETED in favor of project 34) automation moved this from QA 🔎✅ to Done 🚀 Aug 24, 2020
@djbrooke djbrooke added this to the 5.1 milestone Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Use single AWS client per S3 storage driver
5 participants