reproduction of issue 106: no history available when repo.find() is invoked and the repo has a storage provider #113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
resolves #106
adds additional integration tests
changes repo logic to initiate sync on document creation (calls to any of
import
,create
, orclone
)fixes internal mismatch logic that falsely reported a document was in the storage provider, when it wasn't actually available, causing it to never be requested from external peers.
in the scenario where a document is sync'd on createion, and a peer is connected, the other peer will have a record of the document to return an immediate result on
find()
, but the contents won't be completely up to date until the sync has processed. The updated tests (unit and integration) verify that a sync happens, but there's no clear indicator of "I'm up to date with all my peers" right now. Additional features: gossiping the 'heads' of peers for documents in question, or a change to the sync protocol to return an "ack, up to date" to get an RPC like mechanism is needed to enable that.