-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit changes the filename of the metadata file to contain `<db_path>-<sync_url>-info`. Where `db_path` is a full file path + filename and `sync_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 thus `SyncContext` 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
- Loading branch information
1 parent
5b8934e
commit 8006a87
Showing
2 changed files
with
33 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters