Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

fix: correct hamt structure when modifying deep sub-shards #46

Merged
merged 1 commit into from
Mar 18, 2019

Conversation

achingbrain
Copy link
Collaborator

If you have a shard like:

F1
  A0
    C8myfile

And you add a file that causes C8myfile to become a subshard, previously you would end up with this:

F1
  A0
    C8
      C8
        B3myfile
        82newfile

This PR ensures you get the correct structure:

F1
  A0
    C8
      B3myfile
      82newfile

When we update a shard, we re-create a portion of the shard in order to update the existing structure, this avoids loading the entire shard which could be expensive. Previously we weren't descending into the newly created sub-shard to add the correct portion to the existing shard.

Fixes #45

@ghost ghost assigned achingbrain Mar 12, 2019
@ghost ghost added the in progress label Mar 12, 2019
@achingbrain achingbrain force-pushed the fix-shard-updating branch 2 times, most recently from 7a32304 to 8bb576c Compare March 12, 2019 12:11
If you have a shard like:

```
F1
  A0
    C8myfile
```

And you add a file that causes `C8myfile` to become a subshard, previously
you would end up with this:

```
F1
  A0
    C8
      C8
        B3myfile
        82newfile
```

This PR ensures you get the correct structure:

```
F1
  A0
    C8
      B3myfile
      82newfile
```

When we update a shard, we re-create a portion of the shard in order to
update the existing structure, this avoids loading the entire shard which
could be expensive.  Previously we weren't descending into the newly
created sub-shard to add the correct portion to the existing shard.

Fixes #45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant