-
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: add command tt upgrade
#936
base: master
Are you sure you want to change the base?
tt: add command tt upgrade
#936
Conversation
b10d9bd
to
34a3589
Compare
Examples: Case 1: OK
Case 2: More than one master in the same replicaset
Case 3: LSN didn't update
Case 4: There is a replicaset that does not have a master
Case 5: A non-existent replicaset was specified
|
2b33e94
to
f2406ee
Compare
234b980
to
e12fe07
Compare
a30a1e5
to
45fc816
Compare
tt upgrade
[WIP]tt upgrade
5168866
to
8f0f987
Compare
Please, rebase on the latest commit in the master branch. |
869a5f6
to
633fb46
Compare
Rebased. |
633fb46
to
85e12e1
Compare
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 update. I have a couple of non-critical comments.
Please, rebase to the master too.
1344f2d
to
e294018
Compare
e294018
to
f3c6c07
Compare
f3c6c07
to
6b062d1
Compare
Part of tarantool#924 @TarantoolBot document Title: `tt replicaset upgrade` upgrades database schema. The `tt replicaset upgrade` command allows for a automate upgrade 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 upgrade the schema and take a snapshot: ```lua box.schema.upgrade() box.snapshot() ``` - **On Each Replica**: 1. Wait for the replica to apply all transactions produced by the `box.schema.upgrade()` 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 upgrade process, the operation will halt, and an error report will be generated. --- - 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 upgrade [<APP_NAME>] --timeout 10 ``` - Selecting Replicasets for Upgrade You can specify which replicaset(s) to upgrade by using the `--replicaset` or `-r` option to target specific replicaset names. **Example:** ```bash $ tt replicaset upgrade [<APP_NAME> | <URI>] --replicaset <RS_NAME_1> -r <RS_NAME_2> ... ``` This provides flexibility in upgrading only the desired parts of the cluster without affecting the entire system.
6b062d1
to
62ec8a3
Compare
It was found that sometimes the replicaset name might not reach tt for some reason. I simplified the check in the test so that the test wouldn't be flaky. For example:
But should be:
|
tt upgrade
command steps:box.schema.upgrade()
on the master by comparing the vector clocks (vclock).The replica is waiting for synchronization for
Timeout
seconds. The default value forTimeout
is 5 seconds, but you can specify it manually using the--timeout
option.You can also specify which replicaset(s) to upgrade by using the
--replicaset
option.