Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Method and system for realizing consistency of database and cache by cache deletion retry mechanism

A technology for caching data and databases, applied in the computer field, can solve problems such as dirty data, cache and database inconsistencies, and achieve the effect of ensuring consistency, solving data inconsistencies, and achieving good results.

Pending Publication Date: 2021-11-09
FUJIAN TQ DIGITAL
View PDF5 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

This solution needs to sleep for 1 second, and dirty data may appear within 1 second, and if there is a second failure to delete the cache, there will still be inconsistencies between the cache and the database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and system for realizing consistency of database and cache by cache deletion retry mechanism
  • Method and system for realizing consistency of database and cache by cache deletion retry mechanism
  • Method and system for realizing consistency of database and cache by cache deletion retry mechanism

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0030] The present invention will be further described below in conjunction with the accompanying drawings.

[0031] see figure 1 As shown, the cache deletion retry mechanism of the present invention implements a database and cache consistency method, and the method includes the following steps:

[0032] Step S1, receiving a database update operation, and writing a request to update the database;

[0033] Step S2, there is a problem with the cached data, resulting in deletion failure;

[0034] Step S3, putting the key value that failed to be deleted into the message queue;

[0035] Step S4, subscribe to the message of the message queue, and obtain the key value to be deleted;

[0036] Step S5, retry the operation of deleting the cached data to ensure the final consistency between the cached data and the database.

[0037] The present invention will be further described below by a specific embodiment:

[0038] Step 1: Write a request to update the database

[0039] ---Tak...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a method for realizing the consistency of a database and a cache by a cache deletion retry mechanism. The method comprises the following steps of: S1, receiving a database updating operation, and writing a request to update the database; S2, deleting fails due to the fact that problems occur in the cache data; S3, putting the key values which fail to be deleted into a message queue; S4, subscribing the message of the message queue, and obtaining a key value to be deleted; and S5, retrying to delete the cached data to ensure the final consistency of the cached data and the database. According to the method, the final consistency of the cache data and the database can be ensured through a cache deletion retry mechanism.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a method and a system for realizing database and cache consistency through a cache deletion retry mechanism. Background technique [0002] In a distributed system, it can be understood that the value of data in multiple nodes is consistent. Generally divided into several types, as follows: [0003] (1) Strong consistency: what it requires the system to write will be what it reads out. The user experience is good, but the implementation often has a great impact on the performance of the system; [0004] (2) Weak consistency: This level of consistency constrains the system to not promise that the written value can be read immediately after the write is successful, nor does it promise how long the data will reach consistency, but it will try to guarantee a certain After a time level (such as second level), the data can reach a consistent state; [0005] (3) Final consistency: F...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/23G06F16/2455
CPCG06F16/2365G06F16/24552
Inventor 刘德建郑彬岳万恕陈宏展
Owner FUJIAN TQ DIGITAL
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products