Skip to content

RecvBuffer simplifications [2/N] #4975

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

guhetier
Copy link
Contributor

@guhetier guhetier commented Apr 4, 2025

Description

Part of a series of PR to simplify the receive buffer code by unifying the handling of the different buffer modes where possible.

This change:

  • introduces an iterator over the receive buffer chunk list. It provides a view to the contiguous spans of data in chunk list, skipping an initial offset
  • refactors the read and write operations using the iterator
  • introduce a validation function to enforce the receive buffer invariants consistently

Testing

CI

Documentation

N/A

@guhetier guhetier force-pushed the guhetier/recv_buffer_refactor_1 branch from 234c035 to 9828cb6 Compare April 11, 2025 18:25
Base automatically changed from guhetier/recv_buffer_refactor_1 to main April 11, 2025 20:31
@guhetier guhetier force-pushed the guhetier/recv_buffer_refactor_2 branch from 1567a7b to aebcfeb Compare April 11, 2025 21:13
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 98.70130% with 1 line in your changes missing coverage. Please review.

Project coverage is 85.90%. Comparing base (3785f6c) to head (3cfc8e3).

Files with missing lines Patch % Lines
src/core/recv_buffer.c 98.70% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4975      +/-   ##
==========================================
- Coverage   87.18%   85.90%   -1.29%     
==========================================
  Files          59       59              
  Lines       18011    17913      -98     
==========================================
- Hits        15703    15388     -315     
- Misses       2308     2525     +217     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@guhetier guhetier marked this pull request as ready for review April 14, 2025 21:07
@guhetier guhetier requested a review from a team as a code owner April 14, 2025 21:07
@nibanks nibanks added the Area: Core Related to the shared, core protocol logic label Apr 15, 2025
nibanks
nibanks previously approved these changes Apr 15, 2025
@guhetier guhetier force-pushed the guhetier/recv_buffer_refactor_2 branch from 5b0e36c to 3cfc8e3 Compare April 17, 2025 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Core Related to the shared, core protocol logic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants