Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add configurable wait_before_drop time in case of CongestionControl::Drop #848

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

JEnoch
Copy link
Member

@JEnoch JEnoch commented Mar 19, 2024

Fix #847

Add in configuration within transport/link/tx/queue a configuration section for CongestionControl:

          /// Congestion occurs when the queue is empty (no available batch).
          /// Using CongestionControl::Block the caller is blocked until a batch is available and re-insterted into the queue.
          /// Using CongestionControl::Drop the message might be dropped, depending on conditions configured here.
          congestion_control: {
            /// The maximum time in nanosecond to wait for an available batch before dropping the message if still no batch is available.
            wait_before_drop: 1000000
          },

This wait_before_drop setting is used by Zenoh in case of CongestionControl::Drop to wait for this amount of time for an available batch in the batches queue.

@JEnoch JEnoch requested a review from Mallets March 19, 2024 16:34
@JEnoch JEnoch self-assigned this Mar 19, 2024
DEFAULT_CONFIG.json5 Outdated Show resolved Hide resolved
Copy link
Member

@Mallets Mallets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, just left a couple of comments that should be addressed before merging.

@Mallets Mallets enabled auto-merge (squash) March 20, 2024 13:37
@Mallets Mallets merged commit 1d1df0e into main Mar 20, 2024
14 checks passed
JEnoch added a commit to ZettaScaleLabs/zenoh that referenced this pull request Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

CongestionControl::Drop is too agressive
2 participants