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

Make LockAndFetchHandler queue's capacity configurable #4885

Open
2 tasks
joaquinfelici opened this issue Jan 8, 2025 · 1 comment
Open
2 tasks

Make LockAndFetchHandler queue's capacity configurable #4885

joaquinfelici opened this issue Jan 8, 2025 · 1 comment
Assignees
Labels
type:feature Issues that add a new user feature to the project. version:7.23.0

Comments

@joaquinfelici
Copy link
Contributor

joaquinfelici commented Jan 8, 2025

User Story (Required on creation)

As a developer, I want to be able to configure the BlockingQueue capacity according to my needs.

Functional Requirements (Required before implementation)

The BlockingQueue capacity is fixed to 200 today. This value should be configurable.

Technical Requirements (Required before implementation)

  • When initializing the queue, the capacity of the queue should be determine according to a new property (e.g. fetch-and-lock-queue-capacity), that should behave similarly to the fetch-and-lock-unique-worker-request property.
  • If the property is not set, the default value (e.g. the current value of 200) must be used.

Limitations of Scope

Hints

Links

Breakdown

Pull Requests

Preview Give feedback
  1. ci:all-as ci:rest-api
    joaquinfelici
  2. joaquinfelici

Dev2QA handover

  • Does this ticket need a QA test and the testing goals are not clear from the description? Add a Dev2QA handover comment
@joaquinfelici joaquinfelici added the type:feature Issues that add a new user feature to the project. label Jan 8, 2025
@joaquinfelici joaquinfelici self-assigned this Jan 8, 2025
@joaquinfelici
Copy link
Contributor Author

Decision making details

  • Property naming: The property was named fetch-and-lock-queue-capacity. Even though the epic mentions configuring the queue "size", the BlockingQueue size and capacity are two distinct concepts (ref). The capacity refers to the number of elements that can be put in the queue without blocking, and the size is the number of elements in the queue at a given moment. The value we want to configure is the initial capacity of the queue, which at all times will be equal to queue.remainingCapacity() + queue.size().
  • Default value: It was decided to keep a default value of 200 (as it was originally hardcoded) to avoid introducing behavioral changes for users who don't intentionally set this new property. The default value will be used when:
    • The property is not set.
    • The property is set and invalid (NaN or <= 0), for which case a warning will also be logged.
  • Documentation: Documentation about this change will be added in the Long Polling to Fetch and Lock External Tasks section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:feature Issues that add a new user feature to the project. version:7.23.0
Projects
None yet
Development

No branches or pull requests

2 participants