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

fix: wrong usage of smallmap cause server crash. switched to indexmap #457

Merged
merged 2 commits into from
Nov 21, 2024

Conversation

giangndm
Copy link
Contributor

Description

SmallMap only works with u8 compatible key, this cause some wrong in behavior. This is root issue of server crash because metadata cluster wrong in remove endpoint.

This PR switch all of SmallMap and most of HashMap into IndexMap, which is more fit for media-server where we iterate a lot.

Related Issue

If this pull request is related to any issue, please mention it here.

Checklist

  • I have tested the changes locally.
  • I have reviewed the code changes.
  • I have updated the documentation, if necessary.
  • I have added appropriate tests, if applicable.

Screenshots

If applicable, add screenshots to help explain the changes made.

Additional Notes

Add any additional notes or context about the pull request here.

@giangndm giangndm marked this pull request as ready for review November 21, 2024 16:26
Copy link

codecov bot commented Nov 21, 2024

Codecov Report

Attention: Patch coverage is 84.40367% with 17 lines in your changes missing coverage. Please review.

Project coverage is 36.30%. Comparing base (707d96e) to head (c86899d).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
packages/transport_webrtc/src/shared_port.rs 0.00% 8 Missing ⚠️
packages/media_utils/src/indexmap_2d.rs 20.00% 4 Missing ⚠️
...ackages/media_core/src/cluster/room/audio_mixer.rs 71.42% 2 Missing ⚠️
.../src/endpoint/internal/bitrate_allocator/egress.rs 66.66% 1 Missing ⚠️
...src/endpoint/internal/bitrate_allocator/ingress.rs 50.00% 1 Missing ⚠️
packages/transport_webrtc/src/transport.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #457      +/-   ##
==========================================
+ Coverage   36.22%   36.30%   +0.08%     
==========================================
  Files         177      177              
  Lines       18031    18070      +39     
==========================================
+ Hits         6531     6561      +30     
- Misses      11500    11509       +9     

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


🚨 Try these New Features:

@giangndm giangndm merged commit 0ffc95a into 8xFF:master Nov 21, 2024
11 checks passed
giangndm added a commit to giangndm/8xFF-decentralized-media-server that referenced this pull request Nov 26, 2024
@giangndm giangndm deleted the fix-remove-wrong-usecase-smallmap branch November 26, 2024 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant