René's URL Explorer Experiment


Title: Keep one pending ticker task per ScheduledDataLoaderRegistry by Meemaw · Pull Request #291 · graphql-java/java-dataloader · GitHub

Open Graph Title: Keep one pending ticker task per ScheduledDataLoaderRegistry by Meemaw · Pull Request #291 · graphql-java/java-dataloader

X Title: Keep one pending ticker task per ScheduledDataLoaderRegistry by Meemaw · Pull Request #291 · graphql-java/java-dataloader

Description: Fixes #290. In ticker mode, dispatchOrReschedule started a new self-rescheduling task for every data loader on every dispatchAll() call, and the chains from earlier calls kept running. Pending executor tasks grew with loaders × dispatchAll() calls until close(). Because graphql-java calls dispatchAll() many times per request, a single request could leave thousands of tasks on a shared scheduler. #290 has a reproducer, benchmark and production profile data. Change In ticker mode, the registry keeps at most one pending tick (an AtomicBoolean guard). Each tick re-arms itself, then calls dispatchAllWithCount(). Registry-level and per-loader predicates still decide what gets dispatched. rescheduleNow() in ticker mode schedules that same tick. Non-ticker mode is unchanged: per-loader rescheduling continues only while the predicate says no. Behaviour Preserved: after the first dispatchAll(), every loader whose predicate passes is dispatched at least every schedule until close(). Preserved: close() stops further ticks, and an explicit dispatchAll() after close() still dispatches. The pending tick runs once more, sees closed and does not re-arm, so a closed registry is retained for at most one extra schedule. Fixed as a side effect: previously a predicate or dispatchWithCounts() that threw inside a scheduled task ended that loader's chain for good. The tick re-arms before dispatching, so the ticker keeps running. Trade-off: a load queued after per-level dispatch now waits up to one schedule. Previously, with many staggered chains, one usually fired sooner. In an I/O-bound graphql-java benchmark, p50 went from 157 to 166 ms. When the scheduler thread is the bottleneck, throughput roughly doubles. Callers who want the old latency can lower schedule, which is cheap now that there is one task per registry. Tests New tests in ScheduledDataLoaderRegistryTest. The first three fail on master. Test On master ticker_mode_keeps_one_pending_task_however_often_dispatch_all_is_called (50 dispatchAll() calls over 20 loaders) fails: Expected: <1>, actual 1,000 pending ticker_mode_reschedule_now_keeps_one_pending_task fails: Expected: <1>, actual 1,020 pending ticker_mode_keeps_ticking_after_a_dispatch_predicate_throws fails: TimeoutException close_stops_the_ticker_but_dispatch_all_still_dispatches passes (guards the preserved behaviour) ./gradlew build on JDK 21: 671 tests, 0 failures.

Open Graph Description: Fixes #290. In ticker mode, dispatchOrReschedule started a new self-rescheduling task for every data loader on every dispatchAll() call, and the chains from earlier calls kept running. Pending exec...

X Description: Fixes #290. In ticker mode, dispatchOrReschedule started a new self-rescheduling task for every data loader on every dispatchAll() call, and the chains from earlier calls kept running. Pending exec...

Opengraph URL: https://github.com/graphql-java/java-dataloader/pull/291

X: @github

direct link

Domain: github.com

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:52541f95-b7c8-b29d-3798-ec69ef2d038f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB55E:2E7A8:3C0BCC:4F821B:6B01961F
html-safe-nonce031c1745dfe4fe52b8d7a5e65e67ffd8009f9e78546644bd95a847e2f6e0aefc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTVFOjJFN0E4OjNDMEJDQzo0RjgyMUI6NkIwMTk2MUYiLCJ2aXNpdG9yX2lkIjoiNDYzODQ4MjkyNjc3Mjc4NjcxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf5e8e7121be89fa486dbc0d34c25d9ce015afd9e4027f5945571d51094240f4a
hovercard-subject-tagpull_request:4885693262
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/graphql-java/java-dataloader/pull/291/files
twitter:imagehttps://avatars.githubusercontent.com/u/8524109?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/8524109?s=400&v=4
og:image:altFixes #290. In ticker mode, dispatchOrReschedule started a new self-rescheduling task for every data loader on every dispatchAll() call, and the chains from earlier calls kept running. Pending exec...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/graphql-java/java-dataloader git https://github.com/graphql-java/java-dataloader.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id97364654
octolytics-dimension-repository_nwographql-java/java-dataloader
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id97364654
octolytics-dimension-repository_network_root_nwographql-java/java-dataloader
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/java-dataloader/pull/291/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fjava-dataloader%2Fpull%2F291%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%2Fgraphql-java%2Fjava-dataloader%2Fpull%2F291%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=graphql-java%2Fjava-dataloader
Reloadhttps://github.com/graphql-java/java-dataloader/pull/291/files
Reloadhttps://github.com/graphql-java/java-dataloader/pull/291/files
Reloadhttps://github.com/graphql-java/java-dataloader/pull/291/files
graphql-javahttps://github.com/graphql-java
java-dataloaderhttps://github.com/graphql-java/java-dataloader
Codehttps://github.com/graphql-java/java-dataloader
Issues2 (2)https://github.com/graphql-java/java-dataloader/issues
Pull requests18 (18)https://github.com/graphql-java/java-dataloader/pulls
Discussionshttps://github.com/graphql-java/java-dataloader/discussions
Actionshttps://github.com/graphql-java/java-dataloader/actions
Projectshttps://github.com/graphql-java/java-dataloader/projects
Wikihttps://github.com/graphql-java/java-dataloader/wiki
Security and qualityhttps://github.com/graphql-java/java-dataloader/security
Insightshttps://github.com/graphql-java/java-dataloader/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fgraphql-java%2Fjava-dataloader%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgraphql-java%2Fjava-dataloader%2Fissues%2Fnew%2Fchoose
bbakermanhttps://github.com/bbakerman
graphql-java:masterhttps://github.com/graphql-java/java-dataloader/tree/master
Meemaw:ticker-mode-single-pending-taskhttps://github.com/Meemaw/java-dataloader/tree/ticker-mode-single-pending-task
Conversation 2 https://github.com/graphql-java/java-dataloader/pull/291
Commits 1 https://github.com/graphql-java/java-dataloader/pull/291/commits
Checks 1 https://github.com/graphql-java/java-dataloader/pull/291/checks
Files changed https://github.com/graphql-java/java-dataloader/pull/291/files
Please reload this pagehttps://github.com/graphql-java/java-dataloader/pull/291/files
Keep one pending ticker task per ScheduledDataLoaderRegistry https://github.com/graphql-java/java-dataloader/pull/291/files#top
Show all changes 1 commit https://github.com/graphql-java/java-dataloader/pull/291/files
779a6f8 Keep one pending ticker task per ScheduledDataLoaderRegistry Meemaw Oct 16, 2026 https://github.com/graphql-java/java-dataloader/pull/291/commits/779a6f807061c0468ecb9f9b7d81505433324b0c
Clear filters https://github.com/graphql-java/java-dataloader/pull/291/files
Please reload this pagehttps://github.com/graphql-java/java-dataloader/pull/291/files
Please reload this pagehttps://github.com/graphql-java/java-dataloader/pull/291/files
ScheduledDataLoaderRegistry.java https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
ScheduledDataLoaderRegistryTest.java https://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
src/main/java/org/dataloader/registries/ScheduledDataLoaderRegistry.javahttps://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
View file https://github.com/Meemaw/java-dataloader/blob/779a6f807061c0468ecb9f9b7d81505433324b0c/src/main/java/org/dataloader/registries/ScheduledDataLoaderRegistry.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/java-dataloader/pull/291/{{ revealButtonHref }}
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-80b84eb93b557ef760c8d07f70cc14f607381d095fb5ba1e9dd96465446fce31
src/test/java/org/dataloader/registries/ScheduledDataLoaderRegistryTest.javahttps://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
View file https://github.com/Meemaw/java-dataloader/blob/779a6f807061c0468ecb9f9b7d81505433324b0c/src/test/java/org/dataloader/registries/ScheduledDataLoaderRegistryTest.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/java-dataloader/pull/291/{{ revealButtonHref }}
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
https://github.com/graphql-java/java-dataloader/pull/291/files#diff-e99c2733e4dd81edb1e1f555da5553e6e58c735d7c1b4ee14f120fab682daf6d
Please reload this pagehttps://github.com/graphql-java/java-dataloader/pull/291/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

Viewport: width=device-width


URLs of crawlers that visited me.