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

Enable dynamic creation of storage clients based on bucket type and specified protocol #2922

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

abhishek10004
Copy link
Collaborator

@abhishek10004 abhishek10004 commented Jan 20, 2025

Enable dynamic creation of storage clients based on bucket type and specified protocol

Reason for not using mutex in getClient:
Multiple clients can be created in dynamic mounting case only. But in this case, the root dir will actually be a base_dir & we take a lock before calling LookUpChild for base_dir. So, this will ensure that call to BucketHandle (which means calls to getClient) will be serialized.

Reason for not adding a new config EnableBidiConfig in StorageClientConfig (& instead passing a separate parameter for bidi config while creating grpc client):
This config is created from the user provided config at the start (& should reflect that) and I would not like to keep a transient field to it (i.e. would not like to keep a field which has to be set every time before grpc client creation happens and does not serve any other purpose apart from reducing an extra parameter to grpc client creation call).

Testing: Manually tested mounting/listing/reading on flat, hns and zb bucket with this change using dynamic mounting (with both grpc as well as http)

@abhishek10004 abhishek10004 added execute-perf-test Execute performance test in PR execute-integration-tests Run only integration tests labels Jan 20, 2025
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 72.05882% with 19 lines in your changes missing coverage. Please review.

Project coverage is 75.69%. Comparing base (088fee5) to head (97deb8a).
Report is 5 commits behind head on master.

Files with missing lines Patch % Lines
internal/storage/storage_handle.go 69.84% 13 Missing and 6 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2922      +/-   ##
==========================================
- Coverage   75.83%   75.69%   -0.15%     
==========================================
  Files         125      125              
  Lines       17624    17641      +17     
==========================================
- Hits        13366    13353      -13     
- Misses       3701     3728      +27     
- Partials      557      560       +3     
Flag Coverage Δ
unittests 75.69% <72.05%> (-0.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@abhishek10004 abhishek10004 marked this pull request as ready for review January 20, 2025 11:51
@abhishek10004 abhishek10004 requested a review from a team as a code owner January 20, 2025 11:51
@kislaykishore kislaykishore requested review from a team, BrennaEpp and tritone and removed request for a team and BrennaEpp January 20, 2025 11:51
@abhishek10004 abhishek10004 merged commit 818d43d into master Jan 21, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execute-integration-tests Run only integration tests execute-perf-test Execute performance test in PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants