Method for recording event logs and database engine

A database and log technology, applied in the database field, can solve the problems of reduced database system availability, slow writing of transaction logs to disk, poor user experience, etc., to improve user experience, reduce lock granularity, and improve performance.

Active Publication Date: 2014-04-16
HUAWEI CLOUD COMPUTING TECH CO LTD
View PDF4 Cites 71 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the serial method makes the transaction log writing to the disk very slow, and a single cache queue will cause the resource to be locked when responding to a

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 for recording event logs and database engine
  • Method for recording event logs and database engine
  • Method for recording event logs and database engine

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0069] In order to make the object, technical solution and advantages of the present invention clearer, the implementation manner of the present invention will be further described in detail below in conjunction with the accompanying drawings.

[0070] The embodiments of the present invention relate to a method for recording transaction logs and a database engine for recording transaction logs. The method for recording transaction logs and the database engine can be applied to database systems such as stand-alone, cluster or dual-machine backup. FIG. 1 is a schematic diagram of an application scenario of the above method and database engine. in, Figure 1a It is a schematic diagram of a stand-alone database system, which provides services such as query and modification of the database through the database engine, and stores them in the disk accordingly. Figure 1b It is a schematic diagram of a cluster database system, including multiple database engines, which provide users...

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 discloses a method for recording event logs and a database engine, and belongs to the technical field of databases. The method includes the steps that an SQL request is received; according to the SQL request, data pages corresponding to the SQL request are modified; corresponding event logs are generated for the modification; the event logs are partitioned to obtain a plurality of log segments, the log segments are written into a plurality of buffer queues, and the log segments in the buffer queues are written into a log file. The database engine comprises a receiving module, a modifying module, a generating module and writing-in module. According to the method for recording event logs and the database engine, the event logs can be recorded in parallel; due to the fact that the buffer queues are multiple and written into the log file in a parallel processing mode, not only is the lock granularity of the event log buffer queues reduced, but also the speed for writing the log file into a disk is greatly increased, the performance of a database system is improved, and user experience is improved.

Description

technical field [0001] The invention relates to the technical field of databases, in particular to a method for recording transaction logs and a database engine. Background technique [0002] The transaction log of the database is a file used to record every modification activity of the database. The transaction log is the basis for undoing transactions and recovering them in case of failure. Different from ordinary system logs, database transaction logs need to ensure sequence consistency when recording changes in the database system. When recovering from a fault, it is also required to recover completely in the order in which transactions occurred. Usually, in order to reduce input and output, the database system adopts the WAL (Write-Ahead Logging, write-ahead log) mechanism to record the transaction log. WAL means that modifications to data files must occur after these modifications have been recorded in the transaction log, that is, after the log records describing th...

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): G06F17/30
CPCG06F16/2358G06F11/1471G06F16/27G06F11/1469G06F2201/80G06F16/137G06F16/00G06F16/152G06F16/2365
Inventor 于巍刘辉军聂愿愿
Owner HUAWEI CLOUD COMPUTING TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products