Skip to content

Conversation

@lizk886
Copy link
Contributor

@lizk886 lizk886 commented Oct 13, 2025

  • Update Main.java to wire keysetkey verticle callback to shutdown handler
  • Add Consumer import and overloaded createAndDeployRotatingStoreVerticle method
  • Add 7-day timeout parameter to OperatorShutdownHandler constructor
  • Maintains backward compatibility with existing constructors

- Update Main.java to wire keysetkey verticle callback to shutdown handler
- Add Consumer import and overloaded createAndDeployRotatingStoreVerticle method
- Update KeyManager to accept keyAvailabilityHandler callback
- Call handler on successful/failed key retrieval in getMasterKey/getRefreshKey
- Add 7-day timeout parameter to OperatorShutdownHandler constructor
- Maintains backward compatibility with existing constructors

This enables the operator to shut down after 7 days of consecutive keyset key
sync failures, allowing Kubernetes to restart and potentially recover.
@lizk886 lizk886 marked this pull request as ready for review October 14, 2025 06:44
public void handleKeysetKeyRefreshResponse(Boolean success) {
if (success) {
keysetKeyFailureStartTime.set(null);
lastKeysetKeyFailureLogTime.set(null);
Copy link
Contributor

Choose a reason for hiding this comment

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

we can move lastKeysetKeyFailureLogTime encapsulated into logKeysetKeyFailureProgressAtInterval

Copy link
Contributor Author

@lizk886 lizk886 Oct 14, 2025

Choose a reason for hiding this comment

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

Clearing lastKeysetKeyFailureLogTime in the "success" branch is for if there was a previous failure followed by recovery, the timer for progress logging will reset. This prevents any cached timing from a past failure from causing premature logs after a successful sync.
Keep these value settings here helps tests where we need consistent log timings.
I did simplify logKeysetKeyFailureProgressAtInterval more by passing in elaspsed

@lizk886 lizk886 merged commit aa220f1 into main Oct 14, 2025
9 of 12 checks passed
@lizk886 lizk886 deleted the wzh-UID2-5964-fail-fast-keysetkey-7days branch October 14, 2025 22:20
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.

3 participants