Skip to content

Flatbufferize index #863

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

Merged
merged 39 commits into from
Sep 17, 2020
Merged

Flatbufferize index #863

merged 39 commits into from
Sep 17, 2020

Conversation

mavam
Copy link
Member

@mavam mavam commented May 10, 2020

This PR changes the persistent state of the index to be flatbuffer-based.

@mavam mavam added the refactoring Restructuring of existing code label May 10, 2020
@mavam mavam force-pushed the epic/application-state-versioning branch 2 times, most recently from a9b010f to 0bf5357 Compare May 20, 2020 15:22
@mavam mavam force-pushed the story/ch16436 branch 5 times, most recently from 728c76a to d854e8b Compare June 3, 2020 15:36
@mavam mavam force-pushed the story/ch16436 branch 4 times, most recently from 82685dc to a9a119e Compare June 11, 2020 10:07
@lava lava force-pushed the story/ch16436 branch 2 times, most recently from ba61d08 to 08454bd Compare June 19, 2020 14:42
@lava lava force-pushed the story/ch16436 branch from 8e61387 to f033468 Compare July 9, 2020 17:51
@lava lava force-pushed the epic/application-state-versioning branch 2 times, most recently from cc4cd7c to 0d8fb9a Compare July 13, 2020 14:31
Base automatically changed from epic/application-state-versioning to master July 13, 2020 15:50
@dominiklohmann dominiklohmann force-pushed the story/ch16436 branch 2 times, most recently from ac0e8e3 to b9b505a Compare August 6, 2020 09:17
@lava lava force-pushed the story/ch16436 branch 3 times, most recently from 0626270 to a7f0566 Compare September 2, 2020 16:48
lava and others added 24 commits September 17, 2020 13:25
This is a complete refactoring of the INDEX actor, while still
keeping the same outside api for export and import.

The most notable changes include:

  * Use of flatbuffers for the persistent state
  * Introducing a new PARTITION actor that is responsible
    for managing the partition state.
  * Writing one separate file for each partition.
This is necessary to support the `vast import -b` option.
Attempting to use a `caf::binary_deserializer` to deserialize
a value index with a non-default `cardinality` value results
in a stream error; so dont do that until the bug is fixed.
Due to the way a flatbuffer is laid on on disk [1],
it is not possible to access specific fields of a
given type without knowing the type. In particular, to
access the `version()` field of some type, one would
have to know the layout of the type first, which presumably
could change in later versions.

The only part of a flatbuffer that resides at a fixed
offset is the 4-byte file identifier, which can be freely
chosen by the user. So we use this for versioning instead.

[1] https://github.com/dvidelabs/flatcc/blob/master/doc/binary-format.md
Reset to the default 'print_and_drop' default message handler
one we received the deserialized state we were waiting for.
Unify log message structure and verbosity.
Copy link
Member

@dominiklohmann dominiklohmann left a comment

Choose a reason for hiding this comment

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

Approving as is as we discussed earlier.

Please apply the suggested re-formatting and spelling fixes to the changelog before merging.

@lava lava merged commit 8bca29a into master Sep 17, 2020
@lava lava deleted the story/ch16436 branch September 17, 2020 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Restructuring of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants