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

Peek further ahead of queue dynamically #1336

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

darwin67
Copy link
Collaborator

@darwin67 darwin67 commented May 9, 2024

Description

Make function queue peek more dynamic, so it guarantees it can at least process X amount of items.

This is useful, especially when concurrency hits and the executor ends up spinning over and over the same queue items. With this change, the queue processor should be able to look further ahead even if there are concurrency limited items backing up the function queue.

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 10, 2024 4:57pm

local partitionKey = KEYS[1]
local keyGlobalPartitionPtr = KEYS[2]
local keyShardPartitionPtr = KEYS[3]
local partitionConcurrencyKey = KEYS[4]
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should I do anything with the partition concurrency when extending?

end

-- update the lease
-- NOTE: should `last` also be updated???
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should last be updated as well?
considering this is extending the lease, I don't think it does, but would be good to verify.

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

1 participant