Skip to content

Fix RemoteScheduler ignoring local quartz.scheduler.instanceName (#313)#2953

Merged
lahma merged 3 commits into
3.xfrom
instance-name
Mar 29, 2026
Merged

Fix RemoteScheduler ignoring local quartz.scheduler.instanceName (#313)#2953
lahma merged 3 commits into
3.xfrom
instance-name

Conversation

@lahma

@lahma lahma commented Mar 29, 2026

Copy link
Copy Markdown
Member

Summary

  • RemoteScheduler.SchedulerName fetched the name from the remote server, ignoring the locally configured quartz.scheduler.instanceName. This caused SchedulerRepository lookup/bind key mismatches (lookup by local name, bind by remote name) and prevented multiple proxies to remotes sharing the same scheduler name.
  • Added a new RemoteScheduler constructor overload accepting the local scheduler name, with fallback to the remote name when using the existing constructor for full backwards compatibility.
  • Updated StdSchedulerFactory to pass the configured schedName to the new constructor.

Fixes #313

Test plan

  • New unit tests: local name returned when provided, fallback to remote when not, no remote contact needed when local name is set
  • dotnet test src/Quartz.Tests.Unit/Quartz.Tests.Unit.csproj --filter "FullyQualifiedName~RemoteScheduler"
  • Full unit test suite passes

🤖 Generated with Claude Code

lahma and others added 3 commits March 29, 2026 19:36
…er.instanceName (#313)

RemoteScheduler.SchedulerName fetched the name from the remote server,
ignoring the locally configured instanceName. This caused repository
lookup/bind key mismatches and prevented multiple proxies to remotes
sharing the same name.

Add a constructor overload that accepts the local scheduler name, with
fallback to the remote name for backwards compatibility.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The shutdown test mutates the singleton SchedulerRepository.Instance,
so it needs try/finally cleanup and must not run in parallel with other
fixtures that touch the repository.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
@lahma lahma added the port-main Requires porting to main branch label Mar 29, 2026
@sonarqubecloud

Copy link
Copy Markdown

@lahma
lahma merged commit e64eeda into 3.x Mar 29, 2026
15 checks passed
@lahma
lahma deleted the instance-name branch March 29, 2026 16:47
@lahma lahma removed the port-main Requires porting to main branch label Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant