Skip to content
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

Unexpected Upstash-Deduplication-Id / Upstash-Content-Based-Deduplication behavior #39

Open
privet-fun opened this issue Jul 23, 2023 · 3 comments

Comments

@privet-fun
Copy link

Steps to reproduce:

1: Create new scheduled tast:

POST https://qstash.upstash.io/v1/publish/<my_webworker_url>
Headers
Upstash-Cron: * * * * *
Upstash-Deduplication-Id: abcd

Response: HTTP 201 Created
Body: { "scheduleId": "scd_uniqueId" "}

2: Verify that deduplication is working by repeating step 1

Response: HTTP 202 Accepted

3: Delete schedule

DELETE https://qstash.upstash.io/v1/schedules/scd_uniqueId

Response: HTTP 202 Accepted
Body: { "status": "accepted" }

4: Go to https://console.upstash.com/qstash?tab=details and verify that scheduled task deleted

5: Attempt to create new schedule task as in step 1

Response: HTTP 202 Accepted
Body: { "scheduleId": "scd_uniqueId" "}

Notice that scheduled task was NOT created which is unexpected as it was just deleted one step ago and so using same Upstash-Deduplication-Id should be allowed.

Same happens with Upstash-Content-Based-Deduplication: true

@privet-fun privet-fun changed the title Odd Upstash-Deduplication-Id / Upstash-Content-Based-Deduplication behavior Unexpected Upstash-Deduplication-Id / Upstash-Content-Based-Deduplication behavior Jul 23, 2023
@chronark
Copy link
Contributor

Deduplication ids are cached for 90 days currently. so this is expected I believe

@santhosh-ps
Copy link

I'm running into the same issue, can I recreate the schedule with the same Deduplication ID if it's already deleted?
@chronark, is there any option to remove it from the cache?

@CahidArda
Copy link
Contributor

CahidArda commented Sep 9, 2024

Hi @santhosh-ps,

This issue is from QStash v1. We now have v2.

Can you provide more details about what you want to achieve?

If you want to make sure that a schedule doesn't get created twice, you can use Upstash-Schedule-Id header.

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

No branches or pull requests

4 participants