René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7ca93d94-dfe9-23af-56fa-2674720ea843
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDF96:2371E7:C9457E:11B7F02:6A4FE20E
html-safe-nonce38fe15d1e9257a511f91cd748dfad7475605c09eb0f6463102c457dae903b759
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjk2OjIzNzFFNzpDOTQ1N0U6MTFCN0YwMjo2QTRGRTIwRSIsInZpc2l0b3JfaWQiOiIzNjU1NzMxNDIzNzQwOTQ0OTEwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac01b491a43fec584013e8ea726b8f32bb896245c74e63ed467f5693ec59d62f3c
hovercard-subject-tagpull_request:598193695
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/hypertrace/javaagent/pull/293/files
twitter:imagehttps://avatars.githubusercontent.com/u/8192732?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/8192732?s=400&v=4
og:image:altDescription 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None19b98c3d9767bb8a56238a89ff8401d1cbdf3bc5c353799aacf49fe6c76b4b7c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/hypertrace/javaagent git https://github.com/hypertrace/javaagent.git
octolytics-dimension-user_id65374698
octolytics-dimension-user_loginhypertrace
octolytics-dimension-repository_id302314733
octolytics-dimension-repository_nwohypertrace/javaagent
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id302314733
octolytics-dimension-repository_network_root_nwohypertrace/javaagent
turbo-body-classeslogged-out env-production page-responsive
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release142593e66413bbae27fd485859993597d5a3b104
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/hypertrace/javaagent/pull/293/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhypertrace%2Fjavaagent%2Fpull%2F293%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fhypertrace%2Fjavaagent%2Fpull%2F293%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=hypertrace%2Fjavaagent
Reloadhttps://github.com/hypertrace/javaagent/pull/293/files
Reloadhttps://github.com/hypertrace/javaagent/pull/293/files
Reloadhttps://github.com/hypertrace/javaagent/pull/293/files
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
hypertrace https://github.com/hypertrace
javaagenthttps://github.com/hypertrace/javaagent
Notifications https://github.com/login?return_to=%2Fhypertrace%2Fjavaagent
Fork 14 https://github.com/login?return_to=%2Fhypertrace%2Fjavaagent
Star 37 https://github.com/login?return_to=%2Fhypertrace%2Fjavaagent
Code https://github.com/hypertrace/javaagent
Issues 35 https://github.com/hypertrace/javaagent/issues
Pull requests 4 https://github.com/hypertrace/javaagent/pulls
Discussions https://github.com/hypertrace/javaagent/discussions
Actions https://github.com/hypertrace/javaagent/actions
Projects https://github.com/hypertrace/javaagent/projects
Security and quality 0 https://github.com/hypertrace/javaagent/security
Insights https://github.com/hypertrace/javaagent/pulse
Code https://github.com/hypertrace/javaagent
Issues https://github.com/hypertrace/javaagent/issues
Pull requests https://github.com/hypertrace/javaagent/pulls
Discussions https://github.com/hypertrace/javaagent/discussions
Actions https://github.com/hypertrace/javaagent/actions
Projects https://github.com/hypertrace/javaagent/projects
Security and quality https://github.com/hypertrace/javaagent/security
Insights https://github.com/hypertrace/javaagent/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fhypertrace%2Fjavaagent%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fhypertrace%2Fjavaagent%2Fissues%2Fnew%2Fchoose
pavolloffayhttps://github.com/pavolloffay
hypertrace:mainhttps://github.com/hypertrace/javaagent/tree/main
Conversation 4 https://github.com/hypertrace/javaagent/pull/293
Commits 5 https://github.com/hypertrace/javaagent/pull/293/commits
Checks 0 https://github.com/hypertrace/javaagent/pull/293/checks
Files changed https://github.com/hypertrace/javaagent/pull/293/files
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
Fix config being loaded twice https://github.com/hypertrace/javaagent/pull/293/files#top
Show all changes 5 commits https://github.com/hypertrace/javaagent/pull/293/files
38c8d9f :sparkles: create memoizing AgentConfigSupplier encapsulating double-… ryandens Mar 21, 2021 https://github.com/hypertrace/javaagent/pull/293/commits/38c8d9f1a98de11bd4889975e77a0e32e5e4a355
49bd84b :recycle: refactor HypertraceConfig to use thread-safe AgentConfigSup… ryandens Mar 21, 2021 https://github.com/hypertrace/javaagent/pull/293/commits/49bd84b212edbf99dbb75c13eabc9cb2f36b1acf
ca8f431 Revert ":recycle: refactor HypertraceConfig to use thread-safe AgentC… ryandens Mar 27, 2021 https://github.com/hypertrace/javaagent/pull/293/commits/ca8f431c318fc42cab7c95f65c11e33eac234669
da325bd :ok_hand: move double-checked locking implementation back into Hypert… ryandens Mar 27, 2021 https://github.com/hypertrace/javaagent/pull/293/commits/da325bdc5944d8097a0a2077653e373ac1f9600c
db27d36 :fire: delete AgentConfigSupplier as it is now unused ryandens Mar 27, 2021 https://github.com/hypertrace/javaagent/pull/293/commits/db27d36e1f353fc45c83c7a8af6f3e1e43bd0dc6
Clear filters https://github.com/hypertrace/javaagent/pull/293/files
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
javaagent-core/src/main/java/org/hypertrace/agent/core/config/HypertraceConfig.javahttps://github.com/hypertrace/javaagent/pull/293/files#diff-4243b2d9383c6c39f190fdcf3734c4f75d42fbce2f8b5594f91286b0e1830187
View file https://github.com/hypertrace/javaagent/blob/db27d36e1f353fc45c83c7a8af6f3e1e43bd0dc6/javaagent-core/src/main/java/org/hypertrace/agent/core/config/HypertraceConfig.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/hypertrace/javaagent/pull/293/{{ revealButtonHref }}
https://github.com/hypertrace/javaagent/pull/293/files#diff-4243b2d9383c6c39f190fdcf3734c4f75d42fbce2f8b5594f91286b0e1830187
pavolloffayhttps://github.com/pavolloffay
Mar 23, 2021https://github.com/hypertrace/javaagent/pull/293/files#r599335255
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
ryandenshttps://github.com/ryandens
Mar 27, 2021https://github.com/hypertrace/javaagent/pull/293/files#r602730841
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/hypertrace/javaagent/pull/293/files
https://github.com/hypertrace/javaagent/pull/293/files#diff-4243b2d9383c6c39f190fdcf3734c4f75d42fbce2f8b5594f91286b0e1830187
https://github.com/hypertrace/javaagent/pull/293/files#diff-4243b2d9383c6c39f190fdcf3734c4f75d42fbce2f8b5594f91286b0e1830187
https://github.com/hypertrace/javaagent/pull/293/files#diff-4243b2d9383c6c39f190fdcf3734c4f75d42fbce2f8b5594f91286b0e1830187
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.