IP Library › Granted Patent US 12,332,913
Granted Patent B2
US 12,332,913 · App. 18/228,446 · Granted Jun 17, 2025

Database replication with host replication at asynchronously replicated system

Inventors: Markus Behrens (Berlin, DE); Reiner Singer (Schriesheim, DE); Werner Thesing (Lautertal, DE); Yue Zhu (Heidelberg, DE); Omran Saleh (Wiesloch, DE)
Assignee: SAP SE
G06F16/273
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,332,913
App. No.
18/228,446
Granted
Jun 17, 2025
Kind
B2
Abstract

Various examples are directed to systems and methods for operating a primary database management system and a secondary database management system. The secondary database management system may receive a takeover request indicating that the secondary database management system is to assume a role of the primary database system. The secondary database management system may determine that a last valid commit of a first host of the secondary database system is an oldest last valid commit. The secondary database management system may revert to a first state of the primary database management system corresponding to the last valid commit of the first host. The secondary database management system may be configured to assume the role of the primary database management system.

Claims (76)

1. A system comprising:

a secondary database management system configured to asynchronously replicate a primary database management system remote from the secondary database management system, the secondary database management system comprising a first host performing a first source role, a second host performing a first replica role for the first source role, a third host performing a second source role, and a fourth host performing a second replica role for the second source role, the first host, the second host, third host, and fourth host being executable software components of the secondary database management system, the first host and the second host being for managing a first portion of data stored by the secondary database management system the third host and the fourth host being for managing a second portion of the data stored by the secondary database management system, and the secondary database management system being programmed to execute operations comprising:

receiving, by a coordinator component of the secondary database management system, a takeover request, the takeover request indicating that the secondary database management system is to assume a role of the primary database management system;

determining, by the coordinator component, that a last valid commit of the first host is an oldest last valid commit;

reverting the secondary database management system to a first state of the primary database management system corresponding to the last valid commit of the first host; and

after reverting the secondary database management system to the first state of the primary database management system, configuring the secondary database management system to assume the role of the primary database management system.

2. The system of claim 1 , the operations further comprising:

before receiving the takeover request, receiving, from the primary database management system, a first redo log describing a data change made by at least one host at the primary database management system;

determining, by the coordinator component, that the data change described by the first redo log corresponds to the first host; and

sending the first redo log to the first host.

3. The system of claim 2 , the operations further comprising:

replaying, by the first host, the first redo log;

determining, by the first host, that the second host has also replayed the first redo log; and

after determining that the second host has also replayed the first redo log, committing a transaction corresponding to the first redo log.

4. The system of claim 1 , the operations further comprising:

before receiving the takeover request receiving, from the primary database management system, a first redo log describing a first change made by at least one host at the primary database management system;

determining, by the coordinator component, that the first change described by the first redo log corresponds to the first host;

determining, by the coordinator component, that the first redo log is not a next redo log for the first host; and

caching, by the coordinator component, the first redo log.

5. The system of claim 4 , the operations further comprising:

receiving, from the primary database management system, a second redo log describing a second change made by at least one host at the primary database management system;

determining, by the coordinator component, that the second change described by the first redo log corresponds to the first host;

determining, by the coordinator component, that the second redo log is the next redo log for the first host; and

sending, by the coordinator component, redo log data to the first host, the redo log data comprising the first redo log and the second redo log.

6. The system of claim 5 , the operations further comprising:

replaying, by the first host, the second redo log; and

after replaying the second redo log, replaying, by the first host, the first redo log.

7. The system of claim 1 , a last valid commit for the third host corresponding to a second state of the primary database management system, the operations further comprising determining that the first state of the primary database management system is older than the second state of the primary database management system.

8. The system of claim 1 , the reverting of the secondary database management system to the first state of the primary database management system comprising using at least one redo log to reverse at least one commit at the third host.

9. A method for operating a primary database management system and a secondary database management system remote from the primary database management system, the secondary database management system comprising a first host performing a first source role, a second host performing a first replica role for the first source role, a third host performing a second source role, and a fourth host performing a second replica role for the second source role, the first host, the second host, third host, and fourth host being executable software components of the secondary database management system, the first host and the second host being for managing a first portion of data stored by the secondary database management system the third host and the fourth host being for managing a second portion of the data stored by the secondary database management system, the method comprising:

receiving, by a coordinator component of the secondary database management system, a takeover request, the takeover request indicating that the secondary database management system is to assume a role of the primary database management system;

determining, by the coordinator component, that a last valid commit of the first host is an oldest last valid commit;

reverting the secondary database management system to a first state of the primary database management system corresponding to the last valid commit of the first host; and

after reverting the secondary database management system to the first state of the primary database management system, configuring the secondary database management system to assume the role of the primary database management system.

10. The method of claim 9 , further comprising:

before receiving the takeover request, receiving, from the primary database management system, a first redo log describing a data change made by at least one host at the primary database management system;

determining, by the coordinator component, that the data change described by the first redo log corresponds to the first host; and

sending the first redo log to the first host.

11. The method of claim 10 , further comprising:

replaying, by the first host, the first redo log;

determining, by the first host, that the second host has also replayed the first redo log; and

after determining that the second host has also replayed the first redo log, committing a transaction corresponding to the first redo log.

12. The method of claim 9 , further comprising:

before receiving the takeover request receiving, from the primary database management system, a first redo log describing a first change made by at least one host at the primary database management system;

determining, by the coordinator component, that the first change described by the first redo log corresponds to the first host;

determining, by the coordinator component, that the first redo log is not a next redo log for the first host; and

caching, by the coordinator component, the first redo log.

13. The method of claim 12 , further comprising:

receiving, from the primary database management system, a second redo log describing a second change made by at least one host at the primary database management system;

determining, by the coordinator component, that the second change described by the first redo log corresponds to the first host;

determining, by the coordinator component, that the second redo log is the next redo log for the first host; and

sending, by the coordinator component, redo log data to the first host, the redo log data comprising the first redo log and the second redo log.

14. The method of claim 13 , further comprising:

replaying, by the first host, the second redo log; and

after replaying the second redo log, replaying, by the first host, the first redo log.

15. The method of claim 9 , a last valid commit for the third host corresponding to a second state of the primary database management system, the method further comprising determining that the first state of the primary database management system is older than the second state of the primary database management system.

16. The method of claim 9 , the reverting of the secondary database management system to the first state of the primary database management system comprising using at least one redo log to reverse at least one commit at the third host.

17. A non-transitory machine-readable medium comprising instructions thereon that, when executed at a secondary database management system, cause the secondary database management system to perform operations comprising:

asynchronously replicating a primary database management system, the secondary database management system comprising a first host performing a first source role, a second host performing a first replica role for the first source role, a third host performing a second source role, and a fourth host performing a second replica role for the second source role, the first host, the second host, third host, and fourth host being executable software components of the secondary database management system, the first host and the second host being for managing a first portion of data stored by the secondary database management system, the third host and the fourth host being for managing a second portion of the data stored by the secondary database management system;

receiving, by a coordinator component of the secondary database management system, a takeover request, the takeover request indicating that the secondary database management system is to assume a role of the primary database management system;

determining, by the coordinator component, that a last valid commit of the first host is an oldest last valid commit;

reverting the secondary database management system to a first state of the primary database management system corresponding to the last valid commit of the first host; and

after reverting the secondary database management system to the first state of the primary database management system, configuring the secondary database management system to assume the role of the primary database management system.

18. The medium of claim 17 , the operations further comprising:

before receiving the takeover request, receiving, from the primary database management system, a first redo log describing a data change made by at least one host at the primary database management system;

determining, by the coordinator component, that the data change described by the first redo log corresponds to the first host; and

sending the first redo log to the first host.

19. The medium of claim 18 , the operations further comprising:

replaying, by the first host, the first redo log;

determining, by the first host, that the second host has also replayed the first redo log; and

after determining that the second host has also replayed the first redo log, committing a transaction corresponding to the first redo log.

20. The medium of claim 17 , the operations further comprising:

before receiving the takeover request receiving, from the primary database management system, a first redo log describing a first change made by at least one host at the primary database management system;

determining, by the coordinator component, that the first change described by the first redo log corresponds to the first host;

determining, by the coordinator component, that the first redo log is not a next redo log for the first host; and

caching, by the coordinator component, the first redo log.

Assignments (2)
CORRECTIVE ASSIGNMENT TO CORRECT THE THE TITLE IS CORRECT PREVIOUSLY RECORDED AT REEL: 064450 FRAME: 0884. ASSIGNOR(S) HEREBY CONFIRMS THE ASSIGNMENT. Recorded Sep 8, 2023
From: BEHRENS, MARKUS; SINGER, REINER; THESING, WERNER; ZHU, YUE; SALEH, OMRAN
To: SAP SE
Reel/Frame 064841/0832 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 1, 2023
From: BEHRENS, MARKUS; SINGER, REINER; THESING, WERNER; ZHU, YUE; SALEH, OMRAN
To: SAP SE
Reel/Frame 064450/0884 →
Continuity (1)
Related Publication 20250045297A1 · Feb 6, 2025
References Cited (29)
US 9804935B1 · Holenstein · 2017 [cited by examiner]
US 11436097B1 · Kumar · 2022 [cited by examiner]
US 11947555B1 · Mohideen · 2024 [cited by examiner]
US 11966411B1 · Rajgaria · 2024 [cited by examiner]
US 20110173233A1 · Matsumura · 2011 [cited by examiner]
US 20130282666A1 · McGee · 2013 [cited by examiner]
US 20150046744A1 · Frerking · 2015 [cited by examiner]
US 20170116232A1 · Marwah · 2017 [cited by examiner]
US 20180074915A1 · Yang et al. · 2018 [cited by applicant]
US 20180246928A1 · Kim · 2018 [cited by examiner]
US 20180336258A1 · Lee · 2018 [cited by examiner]
US 20190306236A1 · Wiener · 2019 [cited by examiner]
US 20200097556A1 · Chen et al. · 2020 [cited by applicant]
US 20220030062A1 · Jennings · 2022 [cited by examiner]
US 20220253363A1 · Zhang · 2022 [cited by examiner]
US 20220382742A1 · Procek et al. · 2022 [cited by applicant]
US 20230229363A1 · Karr · 2023 [cited by examiner]
US 20230229572A1 · Murata · 2023 [cited by examiner]
US 20240069779A1 · Nhs · 2024 [cited by examiner]
US 20250045034A1 · Behrens et al. · 2025 [cited by applicant]
US 20250045178A1 · Behrens et al. · 2025 [cited by applicant]
US 20250045296A1 · Behrens et al. · 2025 [cited by applicant]
EP 4083786 · 2022 [cited by applicant]
“SAP HANA System Replication”, SAP HANA Platform 2.0 SPS 04. Document version 1.1-2019-10-31, (Oct. 31, 2019), 286 pgs. [cited by applicant]
“U.S. Appl. No. 18/228,395, Non Final Office Action mailed Nov. 20, 2024”, 12 pgs. [cited by applicant]
“SAP HANA System Replication”, SAP HANA Platform 2.0 SPS 05. Document version 1.1-2021-07-30, (Jul. 30, 2021), 274 pgs. [cited by applicant]
“European Application No. 24185975.0 Extended European Search Report mailed on Dec. 4, 2024”, 50 pgs. [cited by applicant]
“U.S. Appl. No. 18 228,395, Response filed Dec. 31, 2024 to Non Final Office Action mailed Nov. 20, 2024”, 12 pgs. [cited by applicant]
“U.S. Appl. No. 18/228,427, Non Final Office Action mailed Jan. 2, 2025”, 9 pgs. [cited by applicant]
Cited By (2)
US 12,645,443 US 12,693,948