-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Not yet implemented. But here are some thoughts on how to and some stumbling blocks:
While running
- Create another index in Diff hyperbee that maps timestamp to the key like this:
key: timestamp
value: {
_objectId: diffObjectId,
pubKey: hyperbeePubKey // 'hex' string diffFeed.key.toString('hex')
}
Let's call this Stub
Note: We need pubKey above, so that we know which peer has this diff object.
On restart:
- Find in Store hyperbee all Stubs that have timestamp that is bigger then the timestamp of the last object written in Store hyperbee using createUnionStream which would be great except after
- Get all the Diff objects from the hyperbees using pubKey of the Stub to know where to look for it
- Merge Diff objects with Store objects that Diff objects point to
Above algo does not cover the following case
Above find will not find the objects that were not yet applied to Store. Those are the Diff objects that have a timestamp which is earlier then the last timestamp of the Store object
Metadata
Metadata
Assignees
Labels
No labels