IP Library Granted Patent US 12,050,618
Granted Patent B2
US 12,050,618 · App. 16/880,965 · Granted Jul 30, 2024

Upgrading replicated databases with small downtime

Inventors: Sheng Qiao (Fairfax, VA); Zhaohui George Yao (Leesburg, VA); Kim S. Lee (Atlanta, GA); Abhishek Chaturvedi (Pleasanton, CA); Jeff Zhu (Fairfax, VA); Mukesh Burgupalli (Mountain View, CA)
Assignee: Salesforce, Inc.
G06F16/27G06F3/0607G06F3/064G06F3/065G06F3/0683G06F16/21
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,050,618
App. No.
16/880,965
Granted
Jul 30, 2024
Kind
B2
Abstract

An online system performs upgrades of replicated databases. The online system stores data in a primary site and a secondary site. The primary site comprising databases used to process client requests and a secondary site comprising databases used as standby. The online system upgrades databases of both sites by upgrading the secondary site, switching client requests to the secondary site while using the databases of primary site as standby databases. The online system then upgrades the primary site. The process allows the online system to upgrade databases with small down time.

Claims (51)

1. A method for upgrading databases, comprising:

storing, by an online system, data in (1) a primary site comprising a primary set of databases processing client requests, the primary set of databases comprising a primary database and an alternate primary database that is a physical replication of the primary database, and (2) a secondary site comprising a secondary set of databases used as standby databases, the secondary set of databases comprising a secondary database and an alternate secondary database that is a physical replication of the secondary database;

upgrading the secondary site, comprising:

upgrading the alternate secondary database to an upgraded alternate secondary database;

after the upgrading of the alternate secondary database, applying recorded changes of the primary database of the primary set to the upgraded alternate secondary database, causing the upgraded alternate secondary database to be a logical replication of the primary database;

upgrading the secondary database to an upgraded secondary database, causing the secondary database to be a physical replication of the upgraded alternate secondary database;

after upgrading the secondary site, switching client requests to the secondary set of databases and using the primary set of databases as standby databases;

upgrading the primary site, comprising:

upgrading the alternate primary database to an upgraded alternate primary database, causing the upgraded alternate primary database to be a physical replication of the upgraded secondary database; and

upgrading the primary database to an upgraded primary database, causing the upgraded primary database to be a physical replication of the upgraded alternate primary database.

2. The method of claim 1 , wherein the primary and secondary sites represent respective physical locations.

3. The method of claim 1 , wherein responsive to switching client requests to the secondary set of databases, client requests are directed to the secondary database and changes to the secondary database are replicated to a database of the primary set of databases using a logical replication platform.

4. The method of claim 1 , wherein before upgrading databases of the secondary set of databases, client requests are directed to the primary database and changes to the primary database are replicated to a database of the secondary set of databases using physical replication that performs storage block level replication.

5. The method of claim 1 , wherein after upgrading databases of the secondary site, client requests are directed to the secondary databases and changes to the secondary database are replicated to a database of the primary set of databases using physical replication.

6. The method of claim 1 , wherein the online system is a multi-tenant system and each database from the primary set of databases and the secondary set of databases stores data of a plurality of tenants.

7. The method of claim 1 , wherein replication is used to copy data across databases within each set of the primary and secondary sets of databases.

8. The method of claim 1 , wherein, after the upgrading of the secondary database, the method further comprising:

upgrading one or more other databases from the secondary set of databases of the secondary site; and

wherein the switching of client requests to the secondary set of databases comprises directing client requests to the secondary database.

9. The method of claim 1 , wherein the switching of client requests to the secondary set of databases comprises directing client requests to the secondary database.

10. A non-transitory computer readable storage medium for storing instructions that when executed by a computer processor cause the computer processor to perform steps comprising:

storing, by an online system, data in (1) a primary site comprising a primary set of databases processing client requests, the primary set of databases comprising a primary database and an alternate primary database that is a physical replication of the primary database, and (2) a secondary site comprising a secondary set of databases used as standby databases, the secondary set of databases comprising a secondary database and an alternate secondary database that is a physical replication of the secondary database;

upgrading the secondary site, comprising:

upgrading the alternate secondary database to an upgraded alternate secondary database; and

after the upgrading of the alternate secondary database, applying recorded changes of the primary database of the primary set to the upgraded alternate secondary database, causing the upgraded alternate secondary database to be a logical replication of the primary database;

upgrading the secondary database to an upgraded secondary database, causing the secondary database to be a physical replication of the upgraded alternate secondary database;

after upgrading the secondary site, switching client requests to the secondary set of databases and using the primary set of databases as standby databases;

upgrading the primary site, comprising:

upgrading the alternate primary database to an upgraded alternate primary database, causing the upgraded alternate primary database to be a physical replication of the upgraded secondary database; and

upgrading the primary database to an upgraded primary database, causing the upgraded primary database to be a physical replication of the upgraded alternate primary database.

11. The non-transitory computer readable storage medium of claim 10 , wherein the primary and secondary sites represent respective physical locations.

12. The non-transitory computer readable storage medium of claim 10 , wherein responsive to switching client requests to the secondary set of databases, client requests are directed to the secondary database and changes to the secondary database are replicated to a database of the primary set of databases using a logical replication platform.

13. The non-transitory computer readable storage medium of claim 10 , wherein before upgrading databases of the secondary set of databases, client requests are directed to the primary database and changes to the primary database are replicated to a database of the secondary set of databases using physical replication that performs storage block level replication.

14. The non-transitory computer readable storage medium of claim 10 , wherein after upgrading database of the secondary site, client requests are directed to the secondary database and changes to the secondary database are replicated to a database of the primary set of databases using physical replication.

15. The non-transitory computer readable storage medium of claim 10 , wherein replication is used to copy data across databases within each set of the primary and secondary sets of databases.

16. The non-transitory computer readable storage medium of claim 10 , wherein the steps further comprise, after the upgrading of the secondary database:

upgrading one or more other databases from the secondary set of databases of the secondary site; and

wherein the switching of client requests to the secondary set of databases comprises directing client requests to the secondary database.

17. The non-transitory computer readable storage medium of claim 10 , wherein the switching of client requests to the secondary set of databases comprises directing client requests to the secondary database.

18. A computer system comprising:

a computer processor; and

a non-transitory computer readable storage medium for storing instructions that when executed by a computer processor cause the computer processor to perform steps comprising:

storing, by an online system, data in (1) a primary site comprising a primary set of databases processing client requests, the primary set of databases comprising a primary database and an alternate primary database that is a physical replication of the primary database, and (2) a secondary site comprising a secondary set of databases used as standby databases, the secondary set of databases comprising a secondary database and an alternate secondary database that is a physical replication of the secondary database;

upgrading the secondary site, comprising:

upgrading the alternate secondary database to an upgraded alternate secondary database;

after the upgrading of the alternate secondary database, applying recorded changes of the primary database of the primary set to the upgraded alternate secondary database, causing the upgraded alternate secondary database to be a logical replication of the primary database;

upgrading the secondary database to an upgraded secondary database, causing the secondary database to be a physical replication of the upgraded alternate secondary database;

after upgrading the secondary site, switching client requests to the secondary set of databases and using the primary set of databases as standby databases;

upgrading the primary site, comprising:

upgrading the alternate primary database to an upgraded alternate primary database, causing the upgraded alternate primary database to be a physical replication of the upgraded secondary database; and

upgrading the primary database to an upgraded primary database, causing the upgraded primary database to be a physical replication of the upgraded alternate primary database.

Assignments (2)
CHANGE OF NAME Recorded Oct 30, 2023
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 065394/0169 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 28, 2020
From: QIAO, SHENG; YAO, ZHAOHUI GEORGE; LEE, KIM S.; CHATURVEDI, ABHISHEK; ZHU, JEFF; BURGUPALLI, MUKESH
To: SALESFORCE.COM, INC.
Reel/Frame 052776/0970 →
Continuity (2)
Provisional Application 62989531 · Mar 13, 2020
Related Publication 20210286824A1 · Sep 16, 2021