pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

Fix delay messages are expired by TTL policy

Open wolfstudy opened this issue 3 years ago • 15 comments
trafficstars

Signed-off-by: xiaolongran [email protected]

Motivation

The current TTL policy conflicts with delayed messages. The TTL policy does not identify how long to delay messages. When the time of the delayed message is greater than the time specified by TTL, we should give up checking the TTL of the current delayed message, because the time of the delayed message has not yet arrived, we cannot expired these messages.

Modifications

When the TTL is ready to expire the message, check whether the current entry contains the deliverAtTime field. If it contains a delayed message, then check whether the current delayed message time is greater than the ttl time. If it is greater, it means that we cannot expire the current entry at this time. .

wolfstudy avatar May 17 '22 02:05 wolfstudy

@wolfstudy:Thanks for your contribution. For this PR, do we need to update docs? (The PR template contains info about doc, which helps others know more about the changes. Can you provide doc-related info in this and future PR descriptions? Thanks)

github-actions[bot] avatar May 17 '22 02:05 github-actions[bot]

@wolfstudy:Thanks for providing doc info!

github-actions[bot] avatar May 17 '22 02:05 github-actions[bot]

Small Question:

Why don't we cherry-pick this PR to branch 2.10?

mattisonchao avatar Jun 09 '22 09:06 mattisonchao

Another question about this PR:

For pulsar, does the delayed message have a higher priority than TTL?

mattisonchao avatar Jun 09 '22 09:06 mattisonchao

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Aug 25 '22 02:08 github-actions[bot]

Sorry, I forgot to follow up on this change follow-up, now add a test case for this.

PTAL again, @eolivelli @merlimat thanks.

wolfstudy avatar Oct 18 '22 09:10 wolfstudy

@wolfstudy Please add the following content to your PR description and select a checkbox:

- [ ] `doc` <!-- Your PR contains doc changes -->
- [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
- [ ] `doc-not-needed` <!-- Your PR changes do not impact docs -->
- [ ] `doc-complete` <!-- Docs have been already added -->

github-actions[bot] avatar Oct 19 '22 03:10 github-actions[bot]

very good

I left one suggestion in order to save resources and GC time

Hello @eolivelli, PTAL again thanks.

wolfstudy avatar Oct 19 '22 06:10 wolfstudy

ping @eolivelli PTAL again, thanks

wolfstudy avatar Oct 21 '22 03:10 wolfstudy

ping @eolivelli PTAL again, thanks

wolfstudy avatar Oct 24 '22 04:10 wolfstudy

/pulsar-bot rereun-failure-checks

eolivelli avatar Oct 26 '22 06:10 eolivelli

@wolfstudy hi, I move this PR to release/2.9.5, if you have any questions, please ping me. thanks.

congbobo184 avatar Nov 17 '22 12:11 congbobo184

The pr had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Dec 18 '22 01:12 github-actions[bot]

Since we will start the RC version of 3.0.0 on 2023-04-11, I will change the label/milestone of PR who have not been merged.

  • The PR of type feature is deferred to 3.1.0
  • The PR of type fix is deferred to 3.0.1

So drag this PR to 3.0.1

poorbarcode avatar Apr 10 '23 08:04 poorbarcode

As discussed on the mailing list https://lists.apache.org/thread/w4jzk27qhtosgsz7l9bmhf1t7o9mxjhp, there is no plan to release 2.9.6, so I am going to remove the release/2.9.6 label

michaeljmarshall avatar Jun 27 '23 21:06 michaeljmarshall