René's URL Explorer Experiment


Title: Prevent lookups from seeing a hosts file reload in progress by oshoukry · Pull Request #430 · dnsjava/dnsjava · GitHub

Open Graph Title: Prevent lookups from seeing a hosts file reload in progress by oshoukry · Pull Request #430 · dnsjava/dnsjava

X Title: Prevent lookups from seeing a hosts file reload in progress by oshoukry · Pull Request #430 · dnsjava/dnsjava

Description: Closes #429. Problem While a hosts file reload is in progress, hosts file lookups come back empty, since the reload process clears the map first, then loads a new set, failing those lookups even for names that are in both the old and new file. The very first read of the file has the same gap. Fix Thread safe changes to enable loading of the new file first, before performing an atomic swap so all incoming requests either use the old or new mapping, never blank. Careful thought was put to Avoid any new locks in this critically performant code path; lookups during a reload use the old mapping instead of waiting. Only lookups during the very first read wait for it to finish. If the new file exceeds the allowed limit, the system swaps it in and searches it entry by entry, instead of the old behavior of returning nothing for names that weren't in the previous, smaller file. Tests The tests provided enable demonstrating the failure on the old code before the fix was put in place.

Open Graph Description: Closes #429. Problem While a hosts file reload is in progress, hosts file lookups come back empty, since the reload process clears the map first, then loads a new set, failing those lookups even f...

X Description: Closes #429. Problem While a hosts file reload is in progress, hosts file lookups come back empty, since the reload process clears the map first, then loads a new set, failing those lookups even f...

Opengraph URL: https://github.com/dnsjava/dnsjava/pull/430

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.3

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d2107a46-7cda-7c43-cf96-6bf44c08adaf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF82:2E4E6F:6F2970:94862F:6B062CCB
html-safe-nonce44c93647f94f394f113e7fe7887d8d62c6f8652e492a5a2ca1db9cfeb78f837d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjgyOjJFNEU2Rjo2RjI5NzA6OTQ4NjJGOjZCMDYyQ0NCIiwidmlzaXRvcl9pZCI6IjM2MDA3MzMzNDk2MjAzNjI0NDMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacca0839718200cbccd5fa384ca95daae283f4852196f1e76d875793d5a7e081c2
hovercard-subject-tagpull_request:5116225526
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/dnsjava/dnsjava/pull/430/files
twitter:imagehttps://avatars.githubusercontent.com/u/6766349?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/6766349?s=400&v=4
og:image:altCloses #429. Problem While a hosts file reload is in progress, hosts file lookups come back empty, since the reload process clears the map first, then loads a new set, failing those lookups even f...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7f961de5dd5c5d4aca24d33f8b3ffb3fb8b2ef53d0a4f32f01f0a790e512f6d3
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/dnsjava/dnsjava git https://github.com/dnsjava/dnsjava.git
octolytics-dimension-user_id6755615
octolytics-dimension-user_logindnsjava
octolytics-dimension-repository_id17084567
octolytics-dimension-repository_nwodnsjava/dnsjava
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17084567
octolytics-dimension-repository_network_root_nwodnsjava/dnsjava
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release494ea0bb1e0feef734a83e2628697647755e8864
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/dnsjava/dnsjava/pull/430/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fpull%2F430%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdnsjava%2Fdnsjava%2Fpull%2F430%2Ffiles
Sign uphttps://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=dnsjava%2Fdnsjava
Reloadhttps://github.com/dnsjava/dnsjava/pull/430/files
Reloadhttps://github.com/dnsjava/dnsjava/pull/430/files
Reloadhttps://github.com/dnsjava/dnsjava/pull/430/files
dnsjavahttps://github.com/dnsjava
dnsjavahttps://github.com/dnsjava/dnsjava
Codehttps://github.com/dnsjava/dnsjava
Issues16 (16)https://github.com/dnsjava/dnsjava/issues
Pull requests3 (3)https://github.com/dnsjava/dnsjava/pulls
Actionshttps://github.com/dnsjava/dnsjava/actions
Security and quality8 (8)https://github.com/dnsjava/dnsjava/security
Insightshttps://github.com/dnsjava/dnsjava/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fdnsjava%2Fdnsjava%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdnsjava%2Fdnsjava%2Fissues%2Fnew%2Fchoose
ibauersachshttps://github.com/ibauersachs
dnsjava:masterhttps://github.com/dnsjava/dnsjava/tree/master
oshoukry:429-hosts-file-reload-racehttps://github.com/oshoukry/dnsjava/tree/429-hosts-file-reload-race
Conversation 5 https://github.com/dnsjava/dnsjava/pull/430
Commits 2 https://github.com/dnsjava/dnsjava/pull/430/commits
Checks 20 https://github.com/dnsjava/dnsjava/pull/430/checks
Files changed https://github.com/dnsjava/dnsjava/pull/430/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/430/files
Prevent lookups from seeing a hosts file reload in progress https://github.com/dnsjava/dnsjava/pull/430/files#top
Show all changes 2 commits https://github.com/dnsjava/dnsjava/pull/430/files
63dda8d #429 Prevent lookups from seeing a hosts file reload in progress oshoukry Nov 2, 2026 https://github.com/dnsjava/dnsjava/pull/430/commits/63dda8d6ffc495fcd38ff8e8f8032202ad680bdb
396fe73 #429 Coordinate the first-read test with latches instead of polling t… oshoukry Nov 2, 2026 https://github.com/dnsjava/dnsjava/pull/430/commits/396fe7330a630996a70cccf6edd7c09b162e2e3b
Clear filters https://github.com/dnsjava/dnsjava/pull/430/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/430/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/430/files
HostsFileParser.java https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
HostsFileParserTest.java https://github.com/dnsjava/dnsjava/pull/430/files#diff-1bc7b8c4b4d6ea8d591ff720707d21fbaef7025f24fb8a060224dbab1a063c81
src/main/java/org/xbill/DNS/hosts/HostsFileParser.javahttps://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
View file https://github.com/oshoukry/dnsjava/blob/396fe7330a630996a70cccf6edd7c09b162e2e3b/src/main/java/org/xbill/DNS/hosts/HostsFileParser.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/dnsjava/dnsjava/pull/430/{{ revealButtonHref }}
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
https://github.com/dnsjava/dnsjava/pull/430/files#diff-2f10e2339c001cb26a9cb13ea5835afbb401c158d633fc1548289495053c23f3
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/430/files
Please reload this pagehttps://github.com/dnsjava/dnsjava/pull/430/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.