Conditional Rollback

1. Function Description

Conditional rollback, also known as fuzzy conditional rollback, is actually a record level rollback without stopping the service. It requires the user to use C++ code to write the filter condition logic of the rollback, compile it into SO, and upload it when applying for data filtering. First, fetch the cold backup and Ulog files of the table to be rolled back to the specified machine to construct data. After the construction, traverse the files offline and filter out the qualified records based on the plug-in SO, then delete these records from the online and import the constructed files. 

2. Application Scenarios

It is applicable to the case where the app does not know the KEY information of the record to be rolled back and can only provide simple filter conditions. The records that meet the conditions will be filtered out for rollback, and the service does not need to be stopped.

3. Instructions

  1. Before the application, prepare the set, app, game zones (optional), tables (optional), the SO files of the table, the rollback time, and the third-party machine used to construct the rollback data.

  2. Find the application entry of the conditional rollback on the TcaplusDB Console, and select the previous preparation information into the application.

  1. After the application, go to the rollback transaction page according to the pop-up guide, and click the transaction execution after confirmation.

  2. The first step in the transaction is to download the cold backup and Ulog files of these tables to the specified third-party machine to construct the data. After the data construction is complete, the transaction is automatically suspended waiting for the user to confirm whether to proceed. If the user chooses to proceed, the online qualified records will be deleted first, and then the qualified records in the constructed data will be imported online (for logic details, see Section 4.1).

4. Notations

4.1. Requirements for the rollback time and service stop time of fuzzy conditional rollback.

Assuming that the rollback time is T1 and the service stop time is T2 (which can be empty), it is required that T2 >= T1.

If T2 is not specified:

  1. Overwrite the values of records that meet the conditions at T1 to the online;

  2. The "fuzzy condition" is determined by whether the condition is met at T1.

If T2 is specified:

  1. First, delete the records that meet the conditions at T2 from the online;

  2. Then, overwrite the records that meet the conditions at T2 time to the online with the values at T1 time of the records;

  3. The "fuzzy condition" is determined by whether the condition is met at T2.

For the List table, multiple elements under the same Key are considered to match as long as one element meets the fuzzy condition, and all elements of the entire List records are rolled back.

4.2. SO needs to be written in C++, preferably compiled with GCC4.4.6.

results matching ""

    No results matching ""