Title: Fix config being loaded twice by ryandens · Pull Request #293 · hypertrace/javaagent · GitHub
Open Graph Title: Fix config being loaded twice by ryandens · Pull Request #293 · hypertrace/javaagent
X Title: Fix config being loaded twice by ryandens · Pull Request #293 · hypertrace/javaagent
Description: Description Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking implementation. To fix it, I pulled the implementation of memoizing the AgentConfig into a separate class. This made it easier to inject a test double (specifically, a spy) to verify that the config is properly memoized. Testing Added test cases on the memoization and resetting of the memoized value. Checklist: My changes generate no new warnings I have added tests that prove my fix is effective or that my feature works Any dependent changes have been merged and published in downstream modules Documentation No new documentation required This solution was based off of/inspired by The "Double-Checked Locking is Broken Declaration" JSR 133 FAQ "What does volatile do?" Guava's NonSerializableMemoizingSupplier reference implementation
Open Graph Description: Description Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking imp...
X Description: Description Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking imp...
Opengraph URL: https://github.com/hypertrace/javaagent/pull/293
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:7ca93d94-dfe9-23af-56fa-2674720ea843 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DF96:2371E7:C9457E:11B7F02:6A4FE20E |
| html-safe-nonce | 38fe15d1e9257a511f91cd748dfad7475605c09eb0f6463102c457dae903b759 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjk2OjIzNzFFNzpDOTQ1N0U6MTFCN0YwMjo2QTRGRTIwRSIsInZpc2l0b3JfaWQiOiIzNjU1NzMxNDIzNzQwOTQ0OTEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 01b491a43fec584013e8ea726b8f32bb896245c74e63ed467f5693ec59d62f3c |
| hovercard-subject-tag | pull_request:598193695 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/hypertrace/javaagent/pull/293/files |
| twitter:image | https://avatars.githubusercontent.com/u/8192732?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/8192732?s=400&v=4 |
| og:image:alt | Description Resolves #223 (kind of). This bug no longer seems to be present, but as a result of the investigation into #223 a small thread-safety issue was noticed in the double-checked locking imp... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/hypertrace/javaagent git https://github.com/hypertrace/javaagent.git |
| octolytics-dimension-user_id | 65374698 |
| octolytics-dimension-user_login | hypertrace |
| octolytics-dimension-repository_id | 302314733 |
| octolytics-dimension-repository_nwo | hypertrace/javaagent |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 302314733 |
| octolytics-dimension-repository_network_root_nwo | hypertrace/javaagent |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 142593e66413bbae27fd485859993597d5a3b104 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width