-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set instance_start_time to the creation time of the database to restore the ability for the replicator to detect a db recreation event during a replication. Without this, a replication can fail to notice the db was deleted and recreated, write the checkpoint document for the in-progress replication and keep going, whereas what should happen is the replication should reset from sequence 0.
- Loading branch information
Showing
5 changed files
with
18 additions
and
11 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -113,21 +113,21 @@ build_shards_test() -> | |
ExpectedShards1 = | ||
[ | ||
{shard, <<"shards/00000000-1fffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[0, 536870911], undefined, []}, | ||
[0, 536870911], undefined, <<>>, []}, | ||
{shard, <<"shards/20000000-3fffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[536870912, 1073741823], undefined, []}, | ||
[536870912, 1073741823], undefined, <<>>, []}, | ||
{shard, <<"shards/40000000-5fffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[1073741824, 1610612735], undefined, []}, | ||
[1073741824, 1610612735], undefined, <<>>, []}, | ||
{shard, <<"shards/60000000-7fffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[1610612736, 2147483647], undefined, []}, | ||
[1610612736, 2147483647], undefined, <<>>, []}, | ||
{shard, <<"shards/80000000-9fffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[2147483648, 2684354559], undefined, []}, | ||
[2147483648, 2684354559], undefined, <<>>, []}, | ||
{shard, <<"shards/a0000000-bfffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[2684354560, 3221225471], undefined, []}, | ||
[2684354560, 3221225471], undefined, <<>>, []}, | ||
{shard, <<"shards/c0000000-dfffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[3221225472, 3758096383], undefined, []}, | ||
[3221225472, 3758096383], undefined, <<>>, []}, | ||
{shard, <<"shards/e0000000-ffffffff/testdb1">>, '[email protected]', <<"testdb1">>, | ||
[3758096384, 4294967295], undefined, []} | ||
[3758096384, 4294967295], undefined, <<>>, []} | ||
], | ||
?assertEqual(ExpectedShards1, Shards1), | ||
ok. | ||
|