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

Fixing the multiple files concurrent write issue when reloading SSLFactory #12384

Merged
merged 2 commits into from
Feb 8, 2024

Conversation

zhtaoxiang
Copy link
Contributor

In our tests, we found that when reloading SSLFactory, need to retry a few times because when one file (key store or trust store) is updated, the other file (trust store or key store) may not have been fully written yet, so we need to wait a bit and retry.

@codecov-commenter
Copy link

Codecov Report

Attention: 16 lines in your changes are missing coverage. Please review.

Comparison is base (7c9bf8c) 61.77% compared to head (0546c8e) 27.73%.

Files Patch % Lines
...n/java/org/apache/pinot/common/utils/TlsUtils.java 0.00% 16 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             master   #12384       +/-   ##
=============================================
- Coverage     61.77%   27.73%   -34.04%     
  Complexity      207      207               
=============================================
  Files          2425     2425               
  Lines        132753   132766       +13     
  Branches      20535    20535               
=============================================
- Hits          82005    36821    -45184     
- Misses        44730    93150    +48420     
+ Partials       6018     2795     -3223     
Flag Coverage Δ
custom-integration1 <0.01% <0.00%> (ø)
integration <0.01% <0.00%> (ø)
integration1 <0.01% <0.00%> (ø)
integration2 0.00% <0.00%> (ø)
java-11 <0.01% <0.00%> (-34.96%) ⬇️
java-21 27.73% <0.00%> (-33.91%) ⬇️
skip-bytebuffers-false 27.73% <0.00%> (-34.00%) ⬇️
skip-bytebuffers-true 0.00% <0.00%> (-61.61%) ⬇️
temurin 27.73% <0.00%> (-34.04%) ⬇️
unittests 27.72% <0.00%> (-34.04%) ⬇️
unittests1 ?
unittests2 27.72% <0.00%> (-0.04%) ⬇️

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.

+ "on file {} changes", baseSslFactory, keyStorePath, trustStorePath, changedFile);
try {
// Need to retry a few times because when one file (key store or trust store) is updated, the other file
// (trust store or key store) may not have been fully written yet, so we need to wait a bit and retry.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also add a note that it's ok for 3 retries failure, the watcher will be triggered again and renew.

@xiangfu0 xiangfu0 changed the title add retry to SSLFactory reloading Fixing the multiple files concurrent write issue when reloading SSLFactory Feb 8, 2024
@xiangfu0 xiangfu0 merged commit 2b69d6a into apache:master Feb 8, 2024
19 checks passed
suyashpatel98 pushed a commit to suyashpatel98/pinot that referenced this pull request Feb 28, 2024
…ctory (apache#12384)

* add retry to SSLFactory reloading

* update comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants