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.
This commit changes the filename of the metadata file to contain
<db_path>-<sync_url>-info
. Wheredb_path
is a full file path + filename andsync_url
is the host of the authority of the URI. This also includes upfront uri parsing and two new errors that can be produced when trying to extract the host.This approach trades off creating multiple files in exchange for allowing multiple sync context's to operate at the same time concurrently. Originally, I had approached updating the metadata to include a hashmap of endpoints and their metadata but this approach falls flat if you have multiple
Database
and thusSyncContext
in the same process (and beyond).This commit does NOT include updating from the original v0 metadata format but instead will force a full re-sync and a new meatadata file will be produced with verison set to
1
. Not implementing this mean't simpler code with less space to produce errors and since this only runs once when a user upgrades that cost is okay.Closes #1837