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

Suport for drop/take messages to map lanes. #738

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

Conversation

horned-sphere
Copy link
Collaborator

@horned-sphere horned-sphere commented Nov 18, 2024

Removes unused iterator module from the persistence crate.
Adds support for drop/take messages to map lanes.

@horned-sphere horned-sphere changed the title Fixes some TODOs in the code. Suuport for drop/take messages to map lanes. Nov 18, 2024
Copy link

codecov bot commented Nov 18, 2024

Codecov Report

Attention: Patch coverage is 47.91667% with 100 lines in your changes missing coverage. Please review.

Project coverage is 49.34%. Comparing base (b800567) to head (a256426).

Files with missing lines Patch % Lines
server/swimos_agent/src/lanes/map/mod.rs 46.48% 99 Missing ⚠️
server/swimos_connector/src/generic/mod.rs 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #738      +/-   ##
==========================================
- Coverage   49.36%   49.34%   -0.02%     
==========================================
  Files         401      401              
  Lines       34821    34994     +173     
==========================================
+ Hits        17190    17269      +79     
- Misses      17631    17725      +94     

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

@horned-sphere horned-sphere changed the base branch from main to describe November 19, 2024 10:21
Base automatically changed from describe to main November 19, 2024 15:16
@horned-sphere horned-sphere marked this pull request as ready for review November 19, 2024 15:20
@horned-sphere horned-sphere changed the title Suuport for drop/take messages to map lanes. Suport for drop/take messages to map lanes. Nov 22, 2024
server/swimos_agent/src/lanes/map/mod.rs Outdated Show resolved Hide resolved

impl<C, K, V> MapLaneDropOrTake<C, K, V> {
fn new(
projection: for<'a> fn(&'a C) -> &'a MapLane<K, V>,
Copy link
Member

Choose a reason for hiding this comment

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

For consistency with the Java implementation, should this not be something like projection: for<'a> fn(&'a C) -> &'a MapLane<K, V, BTreeMap<K, V>> (once your abstraction PR has been merged)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The next PR adds an optimization that alters how it computes the prefixes/suffixes for the case where the backing map is ordered, so it will be more efficient for BTreeMap (and falls back to this implementation for HashMap).

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.

2 participants