Skip to content

Conversation

@thjaeckle
Copy link
Member

  • during recovery, use much higher ask timeouts
  • after recovery, fall back to lower one
  • use configured values instead of hardcoded ones

…o be dependent on recovery

* during recovery, use much higher ask timeouts
* after recovery, fall back to lower one
* use configured values instead of hardcoded ones
@thjaeckle thjaeckle self-assigned this Dec 18, 2025
@thjaeckle thjaeckle added the bug label Dec 18, 2025
@thjaeckle thjaeckle requested a review from Copilot December 18, 2025 10:39
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses the issue of hard-coded local ask timeouts by making them configurable and recovery-aware. The changes enable the system to use longer timeouts during recovery and shorter ones during normal operation, improving reliability during system startup and recovery scenarios.

Key changes:

  • Introduced LocalAskTimeoutConfig to replace hard-coded 5-second timeouts
  • Added recovery-aware timeout logic that uses different timeouts before and after persistence actor recovery
  • Updated enforcer actors to receive and handle PA_RECOVERED signals

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ThingSupervisorActor.java Passes localAskTimeoutConfig to ThingEnforcerActor and propagates timeout to smart channel dispatching and policy enrichment
SupervisorSmartChannelDispatching.java Removes hard-coded timeout constant and accepts timeout as parameter for twin queries
SupervisorInlinePolicyEnrichment.java Removes hard-coded timeout constant and accepts timeout as parameter for policy retrieval
ThingEnforcerActor.java Adds localAskTimeoutConfig parameter and uses dynamic timeout for local actor invocations
PolicyCommandEnforcementTest.java Updates test to provide required LocalAskTimeoutConfig parameter
PolicySupervisorActor.java Passes localAskTimeoutConfig to PolicyEnforcerActor
PolicyEnforcerActor.java Adds localAskTimeoutConfig parameter to constructor and factory method
AbstractPolicyLoadingEnforcerActor.java Forwards localAskTimeoutConfig to parent class
AbstractEnforcerActor.java Implements recovery-aware timeout logic with PA_RECOVERED signal handling
AbstractPersistenceSupervisor.java Makes timeout determination method protected and propagates PA_RECOVERED signal to enforcer child

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@kalinkostashki kalinkostashki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@thjaeckle thjaeckle added this to the 3.9.0 milestone Dec 18, 2025
@thjaeckle thjaeckle merged commit 205bd3a into eclipse-ditto:master Dec 18, 2025
2 of 3 checks passed
@thjaeckle thjaeckle modified the milestones: 3.9.0, 3.8.11 Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants