hashicorp / hashicorp/raft

Make Snapshots streamable by not requiring a known size up front.

Open
#601 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
9.1k
Forks
1.1k
Avg merge
3h 27m
Merged PRs (30d)
2

Description

https://pkg.go.dev/github.com/hashicorp/raft#SnapshotMeta

I am implementing (not for the first time) my own Snapshot Store in rqlite. I am reading a Snapshot data from an uncompressed source, but would like to compress it on the fly when a Snapshot it the data is read from the io.ReadCloser returned by Snapshot store.Open().

Since the source data is not itself compressed, but compressed bytes will be served by the io.ReadCloser, I do not know the size of the Snapshot data ahead of time. This forces me to compress the data first in a scratch area.

Any ideas for avoiding this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SnapshotMeta and the Snapshot Store Open() contract described in the issue, then trace how the snapshot size is consumed by the store and restore paths. Determine how an unknown size can be represented while preserving existing snapshot behavior; done means snapshots can be compressed and served directly from the returned io.ReadCloser without a scratch area.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.