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

go/storage: Refactor checkpointing interface #2659

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

kostko
Copy link
Member

@kostko kostko commented Feb 10, 2020

Part of #2479

Previously the way storage checkpoints were implemented had several
drawbacks, namely:

  • Since the checkpoint only streamed key/value pairs this prevented
    correct tree reconstruction as tree nodes also include a Round field
    which specifies the round at which a given tree node was created.

  • While old checkpoints were streamed in chunks and thus could be
    resumed or streamed in parallel from multiple nodes, there was no
    support for verifying the integrity of a single chunk.

This change introduces an explicit checkpointing mechanism with a simple
file-based backend reference implementation. The same mechanism could
also be used in the future with Tendermint's app state sync proposal.

NOTE: This adds support for generating checkpoints but not for syncing them.

@kostko kostko force-pushed the kostko/feature/storage-checkpoints-v2 branch 2 times, most recently from b28b016 to c48e15d Compare February 10, 2020 17:46
@codecov
Copy link

codecov bot commented Feb 10, 2020

Codecov Report

Merging #2659 into master will decrease coverage by 0.19%.
The diff coverage is 64.53%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2659     +/-   ##
=========================================
- Coverage   63.15%   62.95%   -0.2%     
=========================================
  Files         370      376      +6     
  Lines       34910    35314    +404     
=========================================
+ Hits        22046    22231    +185     
- Misses      10111    10306    +195     
- Partials     2753     2777     +24
Impacted Files Coverage Δ
go/registry/api/runtime.go 37.5% <ø> (ø) ⬆️
go/runtime/history/prune.go 85.71% <ø> (+8.29%) ⬆️
go/storage/api/api.go 73.91% <ø> (ø) ⬆️
go/oasis-node/cmd/debug/byzantine/storage.go 64.51% <0%> (-1.42%) ⬇️
go/storage/mkvs/urkel/cache.go 82.97% <0%> (ø) ⬆️
go/oasis-test-runner/oasis/runtime.go 0% <0%> (ø) ⬆️
go/oasis-test-runner/oasis/args.go 0% <0%> (ø) ⬆️
go/oasis-test-runner/oasis/fixture.go 0% <0%> (ø) ⬆️
go/oasis-test-runner/oasis/storage.go 0% <0%> (ø) ⬆️
go/oasis-test-runner/oasis/controller.go 0% <0%> (ø) ⬆️
... and 54 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7c800a8...46f06ef. Read the comment docs.

@kostko kostko force-pushed the kostko/feature/storage-checkpoints-v2 branch 2 times, most recently from 8935774 to 3c6918d Compare February 11, 2020 10:33
@kostko kostko marked this pull request as ready for review February 11, 2020 11:08
@kostko kostko force-pushed the kostko/feature/storage-checkpoints-v2 branch 3 times, most recently from 2fe6db0 to 3b88346 Compare February 14, 2020 08:09
go/oasis-node/cmd/registry/runtime/runtime.go Show resolved Hide resolved
go/storage/api/grpc.go Outdated Show resolved Hide resolved
@kostko kostko force-pushed the kostko/feature/storage-checkpoints-v2 branch from 3b88346 to 6f5cb00 Compare February 14, 2020 13:15
Previously the way storage checkpoints were implemented had several
drawbacks, namely:

- Since the checkpoint only streamed key/value pairs this prevented
  correct tree reconstruction as tree nodes also include a Round field
  which specifies the round at which a given tree node was created.

- While old checkpoints were streamed in chunks and thus could be
  resumed or streamed in parallel from multiple nodes, there was no
  support for verifying the integrity of a single chunk.

This change introduces an explicit checkpointing mechanism with a simple
file-based backend reference implementation. The same mechanism could
also be used in the future with Tendermint's app state sync proposal.
@kostko kostko force-pushed the kostko/feature/storage-checkpoints-v2 branch from 6f5cb00 to 46f06ef Compare February 14, 2020 13:41
@kostko kostko merged commit 3c86d95 into master Feb 14, 2020
@kostko kostko deleted the kostko/feature/storage-checkpoints-v2 branch February 18, 2020 20:45
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.

None yet

2 participants