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

Reduce size of encoded array slab and bump version #330

Merged
merged 1 commit into from
Aug 2, 2023

Conversation

fxamacker
Copy link
Member

Updates #292

Changes:

  • bump Atree format version to 1 (was 0)
  • remove redundant version and flag data from root slabs (2 bytes per root slab)
  • remove redundant slab address from children headers in metadata slab since all child slabs have the same address (8 bytes per child header per metadata slab)
  • reduce encoded child slab size in children headers in metadata slab from 4 bytes to 2 bytes (2 bytes per child header per metadata slab)
  • decode version 0 and 1
  • encode only version 1
  • add tests to decode array slabs data in version 0

⚠️ This change requires data migration and data format version was bumped from 0 to 1.


  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

Changes:
- bump Atree format version to 1 (was 0)
- remove redundant version and flag data from root slabs
  (2 bytes per root slab)
- remove redundant slab address from children headers in metadata slab
  since all child slabs have the same address
  (8 bytes per child header per metadata slab)
- reduce encoded child slab size in children headers in metadata slab
  from 4 bytes to 2 bytes
  (2 bytes per child header per metadata slab)
- decode version 0 and 1
- encode only version 1
- add tests to decode array slabs data in version 0
@fxamacker fxamacker added improvement storage breaking change breaks existing stored data (requires storage migration) labels Jul 19, 2023
@fxamacker fxamacker self-assigned this Jul 19, 2023
@codecov-commenter
Copy link

Codecov Report

Merging #330 (1ea371a) into main (24f8172) will increase coverage by 0.21%.
The diff coverage is 69.09%.

@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
+ Coverage   64.87%   65.08%   +0.21%     
==========================================
  Files          14       14              
  Lines        8443     8623     +180     
==========================================
+ Hits         5477     5612     +135     
- Misses       2267     2300      +33     
- Partials      699      711      +12     
Impacted Files Coverage Δ
array.go 70.54% <68.97%> (+0.14%) ⬆️
array_debug.go 52.28% <100.00%> (ø)

... and 2 files with indirect coverage changes

@fxamacker fxamacker merged commit 06f4676 into main Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement storage breaking change breaks existing stored data (requires storage migration)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants