-
Notifications
You must be signed in to change notification settings - Fork 12
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
tt replicaset
: add subcommand downgrade
#1031
Merged
oleg-jukovec
merged 1 commit into
tarantool:master
from
mandesero:mandesero/gh-968-tt-downgrade
Nov 29, 2024
Merged
tt replicaset
: add subcommand downgrade
#1031
oleg-jukovec
merged 1 commit into
tarantool:master
from
mandesero:mandesero/gh-968-tt-downgrade
Nov 29, 2024
Conversation
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
Waiting for #1030 |
mandesero
force-pushed
the
mandesero/gh-968-tt-downgrade
branch
6 times, most recently
from
November 27, 2024 12:11
d6271d0
to
b53f850
Compare
mandesero
force-pushed
the
mandesero/gh-968-tt-downgrade
branch
2 times, most recently
from
November 27, 2024 12:53
b5b4952
to
5b44826
Compare
Please, rebase on the master branch. |
mandesero
force-pushed
the
mandesero/gh-968-tt-downgrade
branch
2 times, most recently
from
November 28, 2024 12:48
0bce39e
to
8a3a4b7
Compare
mandesero
added
full-ci
Enables full ci tests
and removed
full-ci
Enables full ci tests
labels
Nov 28, 2024
mandesero
force-pushed
the
mandesero/gh-968-tt-downgrade
branch
from
November 28, 2024 16:56
8a3a4b7
to
c6032e4
Compare
mandesero
added
full-ci
Enables full ci tests
and removed
full-ci
Enables full ci tests
labels
Nov 28, 2024
oleg-jukovec
approved these changes
Nov 28, 2024
Please, rebase on the master branch to make the |
Closes tarantool#968 @TarantoolBot document Title: `tt replicaset downgrade` downgrades database schema. The `tt replicaset downgrade` command allows for a automate downgrade of each replicaset in a Tarantool cluster. The process is performed sequentially on the master instance and its replicas to ensure data consistency. Below are the steps involved: For Each Replicaset: - **On the Master Instance**: 1. Run the following commands in sequence to downgrade the schema and take a snapshot: ```lua box.schema.downgrade(<..version..>) box.snapshot() ``` - **On Each Replica**: 1. Wait for the replica to apply all transactions produced by the `box.schema.downgrade` command executed on the master. This is done by monitoring the vector clocks (vclock) to ensure synchronization. 2. Once the repica has caught up, run the following command to take a snapshot: ```lua box.snapshot() ``` > **Error Handling**: If any errors occur during the downgrade process, the operation will halt, and an error report will be generated. --- - Specify the schema version for downgrade The `tt replicaset downgrade` command requires specifying the target version for the schema downgrade. This version should be provided using the `--version` (or `-v`) option. The version must follow the `x.x.x` format, where `x` represents a numerical value. To view the list of available downgrade versions, execute the following command in Tarantool: ```lua box.schema.downgrade_versions() ``` **Example:** ```bash $ tt replicaset downgrade [<APP_NAME> | <URI>] --version 3.0.0 ``` - Timeout for Synchronization Replicas will wait for synchronization for a maximum of `Timeout` seconds. The default timeout is set to 5 seconds, but this can be adjusted manually using the `--timeout` option. **Example:** ```bash $ tt replicaset downgrade [<APP_NAME> | <URI>] -v 3.0.0 --timeout 10 ``` - Selecting Replicasets for Downgrade You can specify which replicaset(s) to downgrade by using the `--replicaset` or `-r` option to target specific replicaset names. **Example:** ```bash $ tt replicaset downgrade [<APP_NAME> | <URI>] -v 3.0.0 replicaset <RS_NAME_1> -r <RS_NAME_2> ... ``` This provides flexibility in downgrading only the desired parts of the cluster without affecting the entire system.
mandesero
force-pushed
the
mandesero/gh-968-tt-downgrade
branch
from
November 28, 2024 20:46
c6032e4
to
db34a33
Compare
mandesero
added
full-ci
Enables full ci tests
and removed
full-ci
Enables full ci tests
labels
Nov 28, 2024
oleg-jukovec
requested review from
patapenka-alexey
and removed request for
DerekBum
November 29, 2024 07:18
patapenka-alexey
approved these changes
Nov 29, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the patch. LGTM.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
tt replicaset downgrade
command works similarly tott replicaset upgrade
(see tarantool/doc#4641, tarantool/doc#4661) but requires specifying a target version for the downgrade and usesbox.schema.downgrade(<..version..>)
instead ofbox.schema.upgrade()
.The version must be provided using the
--version
(or-v
) option in thex.x.x
format, wherex
represents a numerical value.Usage Example:
Note:
Can only be used with tarantool
>= 2.11
.(see https://www.tarantool.io/ru/doc/latest/release/2.11.0/#downgrading-a-database).
Closes #968