Skip to content

GH-3334: Add "embedded reaper" into CorrelationMH #3342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 20, 2020

Conversation

artembilan
Copy link
Member

Fixes #3334

  • Add expireTimeout property into AbstractCorrelatingMessageHandler
    to call newly introduced purgeOrphanedGroups() API for removing old
    groups from the store
  • Add expireDuration to perform purgeOrphanedGroups() task periodically

@artembilan
Copy link
Member Author

If this is OK, I'll go ahead with Java DSL and XML options.
Plus docs, of course.

Copy link
Contributor

@garyrussell garyrussell left a comment

Choose a reason for hiding this comment

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

LGTM to proceed with other changes (and fix travis checkstyle).

Comment on lines 88 to 91
* When the {@link #expireTimeout} is more than 0, the groups which older then this timeout
* is purged from the store on start up (or when {@link #purgeOrphanedGroups()} is called).
* If {@link #expireDuration} is provide, the task is scheduled to perform
* {@link #purgeOrphanedGroups()} periodically.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* When the {@link #expireTimeout} is more than 0, the groups which older then this timeout
* is purged from the store on start up (or when {@link #purgeOrphanedGroups()} is called).
* If {@link #expireDuration} is provide, the task is scheduled to perform
* {@link #purgeOrphanedGroups()} periodically.
* When the {@link #expireTimeout} is greater than 0, groups which are older than this timeout
* are purged from the store on start up (or when {@link #purgeOrphanedGroups()} is called).
* If {@link #expireDuration} is provides, the task is scheduled to perform
* {@link #purgeOrphanedGroups()} periodically.

Comment on lines 327 to 330
* Used on startup and if {@link #expireDuration} is provided the task for {@link #purgeOrphanedGroups()}
* is scheduled with that period.
* The {@link #forceReleaseProcessor} is used to process those expired groups according
* the "force complete" options.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Used on startup and if {@link #expireDuration} is provided the task for {@link #purgeOrphanedGroups()}
* is scheduled with that period.
* The {@link #forceReleaseProcessor} is used to process those expired groups according
* the "force complete" options.
* Used on startup and when an {@link #expireDuration} is provided, the task for running
* {@link #purgeOrphanedGroups()} is scheduled with that period.
* The {@link #forceReleaseProcessor} is used to process those expired groups according
* the "force complete" options. A group can be orphaned if a persistent message group
* store is used and no new messages arrive for that group after a restart.

Fixes spring-projects#3334

* Add `expireTimeout` property into `AbstractCorrelatingMessageHandler`
to call newly introduced `purgeOrphanedGroups()` API for removing old
groups from the store
* Add `expireDuration` to perform `purgeOrphanedGroups()` task periodically
Co-authored-by: Gary Russell <[email protected]>
@artembilan artembilan requested a review from garyrussell July 20, 2020 19:31
@garyrussell
Copy link
Contributor

Some problem with Flux aggregator test in travis - maybe not related but suspicious given this code is in the aggregator.

@artembilan
Copy link
Member Author

No, not related. I so it failing here on Travis before.
Probably really some timing issue when CPU is too busy with other tasks...

@garyrussell garyrussell merged commit 492f0bf into spring-projects:master Jul 20, 2020
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.

Aggregator - Orphaned Groups Don't Time Out After Restart
2 participants