-
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
Upgrade/downgrade the database schema in a cluster #924
Comments
7 tasks
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Sep 10, 2024
Part of tarantool#924 @TarantoolBot document Title: `tt upgrade` upgrades database schema. This patch adds `tt upgrade` command to automate the process of upgrading the database schema across both master and replica instances. The command follows the required steps in the correct order, ensuring proper synchronization between instances, and minimizes the need for manual intervention. ``` tt upgrade [<APP_NAME>] [flags] ``` `tt upgrade` command steps: - For each replicaset: - On the master instance: 1. Execute the following commands sequentially: ``` box.schema.upgrade() box.snapshot() ``` - On each replica: 1. Wait until the replica applies all transactions produced by `box.schema.upgrade()` on the master by comparing the vector clocks (vclock). 2. Once synchronization is confirmed, execute the following commands sequentially on the replica: ``` box.schema.upgrade() box.snapshot() ``` > If any errors occur during the upgrade process, the process will stop and an error report will be generated. There are flags supported by this command: - `--replicaset (-r) stringArray`: specify the replicaset name(s) to upgrade; - `--timeout (-t) int`: timeout for waiting the LSN synchronization in seconds (default 5); Usage examples: - Update all active replicasets managed by `tt`: ``` $tt upgrade ``` - Update active replicasets of application <APP_NAME>: ``` $tt upgrade <APP_NAME> ``` - Update the specified replicaset(s) of application <APP_NAME>: ``` $tt upgrade <APP_NAME> -r <RS_NAME_1> -r <RS_NAME_2> ... ```
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Sep 10, 2024
Part of tarantool#924 @TarantoolBot document Title: `tt upgrade` upgrades database schema. This patch adds `tt upgrade` command to automate the process of upgrading the database schema across both master and replica instances. The command follows the required steps in the correct order, ensuring proper synchronization between instances, and minimizes the need for manual intervention. ``` tt upgrade [<APP_NAME>] [flags] ``` `tt upgrade` command steps: - For each replicaset: - On the master instance: 1. Execute the following commands sequentially: ``` box.schema.upgrade() box.snapshot() ``` - On each replica: 1. Wait until the replica applies all transactions produced by `box.schema.upgrade()` on the master by comparing the vector clocks (vclock). 2. Once synchronization is confirmed, execute the following commands sequentially on the replica: ``` box.schema.upgrade() box.snapshot() ``` > If any errors occur during the upgrade process, the process will stop and an error report will be generated. There are flags supported by this command: - `--replicaset (-r) stringArray`: specify the replicaset name(s) to upgrade; - `--timeout (-t) int`: timeout for waiting the LSN synchronization in seconds (default 5); Usage examples: - Update all active replicasets managed by `tt`: ``` $tt upgrade ``` - Update active replicasets of application <APP_NAME>: ``` $tt upgrade <APP_NAME> ``` - Update the specified replicaset(s) of application <APP_NAME>: ``` $tt upgrade <APP_NAME> -r <RS_NAME_1> -r <RS_NAME_2> ... ```
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Sep 10, 2024
Part of tarantool#924 @TarantoolBot document Title: `tt upgrade` upgrades database schema. This patch adds `tt upgrade` command to automate the process of upgrading the database schema across both master and replica instances. The command follows the required steps in the correct order, ensuring proper synchronization between instances, and minimizes the need for manual intervention. ``` tt upgrade [<APP_NAME>] [flags] ``` `tt upgrade` command steps: - For each replicaset: - On the master instance: 1. Execute the following commands sequentially: ``` box.schema.upgrade() box.snapshot() ``` - On each replica: 1. Wait until the replica applies all transactions produced by `box.schema.upgrade()` on the master by comparing the vector clocks (vclock). 2. Once synchronization is confirmed, execute the following commands sequentially on the replica: ``` box.schema.upgrade() box.snapshot() ``` > If any errors occur during the upgrade process, the process will stop and an error report will be generated. There are flags supported by this command: - `--replicaset (-r) stringArray`: specify the replicaset name(s) to upgrade; - `--timeout (-t) int`: timeout for waiting the LSN synchronization in seconds (default 5); Usage examples: - Update all active replicasets managed by `tt`: ``` $tt upgrade ``` - Update active replicasets of application <APP_NAME>: ``` $tt upgrade <APP_NAME> ``` - Update the specified replicaset(s) of application <APP_NAME>: ``` $tt upgrade <APP_NAME> -r <RS_NAME_1> -r <RS_NAME_2> ... ```
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Sep 11, 2024
Part of tarantool#924 @TarantoolBot document Title: `tt upgrade` upgrades database schema. This patch adds `tt upgrade` command to automate the process of upgrading the database schema across both master and replica instances. The command follows the required steps in the correct order, ensuring proper synchronization between instances, and minimizes the need for manual intervention. ``` tt upgrade [<APP_NAME>] [flags] ``` `tt upgrade` command steps: - For each replicaset: - On the master instance: 1. Execute the following commands sequentially: ``` box.schema.upgrade() box.snapshot() ``` - On each replica: 1. Wait until the replica applies all transactions produced by `box.schema.upgrade()` on the master by comparing the vector clocks (vclock). 2. Once synchronization is confirmed, execute the following commands sequentially on the replica: ``` box.schema.upgrade() box.snapshot() ``` > If any errors occur during the upgrade process, the process will stop and an error report will be generated. There are flags supported by this command: - `--replicaset (-r) stringArray`: specify the replicaset name(s) to upgrade; - `--timeout (-t) int`: timeout for waiting the LSN synchronization in seconds (default 5); Usage examples: - Update all active replicasets managed by `tt`: ``` $tt upgrade ``` - Update active replicasets of application <APP_NAME>: ``` $tt upgrade <APP_NAME> ``` - Update the specified replicaset(s) of application <APP_NAME>: ``` $tt upgrade <APP_NAME> -r <RS_NAME_1> -r <RS_NAME_2> ... ```
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Sep 17, 2024
Part of tarantool#924 @TarantoolBot document Title: `tt upgrade` upgrades database schema. The `tt 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 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 upgrade [<APP_NAME>] --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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 4, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 4, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 4, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 5, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 5, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 7, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 8, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 8, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 8, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 8, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 28, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 28, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 28, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 28, 2024
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.
mandesero
added a commit
to mandesero/tt
that referenced
this issue
Oct 28, 2024
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context
An update of tarantol version assumes the following steps:
The reverse steps are also possible:
Restart using a new tarantool executable
Procedure
A usual 'zero downtime' tarantool version update procedure is briefly described below. Let's assume that we're updating version
vA
to versionvB
.For each replicaset:
vA
replica is stopped,vB
replica is started on its snapshots.vA
.vA
master is switched to RO, one ofvB
replicas switched to RW.vA
replica (the old master) is stopped and started asvB
replica.This way a replicaset is accessible for read requests all the time and accessible for write requests almost all the time -- except the master switch step.
If a downtime is acceptable for the given replicaset (typical for a dataless router if requests are balanced over several of them), the steps are simpler:
vA
instance(s).vB
instance(s) using existing snapshot(s).Now the service works on a new tarantool version, but the next step sometimes required to unblock all the new features of the new tarantool version.
Upgrade the database schema
For each replicaset:
box.schema.upgrade()
and thenbox.snapshot()
on master.box.schema.upgrade()
(compare vclocks1).box.snapshot()
.Note
This procedure should be repeated for all the replicasets in the cluster.
Note
The snapshot creating is required for some of the upgrades, because the upgrade may perform operations that are normally forbidden. The triggers that would forbid them are disabled for a fiber that performs the upgrade. However, if the instance is restarted and the upgrade operations are read from WAL and performed, an error occurs, because the triggers are enabled now. The result is that the instance can't be started.
Now all the features of the new tarantool version are unblocked.
Dowgrade the database schema
Same as the upgrade, but
box.schema.downgrade()
should be called instead ofbox.schema.upgrade()
.Restart using an old tarantool executable
The same as restart using the new tarantool version, but new versions are stopped and old ones are started.
Proposal
It is a bit complicated to perform all the required operations for the database schema upgrade/downgrade manually on masters and replicas in the described order and with appropriate waiting for synchronizing.
It would be nice to have some automation that performs it, reports the progress and the accumulated result.
My proposal is to implement the steps from the 'upgrade the database schema' section above as a
tt
command. We may also need a companion command that performs the downgrade and a command that reports a state of the cluster in regards to the database schema version.If we do, it would be also nice to update our upgrade documentation with a suggestion to use the commands instead of manual steps.
The nice part is that (as far as I understand)
tt
already knows a list of instances in the cluster, how they're grouped into replicasets (at least in case of the declarative configuration from tarantool 3.x), knows how to determine an RW and an RO instance and able to perform commands on a local and a remote instance. It looks like a framework for implementing such administration scenarios.(After some discussions we agreed to move remote instances support to a separate step, see #968. It is still in our plans, just we'll do it separately.)
Also tracked in TNTP-363
Part of TNTP-41
Footnotes
Should we take care to https://github.com/tarantool/tarantool/issues/10142 in this case? ↩
The text was updated successfully, but these errors were encountered: