hiero-ledger / hiero-ledger/hiero-consensus-node

Disallow backpressure for direct schedulers

Open
#10,870 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Platform
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.