Unable to set the link-credit to zero without setting the drain flag
- Dominant language
- C#
- Stars
- 419
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
Currently within `ReceiverLink.SetCredit` the only way to explicitly set this zero is to use `CreditMode.Drain`. Is it possible to add a way to allow setting `credit` to zero without setting the `drain` flag?
`CreditMode.Manual` increments the credit, and using a negative value would then cause the wrong flow to be sent due to the cast to `uint` later in the method. `CreditMode.Auto` seems to only allow incrementing of the credit.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in ReceiverLink.SetCredit and trace how CreditMode.Manual, CreditMode.Auto, and CreditMode.Drain handle the credit value. Determine an API path that explicitly sets credit to zero without setting the drain flag, while avoiding the negative-value cast behavior. Done means zero credit can be sent without drain semantics and existing modes retain their behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- backend-api-design
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100