-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dbnode] Shards assignment improvements during cluster topology chang…
…es (#3425) * use `IsBootstrappedAndDurable()` instead of `IsBootstrapped()` otherwise warm and cold flushes might fail because some shards might still be not bootstrapped. * do not run file ops (cold and warm flush) when new shards are being assigned. check for bootstrapped shards when doing cold flush cleanups. * update unit test to validate handling of not bootstrapped shards. * removed `IsBootstrapped` method arg (boolean args are a code smell), it is better to make a check before calling cleanup. * reduce locking on a db level when new shards are assigned. * can use read lock for `d.hasReceivedNewShardsWithLock()` * Enqueue assignShardSet fn when received update from topology so that shards get assigned when file ops are not running. * need to set `lastReceivedNewShards` when received new shards immediately so that `IsBootstrappedAndDurable()` won't return true when db was previously bootstrapped and new bootstrap is enqueued. * cleaned up some code. * ensure that bootstrap is started when new shards are assigned. * added BootstrapEnqueue(). * updated logging levels. * more test coverage. * removed invariant violation * linter fix * set bootstrap result value directly. * changes after review * fixed failing tests.
- Loading branch information
Showing
17 changed files
with
573 additions
and
179 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
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
Oops, something went wrong.