IP Library › Granted Patent US 11,210,272
Granted Patent B2
US 11,210,272 · App. 16/394,402 · Granted Dec 28, 2021

Low latency cache synchronization in distributed databases

Inventors: Xinfeng Zhang (Shanghai, CN); Mengxin Ye (Redwood City, CA); Zhifeng Chen (Freemont, CA); Xiaokai Wu (Shanghai, CN)
Assignee: Electronic Arts Inc.
G06F16/1865G06F12/0891G06F16/1734G06F16/182G06F16/2358
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 11,210,272
App. No.
16/394,402
Granted
Dec 28, 2021
Kind
B2
Abstract

An example distributed database includes a first instance and a second instance. The first instance is configured to: responsive to performing, within a scope of a database update transaction, a first database update operation, invalidate a cache entry residing in the first database cache maintained by the first instance, wherein the first database update operation is reflected by a transaction log maintained by the first instance; perform, within the scope of the database update transaction, a second database update operation to insert an identifier of the cache entry into a predetermined table of the distributed database, wherein the second database update operation is reflected by the transaction log; and responsive to committing the database update transaction, transmit the transaction log to the second instance. The second instance is configured responsive to receiving the transaction log, to: perform the first database update operation specified by the transaction log; and invalidate the cache entry in the second database cache maintained by the second instance.

Claims (40)

1. A method, comprising:

performing, by a first instance of a distributed database, within a scope of a database update transaction, a first database update operation modifying a data item stored by the distributed database, wherein the first database update operation is reflected by a transaction log maintained by the first instance of the distributed database, and wherein the first instance of the distributed database resides in a first data center located at a first geographic location;

invalidating, in a database cache associated with the first instance of the distributed database, a cache entry storing a copy of the data item;

performing, within the scope of the database update transaction, a second database update operation to insert an identifier of the cache entry into a predetermined table of the distributed database, wherein the second database update operation is reflected by the transaction log;

committing the database update transaction by the first instance of the distributed database; and

transmitting the transaction log to a second instance of the distributed database, wherein the second instance of the distributed database resides in a second data center located at a second geographic location.

2. The method of claim 1 , wherein the predetermined table is implemented by a simulated storage engine without persistently storing data inserted into the predetermined table.

3. The method of claim 1 , wherein the database cache is managed according to a cache aside strategy.

4. The method of claim 1 , further comprising:

storing the identifier in the cache entry in a memory data structure indexed by a shard identifier of the first instance of the distributed database.

5. The method of claim 1 , wherein the first instance of the distributed database is horizontally-sharded.

6. The method of claim 1 , wherein the first instance of the distributed database is vertically-sharded.

7. The method of claim 1 , wherein transmitting the transaction log to the second instance of the distributed database is performed responsive to receiving a transaction log request from the second instance of the distributed database.

8. A method, comprising:

receiving, by a first instance of a distributed database, a transaction log reflecting a database update transaction including a first database update operation and a second database update operation performed by a second instance of the distributed database, wherein the second database update operation inserts, into a predetermined table of the distributed database, an identifier of a cache entry that has been invalidated by the second instance of the distributed database, and wherein the first instance of the distributed database resides in a first data center located at a first geographic location and the second instance of the distributed database resides in a second data center located at a second geographic location;

performing, by parsing the transaction log, the first database update operation and the second database update operation, wherein the first database update operation and the second database update operation are reflected by a commit log;

committing the database update transaction by the first instance of the distributed database;

parsing the commit log to retrieve the identifier of the cache entry that has been inserted into the predetermined table;

invalidating the cache entry in a database cache maintained by the first instance of the distributed database.

9. The method of claim 8 , wherein the predetermined table is implemented by a simulated storage engine without persistently storing data inserted into the predetermined table.

10. The method of claim 8 , wherein the database cache is managed according to a cache aside strategy.

11. The method of claim 8 , further comprising:

transmitting, to the second instance of the distributed database, a request for the transaction log.

12. The method of claim 8 , wherein the first instance of the distributed database is horizontally-sharded.

13. The method of claim 8 , wherein the first instance of the distributed database is vertically-sharded.

14. A distributed database, comprising:

a first instance comprising a first processor and a first memory, the first memory maintaining a first database cache, wherein the first instance of the distributed database resides in a first data center located at a first geographic location; and

a second instance comprising a second processor and a second memory, the second memory maintaining a second database cache, wherein the second instance of the distributed database resides in a second data center located at a second geographic location;

wherein the first instance is configured to:

responsive to performing, within a scope of a database update transaction, a first database update operation, invalidate a cache entry residing in the first database cache, wherein the first database update operation is reflected by a transaction log maintained by the first instance;

perform, within the scope of the database update transaction, a second database update operation to insert an identifier of the cache entry into a predetermined table of the distributed database, wherein the second database update operation is reflected by the transaction log; and

responsive to committing the database update transaction, transmit the

transaction log to the second instance; and

wherein the second instance is configured, responsive to receiving the transaction log, to:

perform the first database update operation specified by the transaction log; and

invalidate the cache entry.

15. The distributed database of claim 14 , wherein the predetermined table is implemented by a simulated storage engine without persistently storing data inserted into the predetermined table.

16. The distributed database of claim 14 , wherein the database cache is managed according to a cache aside strategy.

17. The distributed database of claim 14 , wherein invalidating the cache entry further comprises:

retrieving, from a commit log, a transaction log entry reflecting insertion of an identifier of the cache entry into a predetermined table of the distributed database.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 31, 2019
From: ZHANG, XINFENG; YE, MENGXIN; CHEN, ZHIFENG; WU, XIAOKAI
To: ELECTRONIC ARTS INC.
Reel/Frame 049331/0357 →
Continuity (2)
Continuation PCTCN2019080361 · Mar 29, 2019
Related Publication 20200311038A1 · Oct 1, 2020