onflow / atree

Atree provides scalable arrays and scalable ordered maps.
https://onflow.org
Apache License 2.0
40 stars 16 forks source link

Add feature to support mutation for array and map iterators #359

Closed fxamacker closed 8 months ago

fxamacker commented 10 months ago

Closes #356 #357 Updates #292 https://github.com/onflow/flow-go/pull/4633

Add support for mutable iterators, including support for atree splitting/merging during iteration from inlining, uninlining, and mutated values).

This feature was discussed on Discord:

Mutable iterator for array and map supports:

Mutable iterator for array and map doesn't support:

NOTE: for better performance, use readonly iterator if mutation is not needed.

This PR:


codecov-commenter commented 10 months ago

Codecov Report

Attention: 175 lines in your changes are missing coverage. Please review.

Comparison is base (cb82995) 62.52% compared to head (5e67357) 62.45%.

Files Patch % Lines
map.go 61.06% 113 Missing and 33 partials :warning:
array.go 67.04% 22 Missing and 7 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/array-map-inlining #359 +/- ## ============================================================== - Coverage 62.52% 62.45% -0.07% ============================================================== Files 15 15 Lines 10599 10919 +320 ============================================================== + Hits 6627 6820 +193 - Misses 3021 3119 +98 - Partials 951 980 +29 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

turbolent commented 8 months ago

@fxamacker Do we still need this for onflow/cadence#2882?

fxamacker commented 8 months ago

Do we still need this for https://github.com/onflow/cadence/pull/2882?

@turbolent Yes, we need this for integration PR.