Skip to content

Setting MoreCreditAfter larger than InitialCredit may cause unrecoverable flow control #13041

Answered by ansd
JimmyWang6 asked this question in Ideas
Discussion options

You must be logged in to vote

The default setting is {credit_flow_default_credit, {400, 200}} and has the form {InitialCredit, MoreCreditAfter}.

To provide an example: The reader proc sends messages to the channel proc. The reader proc has initially 400 credits. After the channel proc received the first 200 messages from the reader proc, the channel proc grants another 200 credits to the reader proc.

If you now flip {InitialCredit, MoreCreditAfter} as you did in this issue, it means that the reader proc has only 200 credits initially and that the channel will grant new credits only after the channel receives 400 messages from the reader. However, this will never happen because the reader blocks after having sent 200 m…

Replies: 3 comments 10 replies

Comment options

You must be logged in to vote
6 replies
@michaelklishin
Comment options

@michaelklishin
Comment options

@michaelklishin
Comment options

@JimmyWang6
Comment options

@mkuratczyk
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@JimmyWang6
Comment options

@ansd
Comment options

ansd Jan 9, 2025
Maintainer

@ansd
Comment options

ansd Jan 9, 2025
Maintainer

@michaelklishin
Comment options

Answer selected by ansd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants