Add DiscardWithThreshold support
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 141
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
This proposal is related to #4, but with a slight difference. Instead of discarding calls as soon as the group size is reached, the discard process will begin only after a certain threshold is reached. In other words, if the group size is N and the threshold is M (M must be >= N), discarding will only occur when the number of "in-flight" calls exceeds M. If N == M or M == 0, this should work the same way as the standard Discard option.
This is an intriguing challenge, and not as straightforward as it seems. Please feel free to volunteer if you're interested in exploring concurrency a bit further.
Contributor guide
No contributing guide indexed for this repository
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 issue #4 and the existing implementation of the standard Discard option; no file or test is named in this issue. Trace how in-flight calls and group size are handled, then define the threshold behavior, including M >= N, N == M, and M == 0. Done means the new option discards only after the threshold is exceeded and matches Discard in the specified equivalent cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100