Database synchronization method, system, cluster, medium and program product
By establishing a management library on the database replica server and using the database-level synchronization model, the real-time and scalability problems of instance-level data synchronization are solved, efficient synchronization of instance-level data is achieved, and the dependence on the main replica is reduced, and users are enhanced. Experience and system performance.
Patent Information
- Application Number
- CN202310669304.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2024-12-17
AI Technical Summary
In database systems, there is a risk of missing instance-level data synchronization, and the conventional synchronization model relies on the primary replica, resulting in low scalability and high performance pressure, and the inability to synchronize instance-level permission data in real time.
Establish a management library on each database replica server, update the instance-level data in the system library of the primary replica in real time, and send the updated data to the secondary replica through the database-level synchronization model. The secondary replica updates the system library on demand, reducing the main replica's return Reliance of copy.
Real-time synchronization of instance-level data is realized, which reduces the possibility of instance-level information missing, improves user experience, reduces dependence on the main replica, and improves the flexibility and scalability of the synchronization architecture.
Smart Images

Figure CN119149628A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of database technology, and more specifically, to a database synchronization method, system, computer device cluster, computer storage medium, and computer program product. Background Art
[0002] The database system includes instance-level data and database-level data. For example, instance-level permission data includes permission data for the login account of the database system instance, such as instance service role, instance login account, and permissions of the role. These permission data control the operation and access rights for the instance. On the other hand, customers can create various user databases (also referred to as user libraries in this article) in the database system to store business data and corresponding database-level permission data. Database-level permission data includes information such as user accounts under these user libraries and their corresponding roles and permissions. This information is used to control the corresponding user's operation and access rights to the data in the user library.
[0003] Instance-level permission data is stored in a system database (also referred to herein as a system database) built into an instance of a database system (e.g., a SQL Server instance), while database-level permission data is stored in a user database. When synchronization is performed on different copies of a database system, the data in the system database and the user database of each copy is processed in different ways. Summary of the invention
[0004] An embodiment of the present application provides a database synchronization solution.
[0005] In a first aspect, a database synchronization method is provided. The method includes: in response to a change in first instance-level data of a first database instance, updating second instance-level data in a first management library of the first database instance, the first instance-level data being stored in a first system library of the first database instance; and in response to the update of the second instance-level data, sending the updated second instance-level data to the second database instance, the updated second instance-level data being used to update third instance-level data of the second database instance, the third instance-level data being stored in a second management library of the second database instance. Thus, it is possible for a user to avoid re-configuring the instance level for a replica of the database system that should be synchronized. And compared with a periodic instance-level synchronization scheme, this method reduces the possibility of missing instance-level information in the replica. In addition, the replica can timely obtain data that can be used to independently complete synchronization when appropriate, reducing dependence on a specific replica such as a master replica.
[0006] In some embodiments of the first aspect, the change of the first instance-level data includes at least one operation performed by the first database instance on the first instance-level data, and the method further includes: establishing a trigger defining a trigger action, the trigger action corresponding to a type of the operation performed by the first database instance on the first instance-level data. Thus, for a primary replica whose data is to be synchronized to other replicas, changes in instance-level data in its system library can be effectively monitored.
[0007] In some embodiments of the first aspect, in response to a change in first instance-level data of the first database instance, updating second instance-level data in the first management library of the first database instance includes: based on the type of operation performed by the first database instance on the first instance-level data, a trigger executes a corresponding trigger action to update the second instance-level data. Thus, when the instance-level data in the system library of the primary replica changes, the change can be synchronized to the management library of the primary replica in a timely manner, so that the management library can serve as an intermediary for synchronizing instance-level data to other replicas.
[0008] In some embodiments of the first aspect, the type of operation performed by the first database instance on the first instance-level data includes one or more of the following: a creation operation on the first instance-level data; a deletion operation on the first instance-level data; or a modification operation on the first instance-level data. Thus, different types of instance-level data update operations can be monitored, thereby supporting the triggering of corresponding appropriate actions to synchronize the instance-level data in the system library with the management library of the master copy.
[0009] In some embodiments of the first aspect, the method further includes: the second database instance updates third instance-level data based on the received updated second instance-level data; and based on the third instance-level data, updates fourth instance-level data of the second database instance, the fourth instance-level data being stored in a second system library of the second database instance. Thus, the secondary replica can independently complete the synchronization of the instance-level data thereon, which reduces the dependence on the primary replica and makes the synchronization architecture easy to expand.
[0010] In some embodiments of the first aspect, updating fourth instance-level data of the second database instance based on the third instance-level data includes: detecting whether there is a difference between the fourth instance-level data and the third instance-level data; and if a difference is detected, updating the fourth instance-level data based on the third instance-level data. Thus, the replica to be synchronized can perform an update action as needed to achieve synchronization with the master replica.
[0011] In some embodiments of the first aspect, detecting whether there is a difference between the fourth instance-level data and the third instance-level data comprises: detecting whether there is a difference when a predetermined time interval has passed since the last detection; or detecting whether there is a difference before the fourth instance-level data is to be used. Thus, the replica to be synchronized can perform synchronization with the master replica as needed according to different conditions.
[0012] In some embodiments of the first aspect, sending the updated second instance-level data to the second database instance includes: using a data synchronization model for a user library in the database system to send the updated second instance-level data to the second database instance. Thus, the transfer of instance-level data between the primary replica and other replicas can be easily achieved through the database-level synchronization model.
[0013] In some embodiments of the first aspect, the first database instance is a primary instance of a database system, and the second database instance is a standby instance or a read-only instance of the database system. Thus, an applicable scenario of the method according to the present disclosure is provided.
[0014] In a second aspect, a database synchronization system is provided. The system includes: an updating device, which is used to update second instance-level data in a first management library of the first database instance in response to a change in first instance-level data of the first database instance, wherein the first instance-level data is stored in a first system library of the first database instance; and a sending device, which, in response to an update of the second instance-level data, sends the updated second instance-level data to the second database instance, wherein the updated second instance-level data is used to update third instance-level data of the second database instance, wherein the third instance-level data is stored in a second management library of the second database instance.
[0015] In some embodiments of the second aspect, the change of the first instance-level data includes at least one operation performed by the first database instance on the first instance-level data, and the system also includes: an establishment device for establishing a trigger defining a trigger action, and the trigger action corresponds to the type of operation performed by the first database instance on the first instance-level data.
[0016] In some embodiments of the second aspect, the updating device includes: an execution device for causing a trigger to execute a corresponding triggering action to update the second instance-level data based on the type of operation performed by the first database instance on the first instance-level data.
[0017] In some embodiments of the second aspect, the type of operation performed by the first database instance on the first instance-level data includes one or more of the following: a creation operation on the first instance-level data; a deletion operation on the first instance-level data; or a modification operation on the first instance-level data.
[0018] In some embodiments of the second aspect, the system also includes: a second updating device, used to enable the second database instance to update third instance-level data based on the received updated second instance-level data; and a third updating device, used to update fourth instance-level data of the second database instance based on the third instance-level data, the fourth instance-level data being stored in a second system library of the second database instance.
[0019] In some embodiments of the second aspect, the third updating device includes: a detection device for detecting whether there is a difference between the fourth instance level data and the third instance level data; and an instance level data updating device for updating the fourth instance level data based on the third instance level data if a difference is detected.
[0020] In some embodiments of the second aspect, the detection device includes: a timing detection device that detects whether there is a difference when a predetermined time interval has passed since the last detection; or a pre-use detection device that detects whether there is a difference before the fourth instance level data is to be used.
[0021] In some embodiments of the second aspect, the sending device includes: a synchronous sending device, configured to send updated second instance-level data to the second database instance by utilizing a data synchronization model for a user library in the database system.
[0022] In some embodiments of the second aspect, the first database instance is a primary instance of the database system, and the second database instance is a standby instance or a read-only instance of the database system.
[0023] In a third aspect, a computing device cluster is provided, which includes at least one computing device, each computing device including a processor and a memory; the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster performs operations according to the method in the above-mentioned first aspect or any one of its embodiments.
[0024] In a fourth aspect, a computer-readable storage medium is provided, wherein computer-executable instructions are stored on the computer-readable storage medium, and when the computer-executable instructions are executed by a processor, the operations of the method according to the first aspect or any of its embodiments are implemented.
[0025] In a fifth aspect, a computer program or a computer program product is provided. The computer program or computer program product is tangibly stored on a computer readable medium and includes computer executable instructions, which when executed implement the operations of the method according to the first aspect or any of its embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The above and other features, advantages and aspects of the embodiments of the present application will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:
[0027] Figure 1 A schematic diagram showing an example environment in which various embodiments of the present application can be implemented;
[0028] Figure 2 One of the flowcharts of an example method for database synchronization according to some embodiments of the present application is shown;
[0029] Figure 3 One of the flowcharts of an example method for database synchronization according to some embodiments of the present application is shown;
[0030] Figure 4 A schematic interaction diagram showing a database synchronization process according to some embodiments of the present application;
[0031] Figure 5 An example architecture for database synchronization according to some embodiments of the present application is shown;
[0032] Figure 6 A schematic block diagram of a database synchronization system according to some embodiments of the present application is shown;
[0033] Figure 7 A schematic block diagram showing an example device that can be used to implement embodiments of the present application;
[0034] Figure 8 A schematic block diagram showing an example computing device cluster that can be used to implement embodiments of the present application; and
[0035] Fig. 9 A schematic block diagram of an example implementation of a computing device cluster that can be used to implement embodiments of the present application is shown. DETAILED DESCRIPTION
[0036] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Instead, these embodiments are provided to provide a more thorough and complete understanding of the present application. It should be understood that the drawings and embodiments of the present application are only for exemplary purposes and are not intended to limit the scope of protection of the present application.
[0037] In the description of the embodiments of the present application, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.
[0038] In order to achieve high availability of the database system, multiple logical database servers can be created for the database system to deploy multiple database instances (for example, multiple SQL Server instances). These multiple database instances are also referred to as multiple copies of the database system. The multiple copies of the database system generally include a primary copy and multiple secondary copies (also referred to as primary instances and secondary instances herein), and the secondary copies can be read-only copies or standby copies (also referred to as read-only instances or standby instances herein). The database server where the primary copy is located can be referred to as the primary copy server, and the database server where the secondary copy is located can be referred to as the secondary copy server. When the primary copy updates the data, the synchronization model (for example, a synchronization model based on deployment modes such as Mirror and AlwaysOn) can be used to automatically synchronize the data updated by the primary copy to the secondary copy. However, the conventional synchronization model is at the database level, which means that only user libraries can be synchronized between copies through the synchronization model, and the system libraries between different copies cannot establish a synchronization relationship through the synchronization model. Therefore, instance-level data (such as instance-level permission data, etc.) stored in the system library of the primary copy cannot be automatically synchronized to the secondary copy.
[0039] For example, if an instance-level login account is created on the primary replica, the data of the account will not be synchronized to other secondary replicas by the database-level synchronization model. Therefore, if the customer wants to use the account to access the read-only replica, the same account needs to be recreated on the read-only replica. In addition, when the primary and standby replicas of the database system are switched, the instance-level data will be lost, requiring the user to rebuild the data, which will result in a degraded user experience.
[0040] Some solutions synchronize instance-level data by establishing a linked server on the primary replica that is connected to the secondary replica. These solutions establish a scheduled automatic job task on the primary replica (for example, an automated job task executed by an agent service provided by a server engine), which periodically queries the instance-level data in the system library on the primary replica, and synchronizes the instance-level data to the system library of the linked secondary replica through the linked server.
[0041] However, by synchronizing instance-level data through scheduled tasks, the secondary replica will not be able to obtain instance-level data changes in real time. When the secondary replica needs to be used, some instance-level data on the primary replica may not have been obtained by the secondary replica, which leads to the risk of data loss. In addition, all synchronization processes of this solution are initiated by the primary replica, which is overly dependent on the service capabilities of the primary replica, causing performance pressure on the primary replica. In addition, each additional secondary replica requires a new linked server to be created on the primary replica, making this solution inflexible and scalable.
[0042] In order to solve the above problems and other problems, the present application provides a database synchronization solution. This solution separately establishes a management database (also referred to as the management library in this article) that records instance-level data on each replica server of the database system. When the instance-level data stored in the system library of the primary replica changes, the management library of the primary replica is updated accordingly. The update of the management library of the primary replica is then sent to the secondary replica server in real time or near real time through the synchronization model for the user library. On the side of the secondary replica server, the update is written to the management library of the secondary replica through the synchronization model for the user library. Afterwards, based on the updated management library of the secondary replica, the system library of the secondary replica is updated regularly or on demand. Similarly, the system library of the secondary replica stores the instance-level data of the secondary replica.
[0043] The solution of the present application can achieve real-time synchronization of instance-level data between replicas of a database system. Using this solution, updates to instance-level data in the primary replica of a database system can be acquired and stored by a secondary replica in real time, and automatically used to update instance-level data of the secondary replica when appropriate. This solution not only eliminates the need for users to reconfigure instance-level data for each replica (such as configuring instance-level permissions), but also reduces the risk of instance-level data used on the secondary replica not being updated to the latest version, compared to the primary replica periodically sending updates to instance-level data to the secondary replica. In addition, this solution is more flexible than conventional solutions, and each secondary replica can promptly acquire data for independently completing synchronization when appropriate, which reduces dependence on the primary replica and reduces performance pressure on the primary replica.
[0044] Figure 1 A schematic diagram of an example environment 100 in which multiple embodiments of the present application can be implemented is shown. The example environment 100 includes a primary replica server 110 and secondary replica servers 120-1, 120-2, ..., and 120-N (collectively or individually referred to as secondary replica servers 120). A primary replica of a database system is deployed on the primary replica server 110, and changes to the database system will first be updated to the primary replica, and then updated from the primary replica to the secondary replica. Therefore, the primary replica is also called a source instance.
[0045] The master copy includes one or more user libraries (e.g., user library 140) and system library 130. A user library is a database created by a user to store required data. Users with corresponding permissions can access the corresponding user library and / or perform various data update operations on the user library. The user library can also store data about the roles and permissions of various users under the user library.
[0046] The system library 130 stores instance-level data associated with the master replica, such as instance-level permission data. In some embodiments, the system library 130 may be a system database built into the database engine in the master replica server 110. Figure 1 1 is shown as a single database, but in some embodiments, the system library 130 may be organized into multiple databases, which may depend on the implementation of the database engine used.
[0047] The data in the system library is associated with the replica server where the system library is located. When the data in the primary replica is synchronized to the secondary replica on the secondary replica server 120 using the database-level synchronization model, the data in the system library 130 will not be synchronized. Therefore, in order to ensure that the secondary replica fully replicates the information in the primary replica, additional operations are required to synchronize the instance-level data in the two replicas.
[0048] The auxiliary replicas deployed on each auxiliary replica server 120 include user libraries and system libraries intended to be synchronized with the primary replica, such as the system library 130-1 and the user library 140-1 in the auxiliary replica server 120-1. These auxiliary replicas can be created for different purposes. As a non-limiting example, a backup copy (i.e., a standby copy) of the database system can be deployed on the auxiliary replica server 120-1. When, for example, the primary replica server 110 fails or is otherwise unavailable, a master-slave switch can be performed so that the auxiliary replica server 120-1 becomes the new primary replica server. As another non-limiting example, the auxiliary replica server 120-2 can include a read-only copy of the database system. Read queries issued from the client can be routed to the read-only copy to reduce the load on the primary replica. It should be understood that the database system can have any appropriate number of auxiliary replicas.
[0049] The master replica server 110 also includes a management library 150 (i.e., a management database), which is used to store management data of the master replica. In some embodiments, the management library 150 can be automatically created by a database engine in the master replica server 110. In some embodiments, the management library 150 can be associated with an administrator user. Similar to a general user library, the data in the management library 150 can be synchronized to the corresponding management library of each secondary replica using a database-level synchronization model, such as the management library 150-1 in the secondary replica server 120-1.
[0050] It should be understood that each of the primary replica server 110 and the secondary replica server 120 is a logically independent database server. Although shown as a single entity, each of these servers can be physically implemented in any form suitable for performing the corresponding function, for example, the implementation method can be a single device, multiple centralized devices, distributed devices, and / or a virtual device deployed in the cloud, etc. The primary replica server 110 and each secondary replica server 120 are communicatively interconnected, so that the primary replica server 110 and the secondary replica server 120 can communicate and synchronize data. The embodiments of the present application do not limit the specific communication method.
[0051] It should be understood that the architecture and functions in the example environment 100 are described only for exemplary purposes, and do not imply any limitation on the scope of the present application. In addition, other devices, systems, or components not shown may also exist in the example environment 100. For example, the environment 100 may also include a client device that accesses the database system through an application installed thereon. In addition, the embodiments of the present application may also be applied to other environments with different structures and / or functions.
[0052] Reference now Figure 2 , which shows a flowchart of an exemplary method 200 for database synchronization provided by some embodiments of the present application. The exemplary method 200 may be, for example, Figure 1 The method 200 is performed by the primary replica server 110 shown, or by a system including the primary replica server 110 and the secondary replica server 120. It should be understood that the method 200 may also include additional actions not shown, and the scope of the present application is not limited in this respect. Figure 1 The method 200 is described in detail with reference to the example environment 100 of FIG.
[0053] In step 210, in response to a change in first instance-level data of the first database instance, second instance-level data in the first management library of the first database instance is updated. The first instance-level data is stored in the first system library of the first database instance. The first instance-level data includes information for the first database instance, such as a virtual system about instance-level permissions of the first database instance.
[0054] For example, the first database instance may be a master copy of a database system deployed on the master copy server 110, and the system library 130 therein stores instance-level data for the master copy. In response to changes in the instance-level data stored in the system library 130, the master copy server 110 may update the management library 150 accordingly.
[0055] In some embodiments, the master replica server 110 may establish a corresponding table in its management library 150 to record instance-level data. These data are derived from the instance-level data stored in the system library 130, and are updated accordingly in response to changes in the instance-level data in the system library 130. In some embodiments, the master replica server 110 may perform automatic updates of the management library 150 through triggers, as described below in conjunction with Figure 4 Will be described in more detail.
[0056] When updating the management library 150, the master replica server 110 may synchronize the instance-level data recorded in the management library 150 of the master replica with the instance-level data stored in the system library 130. In this way, updates to the system library 130 may be recorded in real time to the management library 150. As described above, the management library 150 may be a database associated with an administrator user in the master replica, and it may be synchronized to other replicas using a database-level synchronization model, which in turn provides a basis for subsequent synchronization between replicas.
[0057] In step 220, in response to the update of the second instance-level data, the updated second instance-level data is sent to the second database instance. The updated second instance-level data is used to update the third instance-level data of the second database instance. The third instance-level data is stored in the second management library of the second database instance.
[0058] For example, the second database instance may be a secondary replica of a database system deployed on a secondary replica server 120-1, which corresponds to a primary replica of the database system on the primary replica server 110. In some embodiments, in response to the update of the instance-level data in the management library 150 at step 210, the primary replica server 110 may utilize a synchronization model for a user library in the database system to send the updated data to the secondary replica on the secondary replica server 120-1. In this way, the sending of instance-level data to other replicas may be easily achieved through a database-level synchronization model, which cannot be achieved in conventional solutions.
[0059] For example, by implementing a database-level synchronization model supported by a server engine of a database system, an automatic synchronization association of a user library between a master copy and other copies can be set. This synchronization model is applicable to synchronization between corresponding databases between the management library 150 and other copies (e.g., the management library 150-1 of the secondary copy server 120-1). When the management library 150 is updated, automatic synchronization is triggered. Therefore, the master copy server 110 can automatically send the updated data to the secondary copy server 120-1 to synchronize the update to the management library 150-1 in the secondary copy server 120-1.
[0060] Using method 200, the updated data of instance-level data in the replica of the database system can be obtained by other replicas in near real time for synchronization, so that users do not need to reconfigure the instance level for other replicas, thereby improving the user experience. Compared with the periodic instance-level synchronization scheme, this reduces the possibility of missing instance-level information in the replica to be synchronized. In addition, after obtaining the update message, other replicas can independently complete the synchronization of the instance-level data on them, which reduces the dependence on specific replicas and makes the synchronization architecture easy to expand.
[0061] Highly available databases often have multiple secondary replicas, for example Figure 1 The replicas corresponding to the secondary replica servers 120-1 to 120-N in the primary replica. When the instance-level data in the primary replica changes, the data about the change can be synchronized to multiple replicas by the method described above. Therefore, in some embodiments, in response to the update of the instance-level data in the management library 150, the primary replica server can also send the updated instance-level data to the database servers other than the secondary replica server 120-1 (for example, the secondary replica servers 120-2 to 120-N) through the database-level synchronization model.
[0062] Reference now Figure 3 , which shows a flowchart of an exemplary method 300 for database synchronization according to some embodiments of the present application. The method 300 can be regarded as an additional step of the method 200, and can be executed after the second instance level data is sent at step 220. And, the method 300 is, for example, Figure 1 The method 300 is executed by the secondary replica server in the secondary replica server 120 shown, or by a system including the primary replica server 110 and the secondary replica server 120. It should be understood that the method 300 may also include additional actions not shown, and the scope of the present application is not limited in this respect. Figure 1 The method 300 is described in detail with reference to the example environment 100 and the secondary replica server 120 - 1 .
[0063] At step 310, the second database instance updates the third instance-level data based on the received updated second instance-level data. As described above in conjunction with step 220, the third instance-level data is stored in the second management library of the second database instance. For example, the first database instance and the second database instance can be the primary replica and the secondary replica deployed on the primary replica server 110 and the secondary replica server 120-1, respectively.
[0064] As mentioned above, the management library 150 can be a database associated with an administrator user in the primary replica. Similarly, the management library 150-1 can be a database associated with an administrator user in the corresponding secondary replica. Therefore, for example, using a database-level synchronization model supported by a server engine that implements a database system, an automatic synchronization association between the management library 150 and the management library 150-1 can be established. Thus, the database instance deployed on the secondary replica server can receive updated data from the management library 150 and synchronize the update to the management library 150-1 in itself.
[0065] At step 320, based on the third instance-level data, the fourth instance-level data of the second database instance is updated. The fourth instance-level data is stored in the second system library of the second database instance. For example, the auxiliary replica deployed by the auxiliary replica server 120-1 can update the system library 130-1 based on the management library 150-1. The system library 130-1 stores the instance-level data for the auxiliary replica.
[0066] Unlike ordinary user libraries and the management library described above, the system library 130-1 of the auxiliary replica cannot be synchronized with the system library 130 of the primary replica through the database-level synchronization model. However, the auxiliary replica server 120-1 can update the instance-level data (i.e., the fourth instance-level data) in the system library 130-1 accordingly based on the instance-level data of the primary replica obtained by synchronizing the management library 150-1. Therefore, the acquisition of instance-level data in other replicas by replicas can be easily achieved through the database-level synchronization model, which cannot be achieved in conventional solutions.
[0067] Using method 300, a replica of the database system can obtain updated data of instance-level data in other replicas in real time, and use the data to update its own instance-level data when necessary, thereby achieving the effect of synchronizing instance-level data between replicas. As a result, users do not need to reconfigure the instance level for the replica, thereby improving the user experience. In addition, since the instance-level data in the management library is always obtained in real time, this reduces the possibility that the replica will miss certain information when updating its own instance-level data. In addition, this solution is more flexible than the conventional solution, and each auxiliary replica can complete synchronization independently, reducing the dependence on the primary replica and reducing the performance pressure of the primary replica, while improving the scalability of the solution when adding new auxiliary replicas.
[0068] After the secondary replica server 150 obtains the instance-level update data of the primary replica by synchronizing the management library 150-1, the relevant data is stored in the management library 150-1, but the corresponding configuration (such as instance-level permission changes related to the update) has not yet taken effect in the secondary replica. Therefore, the secondary replica server 120-1 also needs to update the system library 130-1 to make these updates effective.
[0069] In some embodiments, in order to update the system library 130-1, the secondary replica server 150 may detect whether there is a difference between the instance-level data stored in its system library 130-1 and the instance-level data recorded in its management library 150-1. If a difference is detected, the secondary replica server 120-1 may update the instance-level data in the system library 130-1 based on the instance-level data in the management library 150-1. The secondary replica server 120-1 may perform this detection periodically or on demand, as described below in conjunction with Figure 4 Will be described in more detail.
[0070] If a difference is detected between the instance-level data stored in the system library 130-1 and the data recorded in the management library 150-1, it means that the instance-level data in the system library 130-1 is not synchronized with the system library 130 and therefore needs to be updated. In some embodiments, the auxiliary server 120-1 can play back the instance-level data in the management library 150-1 to synchronize the instance-level data stored in the system library 130-1 with the instance-level data recorded in the management library 150-1, that is, update it to a version consistent with that recorded in the management library 150-1. In this way, since the instance-level data in the management library 150-1 is always consistent with that in the system library 130, synchronization between the system library 130-1 and the system library 130 is achieved, so that the instance-level data is synchronized between the two replicas.
[0071] Reference now Figure 4 , which shows a schematic interaction diagram of a process 400 of database synchronization according to some embodiments of the present application. The process 400 involves Figure 1 The primary replica server 110 and the secondary replica server 120-1 described above can be regarded as the primary replica server 110 in the use of Figure 2 The method 200 is described with regard to the use of Figure 3 An example process of interacting with 120-1 of the described method.
[0072] At 405, using the database-level synchronization model, a synchronization association is established between the primary replica server 110 and the secondary replica server 120-1. Through this association, the regular user library and the management library 150 in the database instance on the primary replica server 110 can be automatically synchronized to the corresponding database on the secondary replica server 120-1.
[0073] At 410, a change in instance-level data (ie, first instance-level data) in system repository 130 is detected on master replica server 110. At 415, in response to the change detected at 410, master replica server 110 may update the instance-level data in local management repository 150.
[0074] As mentioned above, the information of the instance-level data of the current replica may be recorded in the management library 150, that is, the second instance-level data is stored. For example, the instance-level data in the management library 150 may be a copy of the instance-level data stored in the system library 130. For example, the specific data structure of the instance-level data in the management library 150 may be fine-tuned and / or optimized for the purpose of facilitating synchronization with the auxiliary replica, as long as the instance-level data recorded in the first management library can restore all aspects of the instance-level data in the system library.
[0075] The change of instance-level data in the system library 130 includes at least one operation performed by the master copy on the instance-level data. In some embodiments, in order to appropriately update the management library 150, a trigger defining a series of trigger actions can be established on the master copy server 110. The trigger action defined by the trigger can be automatically executed in response to detecting the corresponding trigger condition. For the trigger, the defined trigger action corresponds to the type of operation performed by the master copy on the instance-level data in the system 130. On this basis, if the change of instance-level data is associated with the corresponding operation type, the trigger can be triggered to execute the trigger action corresponding to the corresponding operation type to record the change to the management library 150. Thus, the data synchronization update between the management library 150 and the system library 130 can be achieved, so that the management library 150 always records the latest instance-level information for the master copy.
[0076] These operation types may include one or more of the following: a creation operation for instance-level data, a deletion operation for instance-level data, or a modification operation for instance-level data. For example, when new instance-level data (e.g., an entry for a new account) is created in the system library 130, the triggering action may be to create a corresponding entry in the management library 150 that records the data. When instance-level data is deleted from the system library 130, the triggering action may be to delete the corresponding entry in the management library 150. When instance-level data in the system library 130 is modified, the triggering action may be to modify the corresponding field in the management library 150.
[0077] In other embodiments, the triggering action may record the changes generated by the corresponding operation in the management library 150, such as in the form of incremental logs, etc. The embodiments of the present application are not limited to the specific format in which the instance-level data in the management library 150 is recorded, as long as the aspects of the instance-level data recorded therein can be consistent with the instance-level data in the system library 130.
[0078] In response to the update of the management library 150, the database-level synchronization operation between the master replica server 110 and the secondary replica server 120-1 is triggered. Therefore, at 420, the updated data is sent from the master replica server to the secondary replica server 120-1. Then, based on the synchronization model that implements the synchronization association, at 425, the update is synchronized to the local management library in the secondary replica server 120-1, that is, the management library 150-1. It should be understood that, although not shown, the master replica server 110 can establish a database-level synchronization association with multiple replica servers, such as replica servers 120-2 to 120-N. Therefore, in response to the update of the management library 150 at 415, the update can be sent and synchronized to the local management libraries of multiple replica servers.
[0079] Then, at 430, the auxiliary replica server 120-1 may compare the local system library and the management library to detect whether there is a difference between the instance-level data in the two. In some embodiments, the instance-level data stored in the system library 130 may be copied to the management library 150-1 in near real time via the management library 150 as an intermediary. In such an embodiment, as corresponding databases in different copies of the same database system, the system library 130-1 and the system library 130 may have the same data structure. In this way, by comparing whether the corresponding data entries in the system library 130-1 and the management library 150-1 are different, the auxiliary replica server 120-1 can determine whether there is a difference in the instance-level data in the two.
[0080] In some other embodiments, the specific data structure for recording instance-level information in the management library can be fine-tuned and / or optimized for the purpose of facilitating synchronization, or the management library can store instance-level data in a different form from the system library (e.g., in the form of incremental logs), as long as the instance-level data in the management library can record all aspects of the instance-level data in the system library. In such an embodiment, the auxiliary replica server 120-1 can compare whether there is a difference in the substantive content of the instance-level data in the management library 150-1 and the system library 130-1.
[0081] At 435, if a difference is detected between the instance-level data recorded in the management library 150-1 and the instance-level data stored in the system library 130-1 (e.g., due to synchronization at 425), the secondary replica server 120-1 can update the instance-level data in the system library 130-1 based on the instance-level data in the management library 150-1. The specific update method in the system library may depend on the implementation. In some embodiments, the secondary replica server 120-1 can replay the instance-level update data recorded in the management library 150-1, thereby synchronizing the instance-level data in the system library 130-1 with the instance-level data in the management library 150-1. At this point, the instance-level data updates in the system library in the primary replica server 110 are synchronized to the corresponding system library in the secondary replica server 120-1.
[0082] In some embodiments, the auxiliary replica server 120-1 may set a predetermined time interval and perform the above difference detection between the management library 150-1 and the system library 130-1 at each time interval. In this way, the instance-level data of the system library in the replica corresponding to the auxiliary replica server 120-1 can be synchronized with the primary replica regularly.
[0083] The auxiliary replica server 120-1 can also perform the above difference detection before the instance-level data in its system library is used, such as when the primary and standby switches, or when it receives an access request using an instance-level account, etc. If a difference exists at this time, the auxiliary replica server 120-1 first uses the instance-level data in the management library 150-1 to update the instance-level data in the system library 130-1 before being used. In this way, it can be ensured that the instance-level data actually used in the auxiliary replica is always consistent with the latest version of the primary replica.
[0084] It should be understood that process 400 is described only as an example, and process 400 may also include actions not shown or may be related to Figure 4 Different actions are shown. For example, there is synchronization between user libraries between the primary replica server 110 and the secondary replica server 120-1. In addition, the actions in process 400 can also be performed by other devices (for example, the secondary replica server 120-2).
[0085] Reference now Figure 5 , which shows an example architecture 500 for database synchronization according to some embodiments of the present application. The architecture 500 includes a primary replica server 510 and an auxiliary replica server 520, which are respectively deployed with a primary replica and an auxiliary replica of a database system. The auxiliary replica can be, for example, a backup replica or a read-only replica. For example, the primary replica server 510 and the auxiliary replica server 520 can be respectively Figure 1The example implementation of the primary replica server 110 and the secondary replica server 120-1, in which the database types and basic components are not repeated here.
[0086] A trigger 515 is running on the primary replica server 510. In response to the corresponding type of operation (such as creation, deletion, or modification) on the instance-level data stored in the system library 530, the trigger 515 will trigger the execution of the corresponding action, as shown by arrow 561. These actions update the management library 550 to record the changes of the instance-level data therein, as shown by arrow 562. In turn, through the database-level synchronization relationship established between the two replica servers, the update is synchronized to the management library 551 of the secondary replica server 520, as shown by arrow 563. As a result, the secondary replica server 520 can hold the latest version of the instance-level information of the primary replica.
[0087] The secondary replica server 520 also includes a control agent component 525. The control agent component 525 can detect the difference between the instance-level data in the management library 551 (i.e., information consistent with the instance-level configuration currently in effect on the primary replica) and the instance-level data in the system library 531 (i.e., information of the instance-level configuration currently in effect on the secondary replica), as shown by arrows 564-1 and 564-2. The difference detection can be performed periodically or in response to specific conditions. For example, the detection can be performed according to a user instruction or when the instance-level data in the secondary replica is to be used.
[0088] When a difference in instance-level data between the two databases is detected, the control agent component 525 updates the instance-level data in the system library 531 based on the instance-level data in the management library 551, so that the instance-level data in the system library 531 is consistent with that recorded in the management library 551. Thus, the management library is used as an intermediary. The auxiliary replica server 520 can obtain the update of the instance-level information of the primary replica through the database-level synchronization model, and then update the instance-level information in its corresponding replica accordingly when necessary, so as to achieve instance-level information synchronization between replicas. The entire synchronization process is shared by both the primary replica server 510 and the auxiliary replica server 520, which reduces the performance pressure of the primary replica server.
[0089] It should be understood that the example architecture 500 is only an example and may include other entities not shown in the figure. Figure 5 The replica server in the embodiment may also include a group of user databases. For example, the architecture 500 may also include other replica servers that can execute the method according to the embodiment of the present application. In addition, the replica roles described herein are only examples, and other scenarios of synchronizing instance-level information of a replica to other replicas also fall within the scope of the embodiment of the present application.
[0090] Figure 6 1 shows a schematic block diagram of a database synchronization system 600 according to some embodiments of the present application. The database system 600 may be implemented as or included in the following Figure 8 The database synchronization system 600 may include multiple devices for performing, for example, Figure 2 and Figure 3 The corresponding actions in methods 200 and 300 discussed in .
[0091] like Figure 6 As shown, the database synchronization system 600 includes an updating device 610 and a sending device 620. The updating device 610 is used to update the second instance-level data in the first management library of the first database instance in response to the change of the first instance-level data of the first database instance. The first instance-level data is stored in the first system library of the first database instance. The sending device 620 is used to send the updated second instance-level data to the second database instance in response to the update of the second instance-level data. The updated second instance-level data is used to update the third instance-level data of the second database instance, and the third instance-level data is stored in the second management library of the second database instance.
[0092] In some embodiments, the change to the first instance-level data includes at least one operation performed by the first database instance on the first instance-level data, and the system further includes an establishment device for establishing a trigger defining a trigger action corresponding to a type of the operation performed by the first database instance on the first instance-level data.
[0093] In some embodiments, the updating device includes an executing device for causing a trigger to execute a corresponding triggering action to update the second instance-level data based on the type of operation performed by the first database instance on the first instance-level data.
[0094] In some embodiments, the type of operation performed by the first database instance on the first instance-level data includes one or more of the following: a creation operation on the first instance-level data; a deletion operation on the first instance-level data; or a modification operation on the first instance-level data.
[0095] In some embodiments, the system also includes: a second updating device for enabling the second database instance to update third instance-level data based on the received updated second instance-level data; and a third updating device for updating fourth instance-level data of the second database instance based on the third instance-level data, wherein the fourth instance-level data is stored in a second system library of the second database instance.
[0096] In some embodiments, the third updating means comprises: a detecting means for detecting whether there is a difference between the fourth instance level data and the third instance level data; and an instance level data updating means for updating the fourth instance level data based on the third instance level data if a difference is detected.
[0097] In some embodiments, the detection device includes at least one of the following: a timing detection device for detecting whether there is a difference when a predetermined time interval has passed since the last detection; or a pre-use detection device for detecting whether there is a difference before the fourth instance level data is to be used.
[0098] In some embodiments, the sending device includes a synchronous sending device, which is used to send the updated second instance-level data to the second database instance by using a data synchronization model for a user library in the database system.
[0099] In some embodiments, the first database instance is a primary instance of the database system, and the second database instance is a standby instance or a read-only instance of the database system.
[0100] Both the updating device 610 and the sending device 620 can be implemented by software or hardware. As an example, the implementation of the updating device 610 is described below. Similarly, the implementation of the sending device 620 can refer to the implementation of the updating device 610.
[0101] As an example of a software functional unit, the update device 610 may include code running on a computing instance. The computing instance may be at least one of a physical host (computing device), a virtual machine, a container, and other computing devices. Furthermore, the above-mentioned computing device may be one or more. For example, the update device 610 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the application may be distributed in the same region or in different regions. The multiple hosts / virtual machines / containers used to run the code may be distributed in the same AZ or in different AZs, each AZ including a data center or multiple data centers with close geographical locations. Generally, a region may include multiple AZs.
[0102] Similarly, multiple hosts / virtual machines / containers used to run the code can be distributed in the same VPC or in multiple VPCs. Usually, a VPC is set up in a region. For cross-region communication between two VPCs in the same region and between VPCs in different regions, a communication gateway must be set up in each VPC to achieve interconnection between VPCs through the communication gateway.
[0103] As an example of a hardware functional unit, the updating device 610 may include at least one computing device, such as a server, etc. Alternatively, the updating device 610 may also be a device implemented by ASIC or PLD, etc. The PLD may be implemented by CPLD, FPGA, GAL or any combination thereof.
[0104] The multiple computing devices included in the update device 610 can be distributed in the same region or in different regions. The multiple computing devices included in the update device 610 can be distributed in the same AZ or in different AZs. Similarly, the multiple computing devices included in the update device 610 can be distributed in the same VPC or in multiple VPCs. The multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0105] The embodiment of the present application also provides a computing device 700. Figure 7 As shown, computing device 700 includes: bus 702, processor 704, memory 706 and communication interface 708. Processor 704, memory 706 and communication interface 708 communicate through bus 702. Computing device 700 can be a server or a terminal device. It should be understood that the present application does not limit the number of processors and memories in computing device 700.
[0106] The bus 702 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 The bus 704 is represented by only one line, but does not mean that there is only one bus or one type of bus. The bus 704 may include a path for transmitting information between various components of the computing device 700 (eg, the memory 706, the processor 704, and the communication interface 708).
[0107] The processor 704 may include any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).
[0108] The memory 706 may include a volatile memory, such as a random access memory (RAM). The processor 704 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD), or a solid state drive (SSD).
[0109] The memory 706 stores executable program codes, and the processor 704 executes the executable program codes to respectively implement the functions of the updating device 710 and the sending device 720, thereby implementing, for example, the method 200 and the method 300. That is, the memory 706 may store instructions for the methods and functions in any of the above embodiments.
[0110] The communication interface 708 uses a transceiver module such as, but not limited to, a network interface card or a transceiver to implement communication between the computing device 700 and other devices or communication networks.
[0111] The embodiment of the present application also provides a computing device cluster 800. The computing device cluster includes at least one computing device. The computing device can be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device can also be a terminal device such as a desktop, a laptop, or a smart phone.
[0112] like Figure 8 As shown, the computing device cluster includes at least one computing device 700. The memory 706 in one or more computing devices 700 in the computing device cluster may store the same instructions for executing the methods and functions in any of the above embodiments.
[0113] In some possible implementations, the memory 706 of one or more computing devices 700 in the computing device cluster may also store partial instructions for executing the method and functions in any of the above embodiments. In other words, the combination of one or more computing devices 700 can jointly execute instructions for executing the method and functions according to the embodiments of the present application.
[0114] It should be noted that the memory 706 in different computing devices 700 in the computing device cluster may store different instructions, which are respectively used to execute part of the functions of the database synchronization system 600. That is, the instructions stored in the memory 706 in different computing devices 700 may implement the functions of one or more modules or submodules of the updating device 610 and the sending device 620 (as well as the second updating device in some embodiments, etc.).
[0115] In some possible implementations, one or more computing devices in the computing device cluster may be connected via a network, which may be a wide area network or a local area network. Fig. 9 A possible implementation 900 is shown. Fig. 9 As shown, two computing devices 700A and 700B are connected via a network 910. Specifically, the network is connected via a communication interface in each computing device. In this type of possible implementation, for example, the memory 706 in the computing device 700A stores instructions for executing the function of the updating device 610. At the same time, the memory 706 in the computing device 700B stores instructions for executing the function of the sending device 620.
[0116] Fig. 9 The connection method between the computing device clusters shown may be considered to be that the method for database synchronization provided in the present application needs to store a large amount of user data, so it is considered to hand over the functions implemented by the sending device 920 to the computing device 700B for execution.
[0117] It should be understood that Fig. 9 The functions of the computing device 700A shown in the figure may also be performed by multiple computing devices 700. Similarly, the functions of the computing device 700B may also be performed by multiple computing devices 700. The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to perform the method and functions of any of the above embodiments.
[0118] An embodiment of the present application further provides a computer-readable storage medium having computer instructions stored thereon. When a processor executes the instructions, the processor executes the methods and functions involving the server 110 or the user device 120 in any of the above embodiments.
[0119] Generally, various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. Some aspects can be implemented in hardware, while other aspects can be implemented in firmware or software, which can be performed by a controller, microprocessor, or other computing device. Although various aspects of the embodiments of the present application are shown and described as block diagrams, flow charts, or using some other graphical representations, it should be understood that the boxes, devices, systems, techniques, or methods described herein can be implemented as, for example, non-limiting examples, hardware, software, firmware, dedicated circuits or logic, general hardware or controllers or other computing devices, or some combination thereof.
[0120] The present application also provides at least one computer program product tangibly stored on a non-transitory computer-readable storage medium. The computer program product includes computer executable instructions, such as instructions included in a program module, which are executed in a device on a real or virtual processor of the target to perform the process / method as described above with reference to the accompanying drawings. Typically, program modules include routines, programs, libraries, objects, classes, components, data structures, etc. that perform specific tasks or implement specific abstract data types. In various embodiments, the functions of program modules can be combined or divided between program modules as needed. Machine executable instructions for program modules can be executed in local or distributed devices. In distributed devices, program modules can be located in local and remote storage media.
[0121] The computer program code for implementing the method of the present application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device, so that the program code, when executed by the computer or other programmable data processing device, causes the function / operation specified in the flow chart and / or block diagram to be implemented. The program code can be executed completely on a computer, partially on a computer, as an independent software package, partially on a computer and partially on a remote computer or completely on a remote computer or server.
[0122] In the context of the present application, computer program code or related data may be carried by any appropriate carrier to enable a device, apparatus or processor to perform the various processes and operations described above. Examples of carriers include signals, computer readable media, and the like. Examples of signals may include electrical, optical, radio, acoustic or other forms of propagation signals, such as carrier waves, infrared signals, and the like.
[0123] A computer-readable medium may be any tangible medium containing or storing a program for or related to an instruction execution system, apparatus or device, or a data storage device such as a data center containing one or more available media. A computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, apparatus or device, or any suitable combination thereof. More detailed examples of computer-readable storage media include an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0124] In addition, although the operation of the method of the present application is described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired result. On the contrary, the steps depicted in the flow chart can change the order of execution. Additionally or alternatively, some steps can be omitted, multiple steps can be combined into one step for execution, and / or one step can be decomposed into multiple steps for execution. It should also be noted that the features and functions of two or more devices according to the present application can be embodied in one device. Conversely, the features and functions of a device described above can be further divided into being embodied by multiple devices.
[0125] The implementations of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the implementations of the application. Many modifications and changes are obvious to those of ordinary skill in the art without departing from the scope and spirit of the implementations described. The selection of terms used in this article is intended to explain the principles of each implementation, practical application or improvement of technology in the market, or to enable other ordinary skill in the art to understand the various implementations of the application.
Claims
1. A database synchronization method, It is characterized in that The method comprises: In response to a change in first instance-level data of a first database instance, updating second instance-level data in a first management repository of the first database instance, the first instance-level data being stored in a first system repository of the first database instance; and In response to the update of the second instance-level data, the updated second instance-level data is sent to the second database instance, and the updated second instance-level data is used to update the third instance-level data of the second database instance. The third instance-level data is stored in the second management library of the second database instance.
2. The method according to claim 1, It is characterized in that The change of the first instance-level data comprises at least one operation performed by the first database instance on the first instance-level data, and the method further comprises: A trigger is established that defines a trigger action, the trigger action corresponding to a type of operation performed by the first database instance on the first instance-level data.
3. The method according to claim 2, It is characterized in that The updating of the second instance-level data in the first management repository of the first database instance in response to the change of the first instance-level data of the first database instance includes: Based on the type of operation performed by the first database instance on the first instance-level data, the trigger executes a corresponding triggering action to update the second instance-level data.
4. The method according to claim 2 or 3, It is characterized in that The type of operation performed by the first database instance on the first instance-level data includes one or more of the following: a creation operation for the first instance-level data; a deletion operation on the first instance-level data; or A modification operation is performed on the first instance-level data.
5. The method according to claim 1, It is characterized in that The method further comprises: The second database instance updates the third instance-level data based on the received updated second instance-level data; and Based on the third instance-level data, fourth instance-level data of the second database instance is updated, and the fourth instance-level data is stored in a second system library of the second database instance.
6. The method according to claim 5, It is characterized in that The updating of fourth instance-level data of the second database instance based on the third instance-level data includes: detecting whether there is a difference between the fourth instance-level data and the third instance-level data; and If the presence of the difference is detected, the fourth instance level data is updated based on the third instance level data.
7. The method according to claim 6, It is characterized in that The detecting whether there is a difference between the fourth instance-level data and the third instance-level data comprises at least one of the following: detecting whether the difference exists when a predetermined time interval has passed since the last detection; or Before the fourth instance level data is to be used, it is detected whether the difference exists.
8. The method according to claim 1, It is characterized in that The sending of updated second instance-level data to the second database instance includes: The updated second instance-level data is sent to the second database instance by utilizing a data synchronization model for a user database in the database system.
9. The method according to claim 1, It is characterized in that The first database instance is a primary instance of a database system, and the second database instance is a backup instance or a read-only instance of the database system.
10. A database synchronization system, It is characterized in that The system comprises: an updating device for updating second instance-level data in a first management repository of a first database instance in response to a change in first instance-level data of the first database instance, the first instance-level data being stored in a first system repository of the first database instance; and A sending device, in response to the update of the second instance-level data, sends the updated second instance-level data to the second database instance, wherein the updated second instance-level data is used to update the third instance-level data of the second database instance, and the third instance-level data is stored in the second management library of the second database instance.
11. The system according to claim 10, It is characterized in that The change of the first instance-level data includes at least one operation performed by the first database instance on the first instance-level data, and the system further includes: Establishing means is used to establish a trigger defining a trigger action, wherein the trigger action corresponds to the type of operation performed by the first database instance on the first instance-level data.
12. The system according to claim 11, It is characterized in that The updating device comprises: An execution device is used to cause the trigger to execute a corresponding trigger action to update the second instance-level data based on the type of operation performed by the first database instance on the first instance-level data.
13. The system according to claim 11 or 12, It is characterized in that The type of operation performed by the first database instance on the first instance-level data includes one or more of the following: a creation operation for the first instance-level data; a deletion operation on the first instance-level data; or A modification operation is performed on the first instance-level data.
14. The system according to claim 10, It is characterized in that The system further comprises: second updating means, configured to enable the second database instance to update the third instance-level data based on the received updated second instance-level data; and The third updating device is used to update the fourth instance-level data of the second database instance based on the third instance-level data, wherein the fourth instance-level data is stored in the second system library of the second database instance.
15. The system according to claim 14, It is characterized in that The third updating device comprises: a detection device, configured to detect whether there is a difference between the fourth instance-level data and the third instance-level data; and The instance-level data updating means is configured to update the fourth instance-level data based on the third instance-level data if the difference is detected.
16. The system according to claim 15, It is characterized in that The detection device comprises at least one of the following: timing detection means for detecting whether or not said difference exists when a predetermined time interval has elapsed since the last detection; or The pre-use detection means detects whether the difference exists before the fourth instance level data is to be used.
17. The system according to claim 10, It is characterized in that The sending device comprises: The synchronous sending device is used to send the updated second instance-level data to the second database instance by utilizing the data synchronization model for the user library in the database system.
18. The system according to claim 10, It is characterized in that The first database instance is a primary instance of a database system, and the second database instance is a backup instance or a read-only instance of the database system.
19. A computing device cluster, It is characterized in that comprising at least one computing device, each computing device comprising a processor and a memory; The processor of the at least one computing device is configured to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster executes the method according to any one of claims 1 to 9.
20. A computer program product comprising instructions, It is characterized in that When the instructions are executed by a computing device cluster, the computing device cluster is caused to perform the method according to any one of claims 1 to 9.
21. A computer-readable storage medium, It is characterized in that The method comprises computer program instructions, and when the computer program instructions are executed by a computing device cluster, the computing device cluster performs the method according to any one of claims 1 to 9.
