Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise the restoration process #57

Merged
merged 5 commits into from
Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .ci/unit_test
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ function test_with_coverage() {
################################################################################

TEST_PACKAGES="cmd pkg"
GINKGO_COMMON_FLAGS="-r -timeout=1h0m0s --randomizeAllSpecs --randomizeSuites --failOnPending --progress"
GINKGO_COMMON_FLAGS="-r -timeout=1h0m0s --randomizeAllSpecs --randomizeSuites --failOnPending --progress"
if [ -z $COVER ] || [ "$COVER" = false ] ; then
echo "[INFO] Test coverage is disabled."
ginkgo -stream -p -race -trace $GINKGO_COMMON_FLAGS ${TEST_PACKAGES}
ginkgo -stream -race -trace $GINKGO_COMMON_FLAGS ${TEST_PACKAGES}
else
test_with_coverage
fi
Expand Down
1 change: 1 addition & 0 deletions cmd/initializer.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ func NewInitializeCommand(stopCh <-chan struct{}) *cobra.Command {
PeerURLs: peerUrls,
ClusterToken: restoreClusterToken,
SkipHashCheck: skipHashCheck,
MaxFetchers: restoreMaxFetchers,
}

var snapstoreConfig *snapstore.Config
Expand Down
2 changes: 2 additions & 0 deletions cmd/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ func NewRestoreCommand(stopCh <-chan struct{}) *cobra.Command {
PeerURLs: peerUrls,
ClusterToken: restoreClusterToken,
SkipHashCheck: skipHashCheck,
MaxFetchers: restoreMaxFetchers,
}

err = rs.Restore(*options)
Expand All @@ -103,6 +104,7 @@ func initializeEtcdFlags(cmd *cobra.Command) {
cmd.Flags().StringArrayVar(&restorePeerURLs, "initial-advertise-peer-urls", []string{defaultInitialAdvertisePeerURLs}, "list of this member's peer URLs to advertise to the rest of the cluster")
cmd.Flags().StringVar(&restoreName, "name", defaultName, "human-readable name for this member")
cmd.Flags().BoolVar(&skipHashCheck, "skip-hash-check", false, "ignore snapshot integrity hash value (required if copied from data directory)")
cmd.Flags().IntVar(&restoreMaxFetchers, "max-fetchers", 6, "maximum number of threads that will fetch delta snapshots in parallel")
}

func initialClusterFromName(name string) string {
Expand Down
1 change: 1 addition & 0 deletions cmd/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func NewServerCommand(stopCh <-chan struct{}) *cobra.Command {
PeerURLs: peerUrls,
ClusterToken: restoreClusterToken,
SkipHashCheck: skipHashCheck,
MaxFetchers: restoreMaxFetchers,
}

if storageProvider != "" {
Expand Down
1 change: 1 addition & 0 deletions cmd/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ var (
restorePeerURLs []string
restoreName string
skipHashCheck bool
restoreMaxFetchers int

//snapstore flags
storageProvider string
Expand Down
Loading