Skip to content

Lowlatency async finalize #1894

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

Merged

Conversation

yellowhatter
Copy link
Contributor

Async finalize lowlatency transport when triggered from link to avoid deadlock (the same approach as it is done in unicast transport)

… deadlock (the same approach as it is done in unicast transport)
@yellowhatter yellowhatter added bug Something isn't working release Part of the next release labels Apr 8, 2025
@yellowhatter yellowhatter self-assigned this Apr 8, 2025
Copy link

codecov bot commented Apr 8, 2025

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 71.05%. Comparing base (3bb792e) to head (47394f5).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
io/zenoh-transport/src/unicast/lowlatency/link.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1894      +/-   ##
==========================================
- Coverage   71.21%   71.05%   -0.16%     
==========================================
  Files         364      364              
  Lines       65480    65480              
==========================================
- Hits        46630    46528     -102     
- Misses      18850    18952     +102     

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

@yellowhatter
Copy link
Contributor Author

According to #1893 , this PR fixes #1859

@yellowhatter yellowhatter marked this pull request as ready for review April 8, 2025 12:53
@yellowhatter yellowhatter requested a review from YuanYuYuan April 8, 2025 12:55
@YuanYuYuan
Copy link
Contributor

LGTM

@YuanYuYuan YuanYuYuan merged commit cca48c8 into eclipse-zenoh:main Apr 8, 2025
21 checks passed
fuzzypixelz added a commit that referenced this pull request Apr 10, 2025
* deserialize frame lazily (#1856)

* deserialize frame lazily

* remove useless rewind

* qos overwriter no longer checks ke of message types that should not be affected (#1862)

* qos overwriter no longer checks ke's of message types that should not be affected

* do not affect ResponseFinal messages

* Add new non periodic last sample miss detection mechanism (#1861)

* Add AdvancedPublisher MissDetectionConfig heartbeat_update option

* Update doc

* Rename heartbeat_update to heartbeat_change

* Rename heartbeat_change to sporadic_heartbeat

* Make heartbeat and sporadic_heartbeat mutually exclusive

* Avoid crashing when handling highly chunked keys (#1826)

* remove recursions from resource tree

* fix lint

* Improve tracing (#1844)

* Add log in queries response.

Signed-off-by: ChenYing Kuo <[email protected]>

* Have a consistent log.

Signed-off-by: ChenYing Kuo <[email protected]>

* Align the log in queries.

Signed-off-by: ChenYing Kuo <[email protected]>

* Add log in advanced_publisher and advanced_subscriber.

Signed-off-by: ChenYing Kuo <[email protected]>

* Prompt users that some messages is downsampled.

Signed-off-by: ChenYing Kuo <[email protected]>

* Add undeclare log for advanced publisher and subscriber.

Signed-off-by: ChenYing Kuo <[email protected]>

* Remove unnecessary OnceLock

* Add tracing level trace in downsampling

* traces harmonization

* Add traces for historical and missing samples queries

* Add traces

* Add traces

* Harmonize traces

---------

Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>

* Make SHM segment cleanup routine more robust (#1866)

* Make SHM segment cleanup routine more robust

* review fixes

* Fix memory leak in shm segment cleanup (#1867)

* Add low pass filter (#1868)

* Add lowpass interceptor

* Add link_protocols to lowpass config

* Address clippy warnings

* Add tests for lowpass with link_protocols config

* use cache in lowpass interceptor

* Fix identation in rustdoc (#1874)

* chore: Bump version to `1.3.1`

* chore: Bump /zenoh.*/ dependencies to `1.3.1`

* chore: Update Cargo lockfile

* Revert "Refactor for batching wait: (#1843)" (#1875)

This reverts commit 7655467.

* chore: Merge release/1.3.1 into main (#1882)

* chore: Bump version to `1.3.1`

* chore: Bump /zenoh.*/ dependencies to `1.3.1`

* chore: Update Cargo lockfile

---------

Co-authored-by: eclipse-zenoh-bot <[email protected]>

* Revert "chore: Merge release/1.3.1 into main (#1882)"

This reverts commit 76eadaf.

* Fix semver checks (#1883)

* Update ci.yml

* chore: Bump version to `1.3.2`

* chore: Bump /zenoh.*/ dependencies to `1.3.2`

* chore: Update Cargo lockfile

* Bug/fix batching wait regression (#1881)

* add large message scenario to transport tests (reproduces regression)

* Revert "Revert "Refactor for batching wait: (#1843)" (#1875)"

This reverts commit d05b59b.

* fix regression

* fix rustfmt

* [ZEN-526] Add Bind config option (#1892)

* Add config option <proto>/<addr>[?<metadata>]#bind=<addr> to tcp and TLS Endpoint

* remove debug statement

* add check for protocol equality for bind option tcp

* Fix error Type

* Add quic support to bind to specific address on config `bind`

* add udp bind to local socket based on `bind` config item

* Improved ambiguous error messages

* add test including bind option

* Fix DEFAULT_CONFIG.json5 comments

* Fix TCP client socket binding

* Add bind support for multicast

* move import below header

* use x_get_addr/s to get ip address from Local DNS name

* add note stating unsupported combination `bind` and `iface`

* fmt

* Get IP from SocketAddr - fix merge

* Expose Direct access to Address inner, replace Endpoint creation with Address, Add test `openclose_tcp_only_listen_with_bind_restriction`

* impl<'a> From<&'a str> for Address<'a>

* Add Test for: bind+iface, Add Test for: Only bind success

* remove client2 from unicast bind, add protocol mismatch test, add udp iface+bind test, add udp bind only test

* add unicast quic and tls bind config tests

* Replace dummy Endpoint with Address::from(str)

* fmt

* Fix Port numbers: Unicast bind test

* fix missing # in udp bind test

* fix quic bind test: Use localhost, fix tls bind test: Use localhost

* remove debug print

* remove linux specific test conditional

* Add test udp fail mismatch protocols ipv4 <-> ipv6

* fmt

* Remove restriction on unix for certs

* Fix lints

* manually bind to udp_socket irrespective of iface, fixes WSAEINVAL - 10022 when run on windows with ipv6::localhost bind config option. Improve error messages

* fix spelling error

* Add Check in test: link address is connecting to bind address

* Swap src and dst address causing inccorect address to be bound to

* fmt

* Fix elided lifetime

* Add test to convert bind_addr from hostname to ipv4 address

---------

Co-authored-by: Charles Schleich <[email protected]>

* Lowlatency async finalize (#1894)

* Async finalize lowlatency transport when triggered from link to avoid deadlock (the same approach as it is done in unicast transport)

* fix lints

* Maintain keyexpr type in interceptors (#1851)

* Cache keyexpr as `OwnedKeyExpr` instead of `String`

* Rebase against main

* Fix test build

* Fix low pass interceptor

* Add `Resource::keyexpr`

* Clippy errors (1)

* Pass messages by reference instead of by value (#1828)

* pass messages by reference instead of by value

* fix lints

* fix lints2

* revert unexpected committed changes

* fix doc

* remove macro to please his majesty

* fix merge

* fix low_pass filter

* Add `low_pass_filter/link_protocols` to DEFAULT_CONFIG.json5 (#1895)

* [ZEN-529], [ZEN-534] Add downsampler dropped messages and low pass dropped messages and bytes to stats (#1873)

* add labels support to stats

* pass stats to TransportUnicastXXX::make instead of creating them inside

* add cert_common_name to stat labels if available

* remove space between subsequent labels

* remove already dropped children after calling report

* add number of downsampled messages and number of bytes blocked by low-pass filter to stats

* clippy fix

* do not use discirminated stats for number of downsample messages/blocked bytes;
gather stats for number of messages block by low pass;

* remove space after label id;
rename stat fields;

* remove labels from json

---------

Signed-off-by: ChenYing Kuo <[email protected]>
Co-authored-by: Joseph Perez <[email protected]>
Co-authored-by: DenisBiryukov91 <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: ChenYing Kuo (CY) <[email protected]>
Co-authored-by: OlivierHecart <[email protected]>
Co-authored-by: yellowhatter <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: eclipse-zenoh-bot <[email protected]>
Co-authored-by: Diogo Matsubara <[email protected]>
Co-authored-by: Michael Ilyin <[email protected]>
Co-authored-by: Charles Schleich <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release Part of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants