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

Add lease denylists #1334

Merged
merged 4 commits into from
May 9, 2024
Merged

Add lease denylists #1334

merged 4 commits into from
May 9, 2024

Conversation

tonyhb
Copy link
Contributor

@tonyhb tonyhb commented May 9, 2024

This commit introduces lease denylists for queue items. When attempting
to lease queue items, we pull a chunk of work from the queue in FIFO
order as a list of queue items. We iterate through this list, and
attempt to lease the queue item.

The queue item may fail to lease because of concurrency keys or
throttling keys. In this case, we may still keep iterating on the list
to attempt to process other items with different concurrency keys.

We add these failed keys to a denylist, and never attempt to lease those
queue items within the same iterations. This keeps FIFO order and
prevents queue churn.

Note that denylists are temporary and only exist per executor for the
function currently being peeked.

Type of change (choose one)

  • Chore (refactors, upgrades, etc.)
  • Bug fix (non-breaking change that fixes an issue)
  • Security fix (non-breaking change that fixes a potential vulnerability)
  • Docs
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

Checklist

  • I've linked any associated issues to this PR.
  • I've tested my own changes.

Check our Pull Request Guidelines

Copy link

vercel bot commented May 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
ui ⬜️ Ignored (Inspect) Visit Preview May 9, 2024 5:57pm

This commit introduces lease denylists for queue items.  When attempting
to lease queue items, we pull a chunk of work from the queue in FIFO
order as a list of queue items. We iterate through this list, and
attempt to lease the queue item.

The queue item may fail to lease because of concurrency keys or
throttling keys.  In this case, we may still keep iterating on the list
to attempt to process *other* items with *different* concurrency keys.

We add these failed keys to a denylist, and never attempt to lease those
queue items within the same iterations.  This keeps FIFO order and
prevents queue churn.
@darwin67 darwin67 merged commit 5542241 into main May 9, 2024
12 checks passed
@darwin67 darwin67 deleted the feature/lease-denylists branch May 9, 2024 18: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.

None yet

2 participants