forked from pingcap/tidb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check if the cluster satisfies the version requirements before starti…
…ng (pingcap#61) * vendor: insert `go-semver` dependecy * tidb, util: extract the HTTP JSON fetching code into its own function * *: check for cluster versions before starting * restore_test: added logs to detect spurious failure Also, make the mock import operation only wait while we're still opening engines to speed up the test. * util: document GetJSON() * restore: use a more robust version parsing strategy for TiDB In semver, '2.0.4-1 < 2.0.4', so we need to properly skip the unrelated portions of the version. * restore, kv: detect if SwitchMode exists instead of check version TiKV and PD's versions are exposed before 2.1, so we can't rely on their APIs to verify for 2.0.4+. Since the only reason we need 2.0.4+ is the SwitchMode gRPC interface, we instead inspect if SwitchMode is unimplemented and display a user-friendly message on stderr.
- Loading branch information
Showing
12 changed files
with
732 additions
and
39 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
Oops, something went wrong.