hiero-ledger / hiero-ledger/hiero-consensus-node
Disallow backpressure for direct schedulers
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 407
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
It is currently possible to configure a direct (or direct static) task scheduler with an unhandled task capacity which enables back pressure. Back pressure does not make sense for direct schedulers because the task is executed immediately on the scheduling thread.
One solution is to add logic to `TaskSchedulerBuilder.withType()` to check if the type being set is direct and the unhandled capacity is already set, and logic to `TaskSchedulerBuilder.withUnhandledTaskCapacity()` that checks if the type is already set to direct. In each case, if the combination of type and unhandled task capacity are incompatible, throw an exception.
This check could also be done in the `TaskSchedulerBuilder.build()` method.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading TaskSchedulerBuilder.withType(), withUnhandledTaskCapacity(), and build(), which the issue identifies as possible locations for the validation. Trace how direct and direct static scheduler types are represented and how unhandled task capacity is stored. Done means incompatible configurations are rejected consistently, with tests covering both configuration orders.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100