[go: up one dir, main page]

WO2017006423A1 - Computer system and database management method - Google Patents

Computer system and database management method Download PDF

Info

Publication number
WO2017006423A1
WO2017006423A1 PCT/JP2015/069479 JP2015069479W WO2017006423A1 WO 2017006423 A1 WO2017006423 A1 WO 2017006423A1 JP 2015069479 W JP2015069479 W JP 2015069479W WO 2017006423 A1 WO2017006423 A1 WO 2017006423A1
Authority
WO
WIPO (PCT)
Prior art keywords
log
commit
output
transaction
physical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/JP2015/069479
Other languages
French (fr)
Japanese (ja)
Inventor
敦 友田
有哉 礒田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2017526828A priority Critical patent/JP6263673B2/en
Priority to PCT/JP2015/069479 priority patent/WO2017006423A1/en
Publication of WO2017006423A1 publication Critical patent/WO2017006423A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures

Definitions

  • the present invention generally relates to database management.
  • Changes to the database are generally completed when writing to a so-called persistence device (typically a non-volatile storage device) is complete.
  • persistence device typically a non-volatile storage device
  • the time required for writing to the permanent device is longer than the time required for writing to the main memory. Therefore, when another transaction refers to a record updated by a preceding transaction, it is necessary to wait for a log of the preceding transaction to be output and a completion response received.
  • Patent Document 1 if there is no collision with another transaction, the log output of the preceding transaction is started, and at the same time, the record updated by the preceding transaction is not changed without waiting for the log output completion response.
  • a technique that enables a transaction to refer to is disclosed.
  • a transaction log output destination device is generally a device having I / O (Input / Output) response performance lower than that of a memory in which a database is arranged. For this reason, in the entire database transaction processing, the ratio of the time from the log output for committing the transaction to the reception of the response of the log output is not small, so it is difficult to recognize the throughput improvement by the speculative execution processing. .
  • the computer system may When log output is performed, commit completion is output without receiving a response to the log output.
  • This computer system includes at least one of a server system (one or more server computers) that executes a DBMS and a client system (one or more client computers) that issues a request (for example, a query) to the server system.
  • FIG. 1 shows an example of the configuration of the entire system according to an embodiment.
  • a configuration example of a DBMS (database management system) and a relationship example between the DBMS, an OS (Operating System), an I / O adapter, and an external storage device are shown.
  • the structural example of a Tx (transaction) management part is shown.
  • the structural example of a log management part is shown.
  • An example of the flow of Tx processing is shown.
  • An example of the flow of log output processing is shown.
  • An example of log configuration is shown.
  • An example of the flow of database recovery processing is shown.
  • An example of the flow of log application processing is shown.
  • An example of the flow of I / F control processing is shown.
  • An example of a setting user interface is shown.
  • the issuer of a query to a database management system may be a computer program inside the DBMS or a computer program outside the DBMS (for example, executed by a client system).
  • Computer program may be a computer program inside the DBMS or a computer program outside the DBMS (for example, executed by a client system).
  • the query issuer is a client computer.
  • an I / O (Input / Output) request is a write request or a read request, and may be referred to as an access request.
  • the processor typically includes a microprocessor (for example, CPU (Central Processing Unit)), and further includes dedicated hardware (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)). Good. Further, the processing disclosed with these functional units as the subject may be processing performed by a computer. Further, some or all of these functional units may be realized by dedicated hardware. Various functional units may be installed in each computer by a program distribution server or a computer-readable storage medium.
  • the various functional units and the server may be installed and executed in one computer, or may be installed and executed in a plurality of computers.
  • the processor is an example of a control unit, and may include a hardware circuit that performs part or all of the processing.
  • the program may be installed in a computer-like device from a program source.
  • the program source may be, for example, a storage medium that can be read by a program distribution server or a computer.
  • the program distribution server may include a processor (for example, a CPU) and a storage unit, and the storage unit may further store a distribution program and a program to be distributed.
  • the processor of the program distribution server executes the distribution program, so that the processor of the program distribution server may distribute the distribution target program to other computers.
  • two or more programs may be realized as one program, or one program may be realized as two or more programs.
  • the “thread” may be an OS thread or a pseudo thread.
  • the OS thread is a thread managed by an OS (Operating System) (for example, a thread managed by a kernel and a library), and can also be called a real thread.
  • the “pseudo thread” is a thread managed by the DBMS.
  • the OS thread can be included in a plurality of pseudo threads by being subdivided in a pseudo manner by the DBMS.
  • the “storage unit” may be one or more storage devices including a memory.
  • the storage unit may be at least a main storage device of a main storage device (typically a volatile memory) and an auxiliary storage device (typically a nonvolatile storage device).
  • displaying display information” by a server system may be displaying display information on a display device included in the server system, or an external system ( For example, the display information may be transmitted to a client system (in the latter case, the display information is displayed by an external system).
  • a server system for example, a database server
  • the display information may be transmitted to a client system (in the latter case, the display information is displayed by an external system).
  • FIG. 1 shows a configuration example of the entire system according to the embodiment.
  • An external storage device 402 is connected to the database server 401 via, for example, a communication network 403.
  • a client computer (hereinafter referred to as a client) 405 is connected to the database server 401 via a communication network 404, for example.
  • the client 405 is an example of a client system.
  • the client 405 issues a request to the database server 401 and receives a response as a processing result of the request from the database server 401.
  • the request is, for example, a query.
  • the client 405 is an example of a query issuer.
  • the database server 401 is an example of a server system.
  • the database server 401 is a computer, and may be, for example, a personal computer, a workstation, or a mainframe, or may be a virtual computer configured by a virtualization program in these computers.
  • the database server 401 includes an I / O adapter 409, an I / O adapter 413, a memory (typically main memory) 416, a storage device 415, and a processor 414 connected thereto.
  • the processor 414 may be, for example, a microprocessor or a module including a microprocessor and a dedicated hardware circuit.
  • the processor 414 executes a computer program.
  • the computer program executed by the processor 414 is, for example, an operating system (OS) 117 and a database management system (DBMS) 412.
  • OS operating system
  • DBMS database management system
  • the memory 416 is, for example, a volatile DRAM (Dynamic Random Access Memory) or the like, and temporarily stores a program executed by the processor 414 and data used by the program.
  • the storage device 415 is non-volatile, and is, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive).
  • the storage device 415 may store a program and data used by the program.
  • At least the memory 416 of the memory 416 and the storage device 415 is an example of a storage unit.
  • the I / O adapter 409 connects the communication network 404 and the database server 401.
  • the I / O adapter 413 connects the communication network 403 and the database server 401.
  • At least one of the I / O adapters 409 and 413 is an example of an interface device.
  • the external storage device 402 is a device having a storage device group 451 including a plurality of storage devices, and is, for example, a disk array device, but may instead be a single storage device.
  • the external storage device 402 stores the log file 301.
  • the external storage apparatus 402 receives a log I / O request from the database server 401, reads and writes data (for example, a log) in accordance with the I / O request, and returns the result to the database server 401.
  • the storage device included in the storage device group 451 is a device having a nonvolatile storage medium, and is, for example, an HDD or an SSD.
  • the storage device group 451 may be a RAID (Redundant Array of Independent Disks) group, and may store data at a predetermined RAID level.
  • a logical storage device (for example, logical unit, logical volume, file system volume) based on the storage space of the storage device group 451 is provided to the database server 401, and the log file 301 is stored on the logical storage device. May be.
  • the log file 301 is an example of a log storage area.
  • the external storage apparatus 402 includes an I / O adapter 441 and a storage controller 442 connected thereto in addition to the storage device group 451.
  • the I / O adapter 441 connects the external storage apparatus 402 to the communication network 403, and is connected to the database server 401 via this.
  • a communication protocol via the communication network 403 for example, Fiber Channel (FC), SCSI (Small Computer System Interface), or TCP / IP (Transmission Control Protocol / Internet Protocol) may be employed.
  • the I / O adapter 441 (and 413) may be called a host bus adapter.
  • the storage controller 442 includes, for example, a memory and a processor, and reads / writes data from / to the storage device group 451 storing the log file 301 in response to an I / O request from the database server 401.
  • FIG. 2 shows a configuration example of the DBMS 412 and a relationship example between the DBMS 412, the OS 117, the I / O adapter 413, and the external storage device 402.
  • the DBMS 412 is an in-memory database.
  • the DBMS 412 arranges a database (for example, the table 111 and the index 112) on the memory 416.
  • the DBMS 412 may include a lock mechanism 116. This is because the lock mechanism 116 prevents two or more threads 110 from competing.
  • the lock mechanism 116 may be information indicating whether or not the lock has been acquired. For example, the lock mechanism 116 may have a value “1” if the lock has been acquired, and may have a value “0” if the lock has not been acquired.
  • the DBMS 412 includes a Tx (transaction) management unit 113, a log buffer 114, and a log management unit 115.
  • the Tx management unit 113 manages Tx being executed and its state (particularly, a commit state described later).
  • the log buffer 114 temporarily stores a log including an update history for the table 111 and the index 112.
  • the log management unit 115 manages the log file 301 and log writing to the log file.
  • the DBMS 412 has system information 24.
  • the system information 24 is an example of information included in the management information.
  • the system information 24 includes output control information 26 and mode control information 28.
  • the output control information 26 is information indicating whether or not to execute a logical commit output, which is to output (for example, display) a commit completion before a log output response is received after a log output for commit is performed. It is.
  • the mode control information 28 is information indicating whether or not a speculative execution processing mode, which is a processing mode for starting another Tx based on the result of the Tx without receiving a log output response for the commit of Tx, is on. is there. That is, the DBMS 412 can select whether to perform speculative execution processing according to the mode control information 28 in the system information 24.
  • the DBMS 412 can select whether or not to execute the logical commit output in the speculative execution process according to the output control information 26 in the system information 24.
  • a state of logical commit in addition to physical commit is managed.
  • Physical commit is a state that means that a log output response for Tx commit is received and that the Tx states of all generated Tx related to the Tx are physical commits.
  • the generated Tx related to Tx is Tx generated (updated) by the record referenced by Tx.
  • the “logical commit” is a state before the log output response is received after the log output for the Tx commit is performed.
  • the DBMS 412 receives a query from the query issuer, and executes one or a plurality of Tx in the execution of the received query.
  • the DBMS 412 includes a query reception unit 421, a query execution plan generation unit 422, and a query execution unit 424.
  • the query receiving unit 421 receives a query issued by a query issuer.
  • the query is described in, for example, a structured query language (SQL (Structured Query) Language).
  • SQL Structured Query
  • a plurality of Tx may be described in one query, or a plurality of Tx may be described in a plurality of queries.
  • the query execution plan generation unit 422 generates a query execution plan including one or more database operations necessary for executing the query from the query received by the query reception unit 421.
  • the query execution plan is, for example, information including a relationship between one or more database operations and the execution order of the database operations, and is stored as query execution plan information 423.
  • a query execution plan may be represented by a tree structure in which a database operation is a node and a relation of execution order of database operations is an edge.
  • the query execution unit 424 executes the query received by the query reception unit 421 according to the query execution plan generated by the query execution plan generation unit 422, and returns the execution result to the query issuer. At this time, the query execution unit 424 issues a data read request (reference request) necessary for execution of the database operation, and uses the data read from the table 111 in accordance with the read request to execute the database operation (for example, Then, new data is calculated using the read data (value), and a write request is issued to update the data in the read source record to the calculated data).
  • the query execution unit 424 performs database operation by executing the thread 110. In the DBMS 412, a plurality of threads 110 are executed in parallel. For this reason, the processor 414 has a plurality of cores.
  • the thread 110 may be called a task.
  • One thread 110 may execute one Tx corresponding to one or more database operations.
  • the subject of the processing performed by the query execution unit 424 executing the thread 110 may be the thread 110.
  • the query execution unit 424 (thread 110) issues an I / O request to the external storage apparatus 402 to the OS 117 in order to write a log to the log file 301 in the external storage apparatus 402 during execution of Tx.
  • the OS 117 accepts the I / O request and issues an I / O request to the external storage apparatus 402.
  • a plurality of I / O queues 201 are prepared.
  • the thread 110 issues an I / O request for writing a log.
  • the I / O queue 201 stores the I / O request.
  • the I / O request is stored in the I / O queue 201 by the OS 117.
  • External storage device 402 stores log file 301.
  • a log to which an I / O request is written is recorded.
  • the external storage apparatus 402 is an example of a log output destination device, and is an example of a storage device having an I / O response performance lower than that of the memory 416.
  • the log file 301 may exist in another storage device having an I / O response performance lower than that of the memory 416 instead of the external storage apparatus 402.
  • the log file 301 may also exist in the memory 416.
  • the thread 110 and the I / O queue 201 correspond 1: 1. That is, one I / O queue 201 is assigned to each thread 110.
  • the thread 110 issues a log write request indicating that the record of the table 111 has been updated to the log file 301.
  • the issued write request is sent to the OS 117.
  • the OS 117 receives a write request for the log file 301 and stores the write request in the I / O queue 201 corresponding to the thread 110.
  • the write request stored in the I / O queue 201 is sent from the I / O queue 201 to the external storage device 402 by the OS 117.
  • the log that is the write target data of the write request is written to the log file 301.
  • the configuration of the DBMS 412 shown in FIG. 2 is merely an example.
  • a certain component may be divided into a plurality of components, and a plurality of components may be integrated into one component.
  • FIG. 3 shows a configuration example of the Tx management unit 113.
  • the Tx management unit 113 includes Tx state information 130 and Tx information 140.
  • the Tx state information 130 includes a Tx state entry 131 for each Tx being executed.
  • the Tx state entry 131 includes information such as TxID, Tx state, and Tx information pointer.
  • TxID is the ID of Tx. Examples of the Tx state include begin, select, update, insert, logical commit, physical commit, and others. Select, update, and insert are examples of states belonging to the SQL state. A logical commit and a physical commit are examples of states belonging to a commit state.
  • the Tx information pointer is a pointer to the Tx information 140.
  • the Tx state indicated by the Tx state entry 131 is the current state of Tx corresponding to the entry 131.
  • Tx information 140 exists for each Tx.
  • the Tx information 140 includes a read set 150 and a write set 160.
  • the details of the Tx information 140 will be described below by taking one Tx as an example.
  • the Tx is referred to as “target Tx” in the description of FIG.
  • the lead set 150 includes information related to the record referred to by the target Tx, in other words, information related to Tx (hereinafter, generated Tx) that generated the record referred to by the target Tx.
  • the lead set 150 has a reference record entry 151 for each record referenced by the target Tx.
  • the reference record entry 151 includes information such as record ID, value, and TxID.
  • the record ID is the ID of the record referenced by the target Tx.
  • the value is each column value (value in the column) in the record referenced by the target Tx.
  • TxID is the ID of the generated Tx that generated the record referenced by the target Tx.
  • the light set 160 includes information related to the record updated by the target Tx. Specifically, the light set 160 has an update record entry 161 for each record updated by the target Tx.
  • the update record entry 161 has information such as a record ID and a value.
  • the record ID is an ID of a record updated (generated) by the target Tx.
  • the value is a value (value in the record) updated by the target Tx.
  • Tx management is as follows. At the beginning of Tx, the Tx management unit 113 adds the Tx state entry 131 to the Tx state information 130 and adds the Tx information 140. The Tx management unit 113 registers the Tx ID of the started Tx, the Tx state “begin”, and the Tx information pointer to the added Tx information 140 in the added Tx state entry 131. Thereafter, for example, at the time of selection in the Tx, the Tx management unit 113 stores the information of the selected record in the read set 150 in the added Tx information 140 (Tx information 140 linked to the Tx information pointer). As a result of the selection, specifically, a reference record entry 151 is written for each referenced record.
  • the TxID registered in the reference record entry 151 (TxID of the generated Tx) is the TxID of Tx corresponding to the light set 160 including the same record ID as the referenced record ID.
  • the Tx state (Tx state in the entry 131 corresponding to the Tx) is updated by the Tx management unit 113 to update, insert, logical commit, physical commit, or the like.
  • FIG. 4 shows a configuration example of the log management unit 115.
  • the log management unit 115 has a lock mechanism 121 and a log file address 122.
  • the lock mechanism 121 may also be data indicating whether or not the lock of the log management unit 115 has been acquired, like the lock mechanism 116 shown in FIG. For example, the lock mechanism 121 may have a value “1” if the lock has been acquired, and may have a value “0” if the lock has not been acquired. In order to write or read the log file address 122, the lock of the lock mechanism 121 must be acquired.
  • the log file address 122 is a log write destination address in the log file 301.
  • the address (value) represented by the log file address 122 is added by the size of the log to be output each time a log is written to the log file 301.
  • FIG. 5 shows an example of the flow of Tx processing.
  • one Tx is taken as an example.
  • the Tx is referred to as “target Tx” in the description of FIGS.
  • the query execution unit 424 When the target Tx is started, the query execution unit 424 generates the read set 150 / write set 160 based on the instruction corresponding to the target Tx (instruction in the query) (S501). At the beginning of the target Tx, the table 111 and the index 112 are not changed. Thereafter, selection, update, and the like are performed, so that reference or update of the table 111 and the index 112 is performed. After that, a commit will be performed.
  • the query execution unit 424 makes a commit determination (S502).
  • a commit determination for example, whether the change to the table 111 and the index 112 performed by the target Tx based on the read set 150 / write set 160 is consistent with other Tx is based on the isolation level of the database. Determined.
  • the query execution unit 424 performs an abort process (S507), issues an abort completion notification (S508), and ends the target Tx.
  • the query execution unit 424 executes the log output process (S504) and ends the target Tx.
  • a commit completion notification according to at least a physical commit is performed.
  • FIG. 6 shows an example of the flow of the log output process (S504 in FIG. 5).
  • the query execution unit 424 secures an area for temporary storage of logs from the log buffer 114.
  • a log specifically, information that is a component of the log is written in the reserved area.
  • FIG. 7 shows a configuration example of the log.
  • the log 30 includes a log header 31 and a log main body 32.
  • the log header 31 includes a log size 33 and a commit flag 34.
  • the log size 33 represents the size of the log 30.
  • the commit flag 34 indicates whether the current Tx state (at the time of generation of the log 30) of each generation Tx of the target Tx corresponding to the log 30 is a physical commit, in other words, whether the Tx state of the target Tx is a physical commit. Is information.
  • the commit flag 34 is an example of commit status information.
  • the log main body 32 includes a TxID 35, a write set 36, and a read set 37.
  • TxID 35 is the TxID of the target Tx corresponding to the log 30.
  • the light set 36 is a copy of the light set 160 in the Tx information (hereinafter, target Tx information) 140 corresponding to the target Tx.
  • the lead set 37 includes a copy of the lead set 150 in the target Tx information 140 and a Tx state for each reference record entry.
  • the Tx state associated with the reference record entry is the Tx state of the generated Tx corresponding to the entry.
  • the log 30 may not record the Tx state of the generated Tx.
  • the query execution unit 424 determines whether all the read sets 150 and write sets 160 in the target Tx information 140 have been recorded in the log of the target Tx (S601).
  • the query execution unit 424 reads from the target Tx information 140 the read set 150 or the write set 160 that is not yet recorded in the log 30 from the target Tx information 140 (S602). .
  • the query execution unit 424 records the read set 150 or write set 160 in the log (S603).
  • the query execution unit 424 adds to each reference record entry in the lead set 37 recorded in the log 30 the generated Tx corresponding to the reference record entry.
  • the current Tx state (Tx state specified from the Tx state information 130) is associated.
  • the associated Tx state is also recorded in the log 30.
  • the reference record entry corresponding to the generated Tx whose current Tx state is physical commit is not recorded in the log 30 in the log 30.
  • the query execution unit 424 determines whether the current Tx state of the generated Tx is a physical commit for each reference record entry in the read set 150 that has been read, and the determination result Does not record a positive reference record entry in the log 30. Thereby, the size of the log 30 can be reduced.
  • the query execution unit 424 calculates the size of the log 30 on the log buffer 114 (S605), and based on the calculated size, the log output destination log file An address for 301 is secured (addition of log file address) (S606).
  • the output destination log file 301 may be the log file 301 assigned to the thread 110 that executes the target Tx. That is, the log file 301 may be assigned to each thread 110.
  • the query execution unit 424 rechecks the current Tx state of the generated Tx by referring to the Tx state information 130 for each reference record entry of the lead set 37 in the log 30 (S607). That is, the Tx state of the generated Tx is checked in S603, but is also checked in S607. This is because there is a possibility that the state of the generated Tx has transitioned to physical commit between S603 and S607. For each generated Tx identified from the lead set 37 of the log 30, the Tx state recorded in the log 30 may be updated to the current Tx state identified in S607. The reference record entry of the generated Tx whose current Tx state is a physical commit may be deleted from the log 30.
  • S608: Yes S609 is performed.
  • S608: No the commit flag 16 may be defeated (the value is set to “0”).
  • the query execution unit 424 After S609 or after S608: No, the query execution unit 424 outputs a log output, specifically, a request to write the log 30 to the log file 301 (S610). At this time, the query execution unit 424 updates the current Tx state of the target Tx (Tx state in the Tx state information 130) to a logical commit.
  • the log management unit 115 may perform I / F control processing (S1000), and output (for example, display) commit completion according to the result.
  • the commit completion output here may be a completion meaning a logical commit, or may be a simple commit completion that does not distinguish between a logical commit and a physical commit.
  • the output destination of the completion of commit may be a client 405 as a query issuer, or a management system (one or more computers) (not shown) that manages the database server 401. Since the commit completion is output before receiving the log output response, the user (for example, the user of the client 405 or the user of the management system (for example, the administrator)) related to the output destination of the commit completion executes speculation. You can feel an improvement in throughput as a result of processing.
  • the query execution unit 424 waits for a log output response (S611).
  • a log output response (log write completion response) is received from the log output destination (for example, the external storage device 402)
  • the query execution unit 424 indicates that the current state of all generated Tx related to the target Tx is a physical commit. If so, the current Tx state of the target Tx is updated to a physical commit (S612).
  • the log management unit 115 can output a commit completion notification to, for example, a query issuer (or management system).
  • the commit completion output performed at S612 is referred to as “physical commit output”.
  • the physical commit output may be omitted when the logical commit output is performed (in other words, when the output control information 26 in the system information 24 indicates that the logical commit output is executed). In other words, the physical commit output is performed at least when the logical commit output is not performed (in other words, when the output control information 26 in the system information 24 indicates that at least the logical commit output is not executed). It's okay.
  • the commit completion notification according to the physical commit output may be a completion notification meaning a physical commit, or may be a simple commit completion notification that does not distinguish between a logical commit and a physical commit. Specifically, for example, when only one of the logical commit output and the physical commit output is performed, the output of the commit completion notification may be the simple commit completion notification.
  • the commit completion notification in the logical commit output may be a commit completion notification that means logical commit
  • the commit completion notification in the physical commit output means physical commit A commit completion notification may be used.
  • FIG. 8 shows an example of the flow of database recovery processing.
  • the database at the latest point is recovered from the backed up database at a certain point in time and the log in which the differences from that point are sequentially recorded.
  • the query execution unit 424 loads the backed up database onto the memory 416 (S801).
  • the log management unit 115 determines whether all logs have been read from the read source log file 301 (S802).
  • the log management unit 115 reads a log that has not been read from the read source log file 301 to, for example, the log buffer 114 (S803), and applies the log to the log. The process is executed (S804).
  • FIG. 9 shows an example of the flow of the log application process (S804 in FIG. 8).
  • the log management unit 115 records the TxID 35 and the Tx state in the read log 30 in the Tx state information 130 (S901).
  • the Tx state recorded in S901 is the Tx state indicated by the commit flag 16 in the read log 30. Specifically, if the commit flag 16 is set (if the value is “1”), the physical commit is recorded as a Tx state, and if the commit flag 16 is collapsed (if the value is “0”). ), A logical commit is recorded as a Tx state.
  • the log management unit 115 determines whether the recorded Tx state (Tx state represented by the commit flag 16 in the read log 30) is a physical commit (S902).
  • the log management unit 115 applies the read log 30 in the database recovery process (S908).
  • S908 for example, database recovery is performed based on the light set 36 in the log 30.
  • the log management unit 115 changes the Tx state of Tx corresponding to the log 30 (Tx state in the Tx state information 130) to physical commit (S909). If all the logs registered in the pending log list have been checked (S910: Yes), the log management unit 115 ends the log application process.
  • the “pending log list” is an entry that includes a log (or a pointer indicating the location of the log and a Tx ID of Tx corresponding to the log) for which the determination of whether or not to apply is pending. ) Is registered information.
  • the pending log list may be information prepared in the database recovery process by the log management unit 115, for example.
  • the log management unit 115 adds the read log 30 to the pending log list (S903).
  • the log management unit 115 specifies the generated Tx (TxID of the generated Tx) from the lead set 37 in the log 30 (S904), and specifies the current Tx state of the specified generated Tx from the Tx state information 130 (S905). ).
  • the log management unit 115 determines whether or not the Tx states of all the generated Tx are physical commits (S906).
  • the log management unit 115 deletes the log 30 from the pending log list (S907), applies the log 30 (S908), and corresponds to the log 30
  • the Tx state of Tx is changed to physical commit (S909). If all the logs registered in the pending log list have been checked (S910: Yes), the log management unit 115 ends the log application process.
  • the processes in and after S904 are performed for the log registered in the pending log list in the log application process prior to the log application process.
  • S910: No This is because, even if the Tx state of the generated Tx is not a physical commit in the past log application process, the Tx state of the generated Tx may transition to the physical commit in the current log application process. Alternatively, entries that are not yet in the Tx state information 130 in the past log application process may exist in the current log application process.
  • the number of times S904 and subsequent steps are performed on logs registered in the pending log list is one time, but may be two or more times.
  • FIG. 10 is a sequence diagram illustrating an example of communication between the client 405 and the DBMS 412.
  • one Tx is taken as an example.
  • the Tx is referred to as “target Tx” in the description of FIGS.
  • the query execution unit 424 in the DBMS 412 receives a request for a select statement after the target Tx begin from the client 405, the Tx state of the generated Tx that generated the referenced record is returned together with the result of the select statement.
  • the value returned here may be a physical commit.
  • the client 405 can know whether or not the Tx state of the generated Tx related to the target Tx is a physical commit.
  • the query execution unit 424 when the query execution unit 424 receives a request for an update statement, it returns a value indicating whether the Tx state of the generated Tx corresponding to the record to be updated is a physical commit, together with the result of the update statement. .
  • a commit completion notification (for example, a logical commit completion notification) return it.
  • the query execution unit 424 receives a check request from the client 405, it receives a response to the log output of the target Tx, and if the Tx states of all the generated Tx related to the target Tx are physical commits, Returns a commit completion notification (eg, physical commit completion notification).
  • a commit completion notification eg, physical commit completion notification
  • the client 405 may perform the I / F control processing. In other words, the client 405 may control whether to output (display) the received commit completion notification. Specifically, for example, if the client 405 determines not to output the received commit completion notification, the client 405 does not output the commit completion notification.
  • the completion notification of the physical commit does not necessarily have to be performed. Specifically, for example, at least when a logical commit completion notification is not sent, a physical commit completion notification may be sent.
  • FIG. 11 is a sequence diagram illustrating another example of communication between the client 405 and the DBMS 412.
  • the query execution unit 424 executes a series of Tx processes from Begin to Commit, and returns a result of the Tx process. At this time, the query execution unit 424 outputs / does not output the logical commit completion notification according to the result of the I / F control process (S1000). The query execution unit 424 controls whether or not to output a physical commit completion notification.
  • FIG. 12 shows an example of the flow of I / F control processing (S1000).
  • the query execution unit 424 determines whether or not the mode control information 28 in the system information 24 indicates that the speculative execution processing mode is on (S1201). When the determination result in S1201 is negative (S1201: No), the completion notification of the logical commit output is not performed.
  • the query execution unit 424 determines whether or not the output control information 26 in the system information 24 represents performing logical commit output (S1202). When the determination result in S1202 is negative (S1202: No), the completion notification of the logical commit output is not performed.
  • the query execution unit 424 notifies the completion of the logical commit output.
  • FIG. 13 shows an example of the setting user interface.
  • the setting user interface 1300 is, for example, a GUI (Graphical User Interface), and is provided by the log management unit 115 to an external system such as the client 405 or a management system.
  • the setting user interface 1300 is used to select a UI (user interface) for selecting whether the speculative execution processing mode is turned on or off, and whether to perform logical commit output (on) or not (off).
  • UI user interface
  • Each UI is a radio button, but is not limited thereto.
  • the designation (speculation execution processing mode on / off and logical commit output on / off) input via the setting user interface 1300 is registered in the system information 24.
  • a system for solving at least one of the following problems is provided.
  • (Problem 1) In an environment where speculative execution processing for starting another Tx based on the result of Tx can be performed without receiving a log output response for Tx commit of the database, throughput improvement by speculative execution processing is improved. At least difficult for the user to recognize. This is because, in the entire Tx processing of the database, the ratio of the time from the log output for Tx commit to the reception of the log output response is not small.
  • (Problem 2) Log inconsistency may occur in speculative execution processing.
  • the log inconsistency may occur in the database recovery process.
  • Issue 1 can be solved as follows, for example. That is, the DBMS 412 outputs a log for committing a database transaction, and outputs commit completion (commit completion as a logical commit output) without receiving a response to the log output. Thereby, the user can feel the throughput improvement by speculative execution processing.
  • the DBMS 412 is output control information that is information indicating whether or not to execute logical commit output, which is to output commit completion before receiving a log output response after log output for commit is performed. 26 is managed. If the output control information 26 indicates that a logical commit output is to be executed, the DBMS 412 outputs the completion of the commit before receiving a log output response made for the commit of the transaction. Thus, depending on the contents of the output control information 26, it is possible to control whether or not to perform logical commit output.
  • the DBMS 412 provides a setting user interface 1300 that accepts an output designation that is a designation of whether or not to perform logical commit output.
  • the DBMS 412 receives an output designation (logical commit output on / off designation) through the setting user interface 1300 and updates the output control information 26 according to the received output designation. In this way, the user can switch on / off of the logical commit output. If the commit output is simply switched on / off, the logical commit output is not necessary, but if the physical commit output is required, the physical commit output is also turned off. For this reason, regarding the on / off switching of the commit output, it is significant that the logical commit output is cut out and the logical commit output can be switched on / off. Note that in addition to turning on / off the logical commit output, a UI for switching on / off the physical commit output may be included in the setting user interface 1300.
  • the DBMS 412 manages mode control information 28 that is information indicating whether or not the speculative execution processing mode is ON. If the mode control information 28 indicates that the speculative execution processing mode is on, the DBMS 412 starts another transaction based on the result of the transaction without receiving a log output response for committing the transaction. It is like that.
  • the DBMS 412 receives a mode designation that is a designation as to whether or not the speculative execution processing mode is on through the setting user interface 1300 (or another user interface), and updates the mode control information 28 according to the received mode designation. Thus, the user can also switch on / off of the speculative execution processing mode.
  • the UI for turning on / off the logical commit output, the UI for turning on / off the speculative execution processing mode, and the UI for turning on / off the physical commit output may be in the same GUI. It may be in the GUI.
  • the DBMS 412 may disable the logical commit output ON (for example, in a disabled state so that it cannot be selected).
  • the DBMS 412 may execute the physical commit output if the output control information 26 indicates that at least the logical commit output is not executed.
  • the DBMS 412 receives a Tx log output completion response, and the log output is only performed in addition to the physical commit which means that the Tx state of all generated Tx related to the Tx is a physical commit.
  • Manages commit status called logical commit, which means status.
  • the DBMS 412 can set a recovery error if there is only one Tx for which physical commit is not established forever (S811: Yes in FIG. 8), and the Tx states of all Tx are physical commits. When it comes to, the database recovery process is completed. As a result, it is possible to avoid application of logs that may have log inconsistencies.
  • the Tx log 30 includes a commit flag 16 that is an example of information indicating whether or not the state of the Tx is a physical commit. Further, the log 30 includes a lead set 37 which is an example of information including information related to Tx reference. The DBMS 412 determines whether each Tx state of the generated transaction is a physical commit based on the read set 37.
  • the lead set 37 includes TxID of each generated Tx.
  • the DBMS 412 determines whether or not the state of each generated Tx is a physical commit by specifying the current Tx state corresponding to the TxID of each generated Tx specified from the lead set 37.
  • the DBMS 412 determines whether or not the current Tx state of each generated Tx specified from the read set 37 included in the output target log 30 is a physical commit when outputting the output target log 30. If the result of the determination is affirmative, the DBMS 412 sets the commit flag 16 included in the output target log 30 and then outputs the log 30.
  • the DBMS 412 does not record the TxID of the generated Tx in the log 30.
  • the DBMS 412 applies the log in the database recovery process if the commit flag 16 included in the log indicates a physical commit for the log read in the database recovery process (an example of an output log).
  • the DBMS 412 determines whether the current state of all generated Tx related to the transaction corresponding to the log is a physical commit. If the determination result of (x2) (x1) is affirmative, the log is applied, and the current Tx state of Tx corresponding to the log is changed to physical commit.
  • the DBMS 412 performs a log application process every time a log is read in the database recovery process. In the log application process, the determination of (x1) for the read log and the determination of (x1) again for the log for which the determination result of (x1) is negative in the past log application process are performed. Is called.
  • a lead set (an example of reference information) may be only a time stamp (hereinafter referred to as TS) instead of each reference record entry, or a list of record IDs that can be referred to at the time of the TS.
  • TS may be a time or a count value. For example, if all Tx states of Tx prior to TS “120” are physical commits, the query execution unit can determine that the Tx state of Tx corresponding to TS “120” may also be physical commits.
  • the query execution unit should have output a log for commit for Tx corresponding to TS “119”, but if the log is not written in the log file, TS “120” It can be determined that the Tx state corresponding to Tx should not be a physical commit (because the Tx state corresponding to TS “119” is not a physical commit). In this way, even if the lead set is TS, it can be determined whether the Tx state of the target Tx can be a physical commit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

In an environment in which, without receiving a log output response for the commitment of a database transaction, it is possible to commence another transaction which is based on the result of the database transaction, the computer system outputs a commitment completion without receiving the log output response if the log output for the commitment of the database transaction has been carried out.

Description

計算機システム及びデータベース管理方法Computer system and database management method

 本発明は、概して、データベース管理に関する。 The present invention generally relates to database management.

 データベースへの変更は、一般に、いわゆる永続化デバイス(典型的には不揮発記憶デバイス)への書込みが完了した場合に、完了する。ところが、ハードディスクドライブに代表されるように、永続化デバイスへの書込みにかかる時間は、メインメモリへの書込みにかかる時間に比べて長い。そのため、先行のトランザクションが更新したレコードを別のトランザクションが参照する場合、その先行のトランザクションのログが出力されてその完了応答を受けるのを待つ必要がある。 Changes to the database are generally completed when writing to a so-called persistence device (typically a non-volatile storage device) is complete. However, as represented by a hard disk drive, the time required for writing to the permanent device is longer than the time required for writing to the main memory. Therefore, when another transaction refers to a record updated by a preceding transaction, it is necessary to wait for a log of the preceding transaction to be output and a completion response received.

 特許文献1には、他のトランザクションとの衝突が起こっていないならば、先行トランザクションのログ出力が開始されると同時に、ログ出力の完了応答を待たずに、先行トランザクションが更新したレコードを別のトランザクションが参照することを可能とする技術(いわゆる投機実行処理の技術)を開示している。 In Patent Document 1, if there is no collision with another transaction, the log output of the preceding transaction is started, and at the same time, the record updated by the preceding transaction is not changed without waiting for the log output completion response. A technique (so-called speculative execution processing technique) that enables a transaction to refer to is disclosed.

特許4295333号Japanese Patent No. 4295333

 昨今、データベースのテーブルやインデックスをメモリ上に配置するインメモリデータベースが普及してきている。一方で、トランザクションのログの出力先デバイスは、一般に、データベースが配置されるメモリよりもI/O(Input/Output)応答性能が低いデバイスである。このため、データベースのトランザクション処理の全体において、トランザクションのコミットのためのログ出力からそのログ出力の応答を受信するまでの時間が占める割合は小さくなく、故に、投機実行処理によるスループット向上を認識しづらい。 In recent years, in-memory databases that place database tables and indexes on memory have become popular. On the other hand, a transaction log output destination device is generally a device having I / O (Input / Output) response performance lower than that of a memory in which a database is arranged. For this reason, in the entire database transaction processing, the ratio of the time from the log output for committing the transaction to the reception of the response of the log output is not small, so it is difficult to recognize the throughput improvement by the speculative execution processing. .

 この種の課題は、インメモリデータベースが採用されているか否かや、ログの出力先デバイスのI/O応答性能に関わらずにあり得る。 This kind of problem can occur regardless of whether or not the in-memory database is adopted and the I / O response performance of the log output destination device.

 データベースのトランザクションのコミットのためのログ出力の応答を受けること無しに、そのトランザクションの結果に基づく別のトランザクションを開始することが行われ得る環境において、計算機システムが、データベースのトランザクションのコミットのためのログ出力が行われた場合、そのログ出力の応答を受けること無しにコミット完了を出力する。この計算機システムは、DBMSを実行するサーバシステム(1以上のサーバ計算機)と、サーバシステムに要求(例えばクエリ)を発行するクライアントシステム(1以上のクライアント計算機)とのうちの少なくとも1つを含む。 In an environment where it may be possible to initiate another transaction based on the outcome of a transaction without receiving a log output response for the commit of the database transaction, the computer system may When log output is performed, commit completion is output without receiving a response to the log output. This computer system includes at least one of a server system (one or more server computers) that executes a DBMS and a client system (one or more client computers) that issues a request (for example, a query) to the server system.

 データベースの投機実行処理によるスループット向上を認識し易い。 It is easy to recognize the throughput improvement due to speculative execution processing of the database.

実施形態に係るシステム全体の構成例を示す。1 shows an example of the configuration of the entire system according to an embodiment. DBMS(データベース管理システム)の構成例と、DBMS、OS(Operating System)、I/Oアダプタ及び外部ストレージ装置間の関係例とを示す。A configuration example of a DBMS (database management system) and a relationship example between the DBMS, an OS (Operating System), an I / O adapter, and an external storage device are shown. Tx(トランザクション)管理部の構成例を示す。The structural example of a Tx (transaction) management part is shown. トログ管理部の構成例を示す。The structural example of a log management part is shown. Tx処理の流れの一例を示す。An example of the flow of Tx processing is shown. ログ出力処理の流れの一例を示す。An example of the flow of log output processing is shown. ログの構成例を示す。An example of log configuration is shown. データベースリカバリ処理の流れの一例を示す。An example of the flow of database recovery processing is shown. ログ適用処理の流れの一例を示す。An example of the flow of log application processing is shown. クライアントとDBMS間の通信の一例を示すシーケンス図である。It is a sequence diagram which shows an example of communication between a client and DBMS. クライアントとDBMS間の通信の別の一例を示すシーケンス図である。It is a sequence diagram which shows another example of communication between a client and DBMS. I/F制御処理の流れの一例を示す。An example of the flow of I / F control processing is shown. 設定ユーザインターフェースの一例を示す。An example of a setting user interface is shown.

 以下、図面を参照しながら、一実施形態を説明する。 Hereinafter, an embodiment will be described with reference to the drawings.

 以下の説明では、データベース管理システム(以下、DBMS)へのクエリの発行元としては、DBMSの内部のコンピュータプログラムであってもよいし、DBMSの外部のコンピュータプログラム(例えば、クライアントシステムで実行されるコンピュータプログラム)であってよい。以下の実施形態では、クエリ発行元は、クライアント計算機である。 In the following description, the issuer of a query to a database management system (hereinafter referred to as DBMS) may be a computer program inside the DBMS or a computer program outside the DBMS (for example, executed by a client system). Computer program). In the following embodiment, the query issuer is a client computer.

 また、以下の説明では、I/O(Input/Output)要求は、ライト要求又はリード要求であり、アクセス要求と呼ばれてもよい。 In the following description, an I / O (Input / Output) request is a write request or a read request, and may be referred to as an access request.

 また、以下の説明では、「bbb部」を主語として説明を行う場合があるが、これら機能部は、プロセッサによって実行されることで定められた処理をメモリ及び通信ポート(ネットワークI/F)を用いながら行うため、プロセッサを主語とした説明としてもよい。プロセッサは、典型的には、マイクロプロセッサ(例えばCPU(Central Processing Unit))を含んでおり、更に、専用ハードウェア(例えばASIC(Application Specific Integrated Circuit)又はFPGA(Field-Programmable GateArray))を含んでもよい。また、これら機能部を主語として開示された処理は、計算機が行う処理としてもよい。また、これら機能部の一部または全ては、専用ハードウェアによって実現されてもよい。また、各種機能部は、プログラム配布サーバや、計算機が読み取り可能な記憶媒体によって各計算機にインストールされてもよい。また,各種機能部及びサーバは1つの計算機にインストールされ実行されても良いし、複数の計算機にインストールされ実行されても良い。プロセッサは、制御部の一例であり、処理の一部または全部を行うハードウェア回路を含んでもよい。プログラムは、プログラムソースから計算機のような装置にインストールされてもよい。プログラムソースは、例えば、プログラム配布サーバまたは計算機が読み取り可能な記憶メディアであってもよい。プログラムソースがプログラム配布サーバの場合、プログラム配布サーバはプロセッサ(例えばCPU)と記憶部を含み、記憶部はさらに配布プログラムと配布対象であるプログラムとを記憶してよい。そして、プログラム配布サーバのプロセッサが配布プログラムを実行することで、プログラム配布サーバのプロセッサは配布対象のプログラムを他の計算機に配布してよい。また、以下の説明において、2以上のプログラムが1つのプログラムとして実現されてもよいし、1つのプログラムが2以上のプログラムとして実現されてもよい。 In the following description, there is a case where “bbb part” is used as the subject, but these function parts perform processing determined by being executed by the processor with a memory and a communication port (network I / F). Since it is performed while being used, the description may be made with the processor as the subject. The processor typically includes a microprocessor (for example, CPU (Central Processing Unit)), and further includes dedicated hardware (for example, ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array)). Good. Further, the processing disclosed with these functional units as the subject may be processing performed by a computer. Further, some or all of these functional units may be realized by dedicated hardware. Various functional units may be installed in each computer by a program distribution server or a computer-readable storage medium. The various functional units and the server may be installed and executed in one computer, or may be installed and executed in a plurality of computers. The processor is an example of a control unit, and may include a hardware circuit that performs part or all of the processing. The program may be installed in a computer-like device from a program source. The program source may be, for example, a storage medium that can be read by a program distribution server or a computer. When the program source is a program distribution server, the program distribution server may include a processor (for example, a CPU) and a storage unit, and the storage unit may further store a distribution program and a program to be distributed. Then, the processor of the program distribution server executes the distribution program, so that the processor of the program distribution server may distribute the distribution target program to other computers. In the following description, two or more programs may be realized as one program, or one program may be realized as two or more programs.

 また、以下の説明において、「スレッド」は、OSスレッドであってもよいし疑似スレッドであってもよい。OSスレッドは、OS(Operating System)によって管理されるスレッド(例えばカーネルとライブラリによって管理されるスレッド)であり、リアルスレッドと言うこともできる。一方、「擬似スレッド」は、DBMSによって管理されるスレッドである。OSスレッドが、DBMSによって疑似的に細分化されることで、複数の疑似スレッドを含むことができる。 In the following description, the “thread” may be an OS thread or a pseudo thread. The OS thread is a thread managed by an OS (Operating System) (for example, a thread managed by a kernel and a library), and can also be called a real thread. On the other hand, the “pseudo thread” is a thread managed by the DBMS. The OS thread can be included in a plurality of pseudo threads by being subdivided in a pseudo manner by the DBMS.

 また、以下の説明において、「記憶部」は、メモリを含んだ1以上の記憶デバイスでよい。例えば、記憶部は、主記憶デバイス(典型的には揮発性のメモリ)及び補助記憶デバイス(典型的には不揮発性の記憶デバイス)のうちの少なくとも主記憶デバイスでよい。 In the following description, the “storage unit” may be one or more storage devices including a memory. For example, the storage unit may be at least a main storage device of a main storage device (typically a volatile memory) and an auxiliary storage device (typically a nonvolatile storage device).

 また、以下の説明において、サーバシステム(例えばデータベースサーバ)が「表示用情報を表示する」ことは、サーバシステムが有する表示デバイスに表示用情報を表示することであってもよいし、外部システム(例えばクライアントシステム)に表示用情報を送信することであってもよい(後者の場合は外部システムによって表示用情報が表示される)。 In the following description, “displaying display information” by a server system (for example, a database server) may be displaying display information on a display device included in the server system, or an external system ( For example, the display information may be transmitted to a client system (in the latter case, the display information is displayed by an external system).

 図1は、実施形態に係るシステム全体の構成例を示す。 FIG. 1 shows a configuration example of the entire system according to the embodiment.

 データベースサーバ401に、外部ストレージ装置402が、例えば通信ネットワーク403を介して接続されている。また、データベースサーバ401に、クライアント計算機(以下、クライアント)405が、例えば通信ネットワーク404を介して接続されている。 An external storage device 402 is connected to the database server 401 via, for example, a communication network 403. A client computer (hereinafter referred to as a client) 405 is connected to the database server 401 via a communication network 404, for example.

 クライアント405は、クライアントシステムの一例である。クライアント405は、データベースサーバ401に要求を出し、その要求の処理結果としての応答をデータベースサーバ401から受信する。要求は、例えば、クエリである。クライアント405は、クエリ発行元の一例である。 The client 405 is an example of a client system. The client 405 issues a request to the database server 401 and receives a response as a processing result of the request from the database server 401. The request is, for example, a query. The client 405 is an example of a query issuer.

 データベースサーバ401は、サーバシステムの一例である。データベースサーバ401は、計算機であって、例えば、パーソナルコンピュータ、ワークステーション又はメインフレームであってよく、もしくは、これらの計算機において仮想化プログラムによって構成された仮想的な計算機であってよい。データベースサーバ401は、I/Oアダプタ409、I/Oアダプタ413、メモリ(典型的にはメインメモリ)416、記憶デバイス415及びそれらに接続されたプロセッサ414を有する。 The database server 401 is an example of a server system. The database server 401 is a computer, and may be, for example, a personal computer, a workstation, or a mainframe, or may be a virtual computer configured by a virtualization program in these computers. The database server 401 includes an I / O adapter 409, an I / O adapter 413, a memory (typically main memory) 416, a storage device 415, and a processor 414 connected thereto.

 プロセッサ414は、例えば、マイクロプロセッサ、又は、マイクロプロセッサと専用ハードウェア回路を含んだモジュールでよい。プロセッサ414は、コンピュータプログラムを実行する。プロセッサ414により実行されるコンピュータプログラムは、例えば、オペレーティングシステム(OS)117及びデータベース管理システム(DBMS)412である。 The processor 414 may be, for example, a microprocessor or a module including a microprocessor and a dedicated hardware circuit. The processor 414 executes a computer program. The computer program executed by the processor 414 is, for example, an operating system (OS) 117 and a database management system (DBMS) 412.

 メモリ416は、例えば、揮発性のDRAM(Dynamic Random Access Memory)等であり、プロセッサ414によって実行されるプログラムと、プログラムが使用するデータを一時的に記憶する。記憶デバイス415は、不揮発性であり、例えば、HDD(Hard Disk Drive)又はSSD(Solid State Drive)である。記憶デバイス415は、プログラム及びプログラムが使用するデータを格納してよい。メモリ416及び記憶デバイス415のうちの少なくともメモリ416が記憶部の一例である。 The memory 416 is, for example, a volatile DRAM (Dynamic Random Access Memory) or the like, and temporarily stores a program executed by the processor 414 and data used by the program. The storage device 415 is non-volatile, and is, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive). The storage device 415 may store a program and data used by the program. At least the memory 416 of the memory 416 and the storage device 415 is an example of a storage unit.

 I/Oアダプタ409は、通信ネットワーク404とデータベースサーバ401を接続する。I/Oアダプタ413は、通信ネットワーク403とデータベースサーバ401を接続する。I/Oアダプタ409及び413の少なくとも1つが、インターフェースデバイスの一例である。 The I / O adapter 409 connects the communication network 404 and the database server 401. The I / O adapter 413 connects the communication network 403 and the database server 401. At least one of the I / O adapters 409 and 413 is an example of an interface device.

 外部ストレージ装置402は、複数の記憶デバイスを含む記憶デバイス群451を有する装置であり、例えば、ディスクアレイ装置であるが、それに代えて、単一の記憶デバイスであってもよい。外部ストレージ装置402は、ログファイル301を記憶する。外部ストレージ装置402は、データベースサーバ401からログのI/O要求を受け付け、当該I/O要求に従いデータ(例えばログ)の読み書きを行い、その結果をデータベースサーバ401に返す。なお、記憶デバイス群451が有する記憶デバイスは、不揮発性の記憶媒体を有するデバイスであって、例えば、HDD又はSSDである。記憶デバイス群451は、RAID(Redundant Array of Independent Disks)グループでよく、所定のRAIDレベルでデータを記憶してもよい。記憶デバイス群451の記憶空間に基づく論理的な記憶デバイス(例えば、論理ユニット、論理ボリューム、ファイルシステムボリューム)が、データベースサーバ401に提供され、当該論理的な記憶デバイス上にログファイル301が格納されてもよい。なお、本実施形態において、ログファイル301は、ログ格納領域の一例である。 The external storage device 402 is a device having a storage device group 451 including a plurality of storage devices, and is, for example, a disk array device, but may instead be a single storage device. The external storage device 402 stores the log file 301. The external storage apparatus 402 receives a log I / O request from the database server 401, reads and writes data (for example, a log) in accordance with the I / O request, and returns the result to the database server 401. Note that the storage device included in the storage device group 451 is a device having a nonvolatile storage medium, and is, for example, an HDD or an SSD. The storage device group 451 may be a RAID (Redundant Array of Independent Disks) group, and may store data at a predetermined RAID level. A logical storage device (for example, logical unit, logical volume, file system volume) based on the storage space of the storage device group 451 is provided to the database server 401, and the log file 301 is stored on the logical storage device. May be. In the present embodiment, the log file 301 is an example of a log storage area.

 外部ストレージ装置402は、記憶デバイス群451に加えて、I/Oアダプタ441及びこれらに接続されたストレージコントローラ442を有する。I/Oアダプタ441は、外部ストレージ装置402を通信ネットワーク403に接続し、これを介して、データベースサーバ401と接続される。通信ネットワーク403を介した通信プロトコルとしては、例えば、ファイバチャネル(FC)、SCSI(Small Computer System Interface)、又は、TCP/IP(Transmission Control Protocol/Internet Protocol)が採用されてよい。例えば、ファイバチャネルもしくはSCSIが採用される場合、I/Oアダプタ441(及び413)は、ホストバスアダプタと呼ばれることがある。ストレージコントローラ442は、例えば、メモリ及びプロセッサを含み、データベースサーバ401からのI/O要求に応じて、ログファイル301を格納した記憶デバイス群451との間でデータの読出し、もしくは、書込みを行う。 The external storage apparatus 402 includes an I / O adapter 441 and a storage controller 442 connected thereto in addition to the storage device group 451. The I / O adapter 441 connects the external storage apparatus 402 to the communication network 403, and is connected to the database server 401 via this. As a communication protocol via the communication network 403, for example, Fiber Channel (FC), SCSI (Small Computer System Interface), or TCP / IP (Transmission Control Protocol / Internet Protocol) may be employed. For example, when Fiber Channel or SCSI is adopted, the I / O adapter 441 (and 413) may be called a host bus adapter. The storage controller 442 includes, for example, a memory and a processor, and reads / writes data from / to the storage device group 451 storing the log file 301 in response to an I / O request from the database server 401.

 図2は、DBMS412の構成例と、DBMS412、OS117、I/Oアダプタ413及び外部ストレージ装置402間の関係例とを示す。 FIG. 2 shows a configuration example of the DBMS 412 and a relationship example between the DBMS 412, the OS 117, the I / O adapter 413, and the external storage device 402.

 DBMS412は、インメモリデータベースである。DBMS412は、データベース(例えばテーブル111及びインデクス112)を、メモリ416上に配置する。更に、DBMS412は、ロック機構116を含んでよい。ロック機構116は、2以上のスレッド110が競合することを避けるためである。ロック機構116は、ロックの取得済か否かを表す情報でよい。例えば、ロック機構116は、ロック取得済なら値「1」でよくロック未取得なら値「0」でよい。 The DBMS 412 is an in-memory database. The DBMS 412 arranges a database (for example, the table 111 and the index 112) on the memory 416. Further, the DBMS 412 may include a lock mechanism 116. This is because the lock mechanism 116 prevents two or more threads 110 from competing. The lock mechanism 116 may be information indicating whether or not the lock has been acquired. For example, the lock mechanism 116 may have a value “1” if the lock has been acquired, and may have a value “0” if the lock has not been acquired.

 DBMS412は、Tx(トランザクション)管理部113とログバッファ114とログ管理部115を有する。Tx管理部113は実行中のTxとその状態(特に後述のコミット状態)を管理する。ログバッファ114は、テーブル111やインデクス112への更新履歴を含んだログを一時格納する。ログ管理部115は、ログファイル301およびログファイルへのログ書き出しを管理する。 The DBMS 412 includes a Tx (transaction) management unit 113, a log buffer 114, and a log management unit 115. The Tx management unit 113 manages Tx being executed and its state (particularly, a commit state described later). The log buffer 114 temporarily stores a log including an update history for the table 111 and the index 112. The log management unit 115 manages the log file 301 and log writing to the log file.

 DBMS412は、システム情報24を有する。システム情報24は、管理情報に含まれる情報の一例である。システム情報24は、出力制御情報26と、モード制御情報28とを含む。出力制御情報26は、コミットのためのログ出力が行われてからそのログ出力の応答を受ける前にコミット完了を出力(例えば表示)することであるロジカルコミット出力を実行するか否かを表す情報である。モード制御情報28は、Txのコミットのためのログ出力の応答を受けること無しにそのTxの結果に基づく別のTxを開始する処理モードである投機実行処理モードがオンか否かを表す情報である。すなわち、DBMS412は、システム情報24中のモード制御情報28に従い、投機実行処理を行うか否かを選択できる。更に、DBMS412は、システム情報24中の出力制御情報26に従い、投機実行処理においてロジカルコミット出力を実行するか否かを選択できる。本実施形態では、Tx毎に、投機実行処理モードにおけるコミット状態として、フィジカルコミットに加えてロジカルコミットという状態が管理される。「フィジカルコミット」は、Txのコミットのためのログ出力の応答を受け、且つ、そのTxに関わる全ての生成TxのTx状態がフィジカルコミットであることを意味する状態である。Txに関わる生成Txとは、Txにより参照されたレコードを生成(更新)したTxである。一方、「ロジカルコミット」は、Txのコミットのためのログ出力が行われてからそのログ出力の応答を受ける前の状態である。 The DBMS 412 has system information 24. The system information 24 is an example of information included in the management information. The system information 24 includes output control information 26 and mode control information 28. The output control information 26 is information indicating whether or not to execute a logical commit output, which is to output (for example, display) a commit completion before a log output response is received after a log output for commit is performed. It is. The mode control information 28 is information indicating whether or not a speculative execution processing mode, which is a processing mode for starting another Tx based on the result of the Tx without receiving a log output response for the commit of Tx, is on. is there. That is, the DBMS 412 can select whether to perform speculative execution processing according to the mode control information 28 in the system information 24. Further, the DBMS 412 can select whether or not to execute the logical commit output in the speculative execution process according to the output control information 26 in the system information 24. In the present embodiment, for each Tx, as a commit state in the speculative execution processing mode, a state of logical commit in addition to physical commit is managed. “Physical commit” is a state that means that a log output response for Tx commit is received and that the Tx states of all generated Tx related to the Tx are physical commits. The generated Tx related to Tx is Tx generated (updated) by the record referenced by Tx. On the other hand, the “logical commit” is a state before the log output response is received after the log output for the Tx commit is performed.

 DBMS412は、クエリ発行元からクエリを受信し、受信したクエリの実行において、1又は複数のTxを実行する。具体的には、DBMS412は、クエリ受付部421、クエリ実行プラン生成部422及びクエリ実行部424を有する。 The DBMS 412 receives a query from the query issuer, and executes one or a plurality of Tx in the execution of the received query. Specifically, the DBMS 412 includes a query reception unit 421, a query execution plan generation unit 422, and a query execution unit 424.

 クエリ受付部421は、クエリ発行元が発行するクエリを受け付ける。クエリは、例えば、構造化問合せ言語(SQL(Structured Query Language))によって記述される。1つのクエリで複数のTxが記述されていてもよいし、複数のクエリで複数のTxが記述されてもよい。 The query receiving unit 421 receives a query issued by a query issuer. The query is described in, for example, a structured query language (SQL (Structured Query) Language). A plurality of Tx may be described in one query, or a plurality of Tx may be described in a plurality of queries.

 クエリ実行プラン生成部422は、クエリ受付部421が受け付けたクエリから、当該クエリを実行するために必要な1以上のデータベースオペレーションを含むクエリ実行プランを生成する。クエリ実行プランは、例えば、1以上のデータベースオペレーションと、データベースオペレーションの実行順序の関係を含む情報であり、クエリ実行プラン情報423として格納される。クエリ実行プランは、データベースオペレーションをノード、データベースオペレーションの実行順序の関係をエッジとする木構造で表されることがある。 The query execution plan generation unit 422 generates a query execution plan including one or more database operations necessary for executing the query from the query received by the query reception unit 421. The query execution plan is, for example, information including a relationship between one or more database operations and the execution order of the database operations, and is stored as query execution plan information 423. A query execution plan may be represented by a tree structure in which a database operation is a node and a relation of execution order of database operations is an edge.

 クエリ実行部424は、クエリ実行プラン生成部422が生成したクエリ実行プランに従って、クエリ受付部421が受け付けたクエリを実行し、その実行結果をクエリ発行元に返す。この際、クエリ実行部424は、データベースオペレーションの実行に必要なデータの読出し要求(参照要求)を発行し、その読出し要求に従いテーブル111から読み出されたデータを使用して、そのデータベースオペレーション(例えば、読み出されたデータ(値)を用いて新たなデータを算出し、読出し元レコードにおけるデータを算出後のデータに更新する書込み要求を発行する)を行う。クエリ実行部424は、データベースオペレーションを、スレッド110を実行することにより行う。なお、DBMS412において、複数のスレッド110が並行して実行される。このため、プロセッサ414は、複数のコアを有する。複数のコアは、1又は複数のCPUに存在する。スレッド110は、タスクと呼ばれてもよい。1つのスレッド110により、1以上のデータベースオペレーションに対応した1つのTxが実行されてよい 。以下、クエリ実行部424がスレッド110を実行することにより行われる処理の主語を、スレッド110、とすることができる。 The query execution unit 424 executes the query received by the query reception unit 421 according to the query execution plan generated by the query execution plan generation unit 422, and returns the execution result to the query issuer. At this time, the query execution unit 424 issues a data read request (reference request) necessary for execution of the database operation, and uses the data read from the table 111 in accordance with the read request to execute the database operation (for example, Then, new data is calculated using the read data (value), and a write request is issued to update the data in the read source record to the calculated data). The query execution unit 424 performs database operation by executing the thread 110. In the DBMS 412, a plurality of threads 110 are executed in parallel. For this reason, the processor 414 has a plurality of cores. A plurality of cores exist in one or a plurality of CPUs. The thread 110 may be called a task. One thread 110 may execute one Tx corresponding to one or more database operations. Hereinafter, the subject of the processing performed by the query execution unit 424 executing the thread 110 may be the thread 110.

 クエリ実行部424(スレッド110)は、Txの実行において、外部ストレージ装置402内のログファイル301にログを書き込むために、外部ストレージ装置402に対するI/O要求をOS117に発行する。OS117は、そのI/O要求を受け付け、外部ストレージ装置402へI/O要求を発行する。 The query execution unit 424 (thread 110) issues an I / O request to the external storage apparatus 402 to the OS 117 in order to write a log to the log file 301 in the external storage apparatus 402 during execution of Tx. The OS 117 accepts the I / O request and issues an I / O request to the external storage apparatus 402.

 I/Oアダプタ413には、複数のI/Oキュー201が用意される。Txの処理において、スレッド110が、ログの書込みのためのI/O要求を発行するが、I/Oキュー201には、そのI/O要求が格納される。具体的には、I/O要求は、OS117によりI/Oキュー201に格納される。 In the I / O adapter 413, a plurality of I / O queues 201 are prepared. In the process of Tx, the thread 110 issues an I / O request for writing a log. The I / O queue 201 stores the I / O request. Specifically, the I / O request is stored in the I / O queue 201 by the OS 117.

 外部ストレージ装置402が、ログファイル301を記憶する。ログファイル301に、I/O要求の書込み対象のログが記録される。なお、外部ストレージ装置402は、ログ出力先デバイスの一例であって、メモリ416よりもI/O応答性能の低い記憶デバイスの一例である。ログファイル301は、外部ストレージ装置402に代えて、メモリ416よりもI/O応答性能の低い別の記憶デバイスに存在してもよい。例えば、ログファイル301も、メモリ416に存在してもよい。 External storage device 402 stores log file 301. In the log file 301, a log to which an I / O request is written is recorded. The external storage apparatus 402 is an example of a log output destination device, and is an example of a storage device having an I / O response performance lower than that of the memory 416. The log file 301 may exist in another storage device having an I / O response performance lower than that of the memory 416 instead of the external storage apparatus 402. For example, the log file 301 may also exist in the memory 416.

 本実施形態では、スレッド110と、I/Oキュー201が、1:1で対応している。つまり、スレッド110毎に、1つのI/Oキュー201が割り当てられている。例えば、スレッド110が、テーブル111のレコードを更新したことを表すログの書込み要求を、ログファイル301に対して発行するようになっている。発行された書込み要求は、OS117に送られる。OS117が、ログファイル301に対する書込み要求を受けて、その書込み要求を、そのスレッド110に対応するI/Oキュー201に格納する。I/Oキュー201に格納された書込み要求は、OS117によりI/Oキュー201から外部ストレージ装置402に送られる。それにより、その書込み要求の書込み対象データであるログが、ログファイル301に書き込まれる。 In this embodiment, the thread 110 and the I / O queue 201 correspond 1: 1. That is, one I / O queue 201 is assigned to each thread 110. For example, the thread 110 issues a log write request indicating that the record of the table 111 has been updated to the log file 301. The issued write request is sent to the OS 117. The OS 117 receives a write request for the log file 301 and stores the write request in the I / O queue 201 corresponding to the thread 110. The write request stored in the I / O queue 201 is sent from the I / O queue 201 to the external storage device 402 by the OS 117. As a result, the log that is the write target data of the write request is written to the log file 301.

 図2に示すDBMS412の構成は一例に過ぎない。例えば、或る構成要素は複数の構成要素に分割されていてもよく、複数の構成要素が1つの構成要素に統合されていてもよい。 The configuration of the DBMS 412 shown in FIG. 2 is merely an example. For example, a certain component may be divided into a plurality of components, and a plurality of components may be integrated into one component.

 図3は、Tx管理部113の構成例を示す。 FIG. 3 shows a configuration example of the Tx management unit 113.

 Tx管理部113は、Tx状態情報130とTx情報140とを有する。 The Tx management unit 113 includes Tx state information 130 and Tx information 140.

 Tx状態情報130は、実行中のTx毎に、Tx状態エントリ131を有する。Tx状態エントリ131は、TxID、Tx状態及びTx情報ポインタといった情報を含む。TxIDは、TxのIDである。Tx状態としては、例えば、ビギン、セレクト、アップデート、インサート、ロジカルコミット、フィジカルコミット及びその他がある。セレクト、アップデート及びインサートは、SQL状態に属する状態の一例である。ロジカルコミット及びフィジカルコミットは、コミット状態に属する状態の一例である。Tx情報ポインタは、Tx情報140へのポインタである。Tx状態エントリ131が示すTx状態が、そのエントリ131に対応したTxの現在の状態である。 The Tx state information 130 includes a Tx state entry 131 for each Tx being executed. The Tx state entry 131 includes information such as TxID, Tx state, and Tx information pointer. TxID is the ID of Tx. Examples of the Tx state include begin, select, update, insert, logical commit, physical commit, and others. Select, update, and insert are examples of states belonging to the SQL state. A logical commit and a physical commit are examples of states belonging to a commit state. The Tx information pointer is a pointer to the Tx information 140. The Tx state indicated by the Tx state entry 131 is the current state of Tx corresponding to the entry 131.

 Tx情報140は、Tx毎に存在する。Tx情報140は、リードセット150とライトセット160を含む。以下、1つのTxを例に取り、Tx情報140の詳細を説明する。なお、そのTxを、図3の説明において「対象Tx」と呼ぶ。 Tx information 140 exists for each Tx. The Tx information 140 includes a read set 150 and a write set 160. The details of the Tx information 140 will be described below by taking one Tx as an example. The Tx is referred to as “target Tx” in the description of FIG.

 リードセット150は、対象Txが参照したレコードに関する情報、別の言い方をすれば、対象Txが参照したレコードを生成したTx(以下、生成Tx)に関する情報を含む。具体的には、リードセット150は、対象Txが参照したレコード毎に、参照レコードエントリ151を有する。参照レコードエントリ151は、レコードID、値及びTxIDといった情報を有する。レコードIDは、対象Txが参照したレコードのIDである。値は、対象Txが参照したレコードにおける各カラム値(カラムにおける値)である。TxIDは、対象Txが参照したレコードを生成した生成TxのIDである。 The lead set 150 includes information related to the record referred to by the target Tx, in other words, information related to Tx (hereinafter, generated Tx) that generated the record referred to by the target Tx. Specifically, the lead set 150 has a reference record entry 151 for each record referenced by the target Tx. The reference record entry 151 includes information such as record ID, value, and TxID. The record ID is the ID of the record referenced by the target Tx. The value is each column value (value in the column) in the record referenced by the target Tx. TxID is the ID of the generated Tx that generated the record referenced by the target Tx.

 ライトセット160は、対象Txが更新したレコードに関する情報を含む。具体的には、ライトセット160は、対象Txが更新したレコード毎に、更新レコードエントリ161を有する。更新レコードエントリ161は、レコードID及び値といった情報を有する。レコードIDは、対象Txが更新(生成)したレコードのIDである。値は、対象Txが更新した値(レコードにおける値)である。 The light set 160 includes information related to the record updated by the target Tx. Specifically, the light set 160 has an update record entry 161 for each record updated by the target Tx. The update record entry 161 has information such as a record ID and a value. The record ID is an ID of a record updated (generated) by the target Tx. The value is a value (value in the record) updated by the target Tx.

 Tx管理の一例は次の通りである。Txのビギンのときに、Tx管理部113が、Tx状態情報130にTx状態エントリ131を追加し、且つ、Tx情報140を追加する。Tx管理部113は、追加されたTx状態エントリ131に、開始されたTxのTxIDと、Tx状態“ビギン”と、追加されたTx情報140へのTx情報ポインタとを登録する。その後、例えば、そのTxにおいてセレクトのとき、Tx管理部113は、セレクトされたレコードの情報として、追加されたTx情報140(Tx情報ポインタに繋がっているTx情報140)内のリードセット150に、セレクトの結果、具体的には、参照されたレコード毎の参照レコードエントリ151を書く。参照レコードエントリ151に登録されるTxID(生成TxのTxID)は、参照されたレコードIDと同じレコードIDを含んだライトセット160に対応するTxのTxIDである。Txが行う処理の結果に応じて、Tx状態(そのTxに対応したエントリ131内のTx状態)が、Tx管理部113により、アップデート、インサート、ロジカルコミット又はフィジカルコミット等に更新される。 An example of Tx management is as follows. At the beginning of Tx, the Tx management unit 113 adds the Tx state entry 131 to the Tx state information 130 and adds the Tx information 140. The Tx management unit 113 registers the Tx ID of the started Tx, the Tx state “begin”, and the Tx information pointer to the added Tx information 140 in the added Tx state entry 131. Thereafter, for example, at the time of selection in the Tx, the Tx management unit 113 stores the information of the selected record in the read set 150 in the added Tx information 140 (Tx information 140 linked to the Tx information pointer). As a result of the selection, specifically, a reference record entry 151 is written for each referenced record. The TxID registered in the reference record entry 151 (TxID of the generated Tx) is the TxID of Tx corresponding to the light set 160 including the same record ID as the referenced record ID. In accordance with the result of processing performed by Tx, the Tx state (Tx state in the entry 131 corresponding to the Tx) is updated by the Tx management unit 113 to update, insert, logical commit, physical commit, or the like.

 図4は、ログ管理部115の構成例を示す。 FIG. 4 shows a configuration example of the log management unit 115.

 ログ管理部115は、ロック機構121と、ログファイルアドレス122とを有する。 The log management unit 115 has a lock mechanism 121 and a log file address 122.

 ロック機構121も、図2に示したロック機構116と同様、ログ管理部115のロックの取得済か否かを表すデータでよい。例えば、ロック機構121は、ロック取得済なら値「1」でよくロック未取得なら値「0」でよい。ログファイルアドレス122の書込み又は読出しのためには、ロック機構121のロックが取得されていなければならない。 The lock mechanism 121 may also be data indicating whether or not the lock of the log management unit 115 has been acquired, like the lock mechanism 116 shown in FIG. For example, the lock mechanism 121 may have a value “1” if the lock has been acquired, and may have a value “0” if the lock has not been acquired. In order to write or read the log file address 122, the lock of the lock mechanism 121 must be acquired.

 ログファイルアドレス122は、ログファイル301におけるログの書込み先アドレスである。ログファイルアドレス122が表すアドレス(値)は、ログファイル301にログを書き出す度に出力するログのサイズ分だけ加算される。 The log file address 122 is a log write destination address in the log file 301. The address (value) represented by the log file address 122 is added by the size of the log to be output each time a log is written to the log file 301.

 図5は、Tx処理の流れの一例を示す。なお、以下の説明では、1つのTxを例に取り説明する。そのTxを、図5~図7の説明において、「対象Tx」と呼ぶ。 FIG. 5 shows an example of the flow of Tx processing. In the following description, one Tx is taken as an example. The Tx is referred to as “target Tx” in the description of FIGS.

 クエリ実行部424が、対象Txが開始されると、対象Txに対応した指示(クエリ中の指示)に基づいて、リードセット150/ライトセット160の生成を行う(S501)。対象Txのビギンの時点では、テーブル111及びインデクス112の変更は行われない。その後、セレクト及びアップデート等が行われることで、テーブル111及びインデクス112のうちの参照又は更新等が行われる。その後、コミットが行われることになる。 When the target Tx is started, the query execution unit 424 generates the read set 150 / write set 160 based on the instruction corresponding to the target Tx (instruction in the query) (S501). At the beginning of the target Tx, the table 111 and the index 112 are not changed. Thereafter, selection, update, and the like are performed, so that reference or update of the table 111 and the index 112 is performed. After that, a commit will be performed.

 クエリ実行部424が、コミット判定を行う(S502)。コミット判定では、例えば、対象Txがリードセット150/ライトセット160に基づいて行うテーブル111及びインデクス112への変更が他のTxとの整合性を保てているかどうかがデータベースのアイソレーションレベルに基づき判定される。 The query execution unit 424 makes a commit determination (S502). In the commit determination, for example, whether the change to the table 111 and the index 112 performed by the target Tx based on the read set 150 / write set 160 is consistent with other Tx is based on the isolation level of the database. Determined.

 コミット判定がNGの場合(S503:No)、クエリ実行部424は、アボート処理を行い(S507)、アボート完了通知を出して(S508)、対象Txを終了する。 If the commit determination is NG (S503: No), the query execution unit 424 performs an abort process (S507), issues an abort completion notification (S508), and ends the target Tx.

 コミット判定がOKの場合(S503:Yes)、クエリ実行部424は、ログ出力処理を実行し(S504)、対象Txを終了する。ログ出力処理において、少なくともフィジカルコミットに従うコミット完了通知が行われる。 If the commit determination is OK (S503: Yes), the query execution unit 424 executes the log output process (S504) and ends the target Tx. In the log output process, a commit completion notification according to at least a physical commit is performed.

 図6は、ログ出力処理(図5のS504)の流れの一例を示す。 FIG. 6 shows an example of the flow of the log output process (S504 in FIG. 5).

 クエリ実行部424が、ログの一時記憶のための領域をログバッファ114から確保する。確保された領域に、ログ、具体的には、ログの構成要素となる情報が書き込まれることになる。図7が、ログの構成例を示す。ログ30は、1つのTxにつき1つ(又は複数)存在する。ログ30は、ログヘッダ31とログ本体32から構成されている。 The query execution unit 424 secures an area for temporary storage of logs from the log buffer 114. A log, specifically, information that is a component of the log is written in the reserved area. FIG. 7 shows a configuration example of the log. There is one (or a plurality) of logs 30 per Tx. The log 30 includes a log header 31 and a log main body 32.

 ログヘッダ31は、ログサイズ33とコミットフラグ34とを含む。ログサイズ33は、ログ30のサイズを表す。コミットフラグ34は、ログ30に対応する対象Txの生成Txの各々の現在(ログ30の生成時)のTx状態がフィジカルコミットか否か、言い換えれば、対象TxのTx状態がフィジカルコミットか否かを表す情報である。コミットフラグ34が、コミット状態情報の一例である。 The log header 31 includes a log size 33 and a commit flag 34. The log size 33 represents the size of the log 30. The commit flag 34 indicates whether the current Tx state (at the time of generation of the log 30) of each generation Tx of the target Tx corresponding to the log 30 is a physical commit, in other words, whether the Tx state of the target Tx is a physical commit. Is information. The commit flag 34 is an example of commit status information.

 ログ本体32は、TxID35と、ライトセット36と、リードセット37とを含む。TxID35は、ログ30に対応する対象TxのTxIDである。ライトセット36は、対象Txに対応したTx情報(以下、対象Tx情報)140内のライトセット160の複製である。リードセット37は、対象Tx情報140内のリードセット150の複製と、参照レコードエントリ毎にTx状態とを含む。参照レコードエントリに関連付けられるTx状態は、そのエントリに対応した生成TxのTx状態である。なお、ログ30には、生成TxのTx状態が記録されないでもよい。 The log main body 32 includes a TxID 35, a write set 36, and a read set 37. TxID 35 is the TxID of the target Tx corresponding to the log 30. The light set 36 is a copy of the light set 160 in the Tx information (hereinafter, target Tx information) 140 corresponding to the target Tx. The lead set 37 includes a copy of the lead set 150 in the target Tx information 140 and a Tx state for each reference record entry. The Tx state associated with the reference record entry is the Tx state of the generated Tx corresponding to the entry. The log 30 may not record the Tx state of the generated Tx.

 さて、図6に示すように、クエリ実行部424が、対象Tx情報140内の全てのリードセット150及びライトセット160を対象Txのログに記録済か否かを判定する(S601)。 Now, as shown in FIG. 6, the query execution unit 424 determines whether all the read sets 150 and write sets 160 in the target Tx information 140 have been recorded in the log of the target Tx (S601).

 S601の判定結果が否定の場合(S601:No)、クエリ実行部424は、対象Tx情報140から未だログ30に記録されていないリードセット150又はライトセット160を対象Tx情報140から読み出す(S602)。クエリ実行部424は、クエリ実行部424は、読み出したリードセット150又はライトセット160をログに記録する(S603)。S602で読み出されたセットがリードセット150の場合、S603では、クエリ実行部424は、ログ30に記録されたリードセット37内の各参照レコードエントリに、その参照レコードエントリに対応した生成Txの現在のTx状態(Tx状態情報130から特定されるTx状態)を関連付ける。関連付けられたTx状態もログ30に記録される。但し、S603では、ログ30には、現在のTx状態がフィジカルコミットである生成Txに対応した参照レコードエントリは、ログ30に記録されない。具体的には、例えば、クエリ実行部424が、読み出されたリードセット150内の各参照レコードエントリについて、生成Txの現在のTx状態がフィジカルコミットであるか否かを判定し、その判定結果が肯定の参照レコードエントリをログ30に記録しない。これにより、ログ30のサイズを削減できる。 When the determination result in S601 is negative (S601: No), the query execution unit 424 reads from the target Tx information 140 the read set 150 or the write set 160 that is not yet recorded in the log 30 from the target Tx information 140 (S602). . The query execution unit 424 records the read set 150 or write set 160 in the log (S603). When the set read in S602 is the lead set 150, in S603, the query execution unit 424 adds to each reference record entry in the lead set 37 recorded in the log 30 the generated Tx corresponding to the reference record entry. The current Tx state (Tx state specified from the Tx state information 130) is associated. The associated Tx state is also recorded in the log 30. However, in S603, the reference record entry corresponding to the generated Tx whose current Tx state is physical commit is not recorded in the log 30 in the log 30. Specifically, for example, the query execution unit 424 determines whether the current Tx state of the generated Tx is a physical commit for each reference record entry in the read set 150 that has been read, and the determination result Does not record a positive reference record entry in the log 30. Thereby, the size of the log 30 can be reduced.

 S601の判定結果が肯定の場合(S601:Yes)、クエリ実行部424は、ログバッファ114上におけるログ30のサイズを計算し(S605)、計算したサイズを基に、そのログの出力先ログファイル301のためのアドレスを確保する(ログファイルアドレスの加算)(S606)。なお、出力先ログファイル301は、対象Txを実行するスレッド110に割り当てられたログファイル301でよい。すなわち、各スレッド110にログファイル301が割り当てられていてよい。 If the determination result in S601 is affirmative (S601: Yes), the query execution unit 424 calculates the size of the log 30 on the log buffer 114 (S605), and based on the calculated size, the log output destination log file An address for 301 is secured (addition of log file address) (S606). The output destination log file 301 may be the log file 301 assigned to the thread 110 that executes the target Tx. That is, the log file 301 may be assigned to each thread 110.

 更に、クエリ実行部424は、ログ30内のリードセット37の各参照レコードエントリについて、生成Txの現在のTx状態を、Tx状態情報130を参照することにより再チェックする(S607)。すなわち、生成TxのTx状態は、S603でチェックされたが、S607でもチェックされる。なぜなら、S603からS607の間に、生成Txの状態がフィジカルコミットに遷移している可能性があるからである。ログ30のリードセット37から特定される各生成Txについて、ログ30に記録されているTx状態が、S607で特定された現在のTx状態に更新されてもよい。現在のTx状態がフィジカルコミットである生成Txの参照レコードエントリは、ログ30から削除されてもよい。 Further, the query execution unit 424 rechecks the current Tx state of the generated Tx by referring to the Tx state information 130 for each reference record entry of the lead set 37 in the log 30 (S607). That is, the Tx state of the generated Tx is checked in S603, but is also checked in S607. This is because there is a possibility that the state of the generated Tx has transitioned to physical commit between S603 and S607. For each generated Tx identified from the lead set 37 of the log 30, the Tx state recorded in the log 30 may be updated to the current Tx state identified in S607. The reference record entry of the generated Tx whose current Tx state is a physical commit may be deleted from the log 30.

 クエリ実行部424は、対象Txのログ30内のリードセット37から特定される全ての生成Txの現在のTx状態がフィジカルコミットか否かを判定する(S608)。S608の判定結果が肯定の場合(S608:Yes)、クエリ実行部424は、対象Txのログ30内のコミットフラグ16を立てる(S609)。S608の判定結果が否定の場合(S608:No)、S609がスキップされる。これは、コミットフラグ16の初期値が、少なくとも1つの生成TxのTx状態がコミットフラグでないことを意味する(例えばフラグ16の値=「0」)。コミットフラグ16の初期値が、全ての生成TxのTx状態がフィジカルコミットであることを意味していれば(例えばフラグ16の値=「1」)、S608:YesでS609が行われることに代えて、S608:Noのときにコミットフラグ16を倒す(値を「0」にする)ことが行われてよい。 The query execution unit 424 determines whether or not the current Tx state of all the generated Tx specified from the read set 37 in the log 30 of the target Tx is a physical commit (S608). If the determination result in S608 is affirmative (S608: Yes), the query execution unit 424 sets the commit flag 16 in the log 30 of the target Tx (S609). If the determination result in S608 is negative (S608: No), S609 is skipped. This means that the initial value of the commit flag 16 is that the Tx state of at least one generated Tx is not a commit flag (for example, the value of the flag 16 = “0”). If the initial value of the commit flag 16 means that the Tx states of all the generated Txs are physical commits (for example, the value of the flag 16 = “1”), S608: Yes, S609 is performed. Then, when S608: No, the commit flag 16 may be defeated (the value is set to “0”).

 S609の後、又は、S608:Noの後、クエリ実行部424は、ログ出力、具体的には、ログ30のログファイル301への書込み要求を出力する(S610)。このとき、クエリ実行部424は、対象Txの現在のTx状態(Tx状態情報130におけるTx状態)を、ロジカルコミットに更新する。ログ管理部115が、I/F制御処理(S1000)を行い、その結果に応じて、コミット完了を出力(例えば表示)してよい。ここで出力されるコミット完了は、ロジカルコミットを意味する完了であってもよいし、ロジカルコミットとフィジカルコミットのどちらであるかを区別しない単純なコミット完了であってもよい。コミット完了の出力先は、クエリ発行元としてのクライアント405であってもよいし、データベースサーバ401を管理する図示しない管理システム(1以上の計算機)であってもよい。ログ出力の応答を受ける前にコミット完了が出力されることになるので、コミット完了の出力先に関わるユーザ(例えばクライアント405のユーザ、又は、管理システムのユーザ(例えば管理者))は、投機実行処理の結果としてのスループット向上を感じることができる。 After S609 or after S608: No, the query execution unit 424 outputs a log output, specifically, a request to write the log 30 to the log file 301 (S610). At this time, the query execution unit 424 updates the current Tx state of the target Tx (Tx state in the Tx state information 130) to a logical commit. The log management unit 115 may perform I / F control processing (S1000), and output (for example, display) commit completion according to the result. The commit completion output here may be a completion meaning a logical commit, or may be a simple commit completion that does not distinguish between a logical commit and a physical commit. The output destination of the completion of commit may be a client 405 as a query issuer, or a management system (one or more computers) (not shown) that manages the database server 401. Since the commit completion is output before receiving the log output response, the user (for example, the user of the client 405 or the user of the management system (for example, the administrator)) related to the output destination of the commit completion executes speculation. You can feel an improvement in throughput as a result of processing.

 S610の後、クエリ実行部424は、ログ出力の応答を待つ(S611)。ログ出力の応答(ログ書込みの完了の応答)をログ出力先(例えば外部ストレージ装置402)から受信した場合、クエリ実行部424は、対象Txに関わる全ての生成Txの現在の状態がフィジカルコミットになっていれば、対象Txの現在のTx状態を、フィジカルコミットに更新する(S612)。対象TxのTx状態がフィジカルコミットになった場合、ログ管理部115が、コミット完了通知を、例えばクエリ発行元(又は管理システム)に出力することができる。S612を契機に行われるコミット完了出力を、便宜上、「フィジカルコミット出力」と言う。フィジカルコミット出力は、ロジカルコミット出力が行われている場合(言い換えれば、システム情報24内の出力制御情報26が、ロジカルコミット出力を実行することを表している場合)、省略されてもよい。言い換えれば、フィジカルコミット出力は、少なくともロジカルコミット出力が行われていない場合(言い換えれば、システム情報24内の出力制御情報26が、少なくともロジカルコミット出力を実行しないことを表している場合)、行われてよい。フィジカルコミット出力に従うコミット完了通知は、フィジカルコミットを意味する完了通知であってもよいし、ロジカルコミットとフィジカルコミットのどちらであるかを区別しない単純なコミット完了通知であってもよい。具体的には、例えば、ロジカルコミット出力とフィジカルコミット出力の一方だけが行われる場合、出力されるコミット完了通知は、上記単純なコミット完了通知であってよい。ロジカルコミット出力とフィジカルコミット出力の両方が行われる場合、ロジカルコミット出力でのコミット完了通知は、ロジカルコミットを意味するコミット完了通知でよく、フィジカルコミット出力でのコミット完了通知は、フィジカルコミットを意味するコミット完了通知でよい。 After S610, the query execution unit 424 waits for a log output response (S611). When a log output response (log write completion response) is received from the log output destination (for example, the external storage device 402), the query execution unit 424 indicates that the current state of all generated Tx related to the target Tx is a physical commit. If so, the current Tx state of the target Tx is updated to a physical commit (S612). When the Tx state of the target Tx is a physical commit, the log management unit 115 can output a commit completion notification to, for example, a query issuer (or management system). For the sake of convenience, the commit completion output performed at S612 is referred to as “physical commit output”. The physical commit output may be omitted when the logical commit output is performed (in other words, when the output control information 26 in the system information 24 indicates that the logical commit output is executed). In other words, the physical commit output is performed at least when the logical commit output is not performed (in other words, when the output control information 26 in the system information 24 indicates that at least the logical commit output is not executed). It's okay. The commit completion notification according to the physical commit output may be a completion notification meaning a physical commit, or may be a simple commit completion notification that does not distinguish between a logical commit and a physical commit. Specifically, for example, when only one of the logical commit output and the physical commit output is performed, the output of the commit completion notification may be the simple commit completion notification. When both logical commit output and physical commit output are performed, the commit completion notification in the logical commit output may be a commit completion notification that means logical commit, and the commit completion notification in the physical commit output means physical commit A commit completion notification may be used.

 図8は、データベースリカバリ処理の流れの一例を示す。 FIG. 8 shows an example of the flow of database recovery processing.

 データベースリカバリ処理では、バックアップされた或る時点のデータベースと、その時点からの差分を逐次的に記録したログとから、最新時点のデータベースがリカバリされる。 In the database recovery process, the database at the latest point is recovered from the backed up database at a certain point in time and the log in which the differences from that point are sequentially recorded.

 クエリ実行部424が、バックアップされたデータベースをメモリ416上にロードする(S801)。 The query execution unit 424 loads the backed up database onto the memory 416 (S801).

 次に、ログ管理部115が、読出し元ログファイル301から全てのログが読み出されたか否かを判定する(S802)。 Next, the log management unit 115 determines whether all logs have been read from the read source log file 301 (S802).

 S802の判定結果が否定の場合(S802:No)、ログ管理部115は、未だ読み出されていないログを、読出し元ログファイル301から例えばログバッファ114に読み出し(S803)、そのログについてログ適用処理を実行する(S804)。 If the determination result in S802 is negative (S802: No), the log management unit 115 reads a log that has not been read from the read source log file 301 to, for example, the log buffer 114 (S803), and applies the log to the log. The process is executed (S804).

 S802の判定結果が肯定の場合(S802:Yes)、データベースリカバリ処理が終了する。但し、保留ログ一覧にログ30が登録されている場合(S811:Yes)、ログ管理部115は、その保留ログ一覧を破棄する(S812)。S812では、リカバリエラーが出力されてもよい。全てのログが適用されたわけではないからである。保留ログ一覧については後述する。 If the determination result in S802 is affirmative (S802: Yes), the database recovery process ends. However, when the log 30 is registered in the pending log list (S811: Yes), the log management unit 115 discards the pending log list (S812). In S812, a recovery error may be output. This is because not all logs have been applied. The pending log list will be described later.

 図9は、ログ適用処理(図8のS804)の流れの一例を示す。 FIG. 9 shows an example of the flow of the log application process (S804 in FIG. 8).

 ログ管理部115は、読み出されたログ30内のTxID35とTx状態とを、Tx状態情報130に記録する(S901)。S901で記録されるTx状態は、読み出されたログ30内のコミットフラグ16が表すTx状態である。具体的には、コミットフラグ16が立っていれば(値が「1」であれば)、フィジカルコミットがTx状態として記録され、コミットフラグ16が倒れていれば(値が「0」であれば)、ロジカルコミットがTx状態として記録される。 The log management unit 115 records the TxID 35 and the Tx state in the read log 30 in the Tx state information 130 (S901). The Tx state recorded in S901 is the Tx state indicated by the commit flag 16 in the read log 30. Specifically, if the commit flag 16 is set (if the value is “1”), the physical commit is recorded as a Tx state, and if the commit flag 16 is collapsed (if the value is “0”). ), A logical commit is recorded as a Tx state.

 ログ管理部115は、記録されたTx状態(読み出されたログ30内のコミットフラグ16が表すTx状態)がフィジカルコミットか否かを判定する(S902)。 The log management unit 115 determines whether the recorded Tx state (Tx state represented by the commit flag 16 in the read log 30) is a physical commit (S902).

 S902の判定結果が肯定の場合(S902:Yes)、ログ管理部115は、読み出されたログ30をデータベースリカバリ処理において適用する(S908)。S908では、例えば、ログ30内のライトセット36に基づきデータベースリカバリが行われる。ログ管理部115は、そのログ30に対応したTxのTx状態(Tx状態情報130におけるTx状態)を、フィジカルコミットに変更する(S909)。ログ管理部115は、保留ログ一覧に登録されている全てのログについてチェック済であれば(S910:Yes)、ログ適用処理を終了する。なお、「保留ログ一覧」とは、適用対象とするか否かの決定が保留とされているログ(或いは、ログの場所を示すポインタと、そのログに対応するTxのTxIDとを含んだエントリ)が登録される情報である。保留ログ一覧は、例えばログ管理部115によりデータベースリカバリ処理において用意された情報でよい。 When the determination result in S902 is positive (S902: Yes), the log management unit 115 applies the read log 30 in the database recovery process (S908). In S908, for example, database recovery is performed based on the light set 36 in the log 30. The log management unit 115 changes the Tx state of Tx corresponding to the log 30 (Tx state in the Tx state information 130) to physical commit (S909). If all the logs registered in the pending log list have been checked (S910: Yes), the log management unit 115 ends the log application process. The “pending log list” is an entry that includes a log (or a pointer indicating the location of the log and a Tx ID of Tx corresponding to the log) for which the determination of whether or not to apply is pending. ) Is registered information. The pending log list may be information prepared in the database recovery process by the log management unit 115, for example.

 S902の判定結果が肯定の場合(S902:Yes)、ログ管理部115は、読み出されたログ30を保留ログ一覧に追加する(S903)。ログ管理部115は、そのログ30内のリードセット37から生成Tx(生成TxのTxID)を特定し(S904)、特定された生成Txの現在のTx状態をTx状態情報130から特定する(S905)。ログ管理部115は、全ての生成TxのTx状態がフィジカルコミットか否かを判定する(S906)。 If the determination result in S902 is affirmative (S902: Yes), the log management unit 115 adds the read log 30 to the pending log list (S903). The log management unit 115 specifies the generated Tx (TxID of the generated Tx) from the lead set 37 in the log 30 (S904), and specifies the current Tx state of the specified generated Tx from the Tx state information 130 (S905). ). The log management unit 115 determines whether or not the Tx states of all the generated Tx are physical commits (S906).

 S906の判定結果が肯定の場合(S906:Yes)、ログ管理部115は、そのログ30を保留ログ一覧から削除し(S907)、そのログ30を適用し(S908)、そのログ30に対応したTxのTx状態を、フィジカルコミットに変更する(S909)。ログ管理部115は、保留ログ一覧に登録されている全てのログについてチェック済であれば(S910:Yes)、ログ適用処理を終了する。 If the determination result in S906 is affirmative (S906: Yes), the log management unit 115 deletes the log 30 from the pending log list (S907), applies the log 30 (S908), and corresponds to the log 30 The Tx state of Tx is changed to physical commit (S909). If all the logs registered in the pending log list have been checked (S910: Yes), the log management unit 115 ends the log application process.

 ログ適用処理では、そのログ適用処理において保留ログ一覧に登録されたログに加えて、そのログ適用処理より前のログ適用処理において保留ログ一覧に登録されたログについても、S904以降の処理が行われる(S910:No)。なぜなら、過去のログ適用処理においては生成TxのTx状態がフィジカルコミットではなくても、今回のログ適用処理においては生成TxのTx状態がフィジカルコミットに遷移している可能性があるからである。或いは、過去のログ適用処理において未だTx状態情報130に無いエントリが、今回のログ適用処理においては存在する可能性があるからである。1つのログ適用処理において、保留ログ一覧に登録されているログについてS904以降が行われる回数は、1回であるが、2回以上であってもよい。 In the log application process, in addition to the log registered in the pending log list in the log application process, the processes in and after S904 are performed for the log registered in the pending log list in the log application process prior to the log application process. (S910: No). This is because, even if the Tx state of the generated Tx is not a physical commit in the past log application process, the Tx state of the generated Tx may transition to the physical commit in the current log application process. Alternatively, entries that are not yet in the Tx state information 130 in the past log application process may exist in the current log application process. In one log application process, the number of times S904 and subsequent steps are performed on logs registered in the pending log list is one time, but may be two or more times.

 図10は、クライアント405とDBMS412間の通信の一例を示すシーケンス図である。以下、1つのTxを例に取る。そのTxを、図10~図12の説明において、「対象Tx」と呼ぶ。 FIG. 10 is a sequence diagram illustrating an example of communication between the client 405 and the DBMS 412. Hereinafter, one Tx is taken as an example. The Tx is referred to as “target Tx” in the description of FIGS.

 例えば、DBMS412内のクエリ実行部424が、対象Txのbeginの後にselect文の要求をクライアント405から受けた場合、select文の結果と共に、参照されたレコードを生成した生成TxのTx状態を返す。ここで返される値は、フィジカルコミットか否かでよい。これにより、クライアント405が、対象Txに関わる生成TxのTx状態がフィジカルコミットであるか否かを知ることができる。 For example, when the query execution unit 424 in the DBMS 412 receives a request for a select statement after the target Tx begin from the client 405, the Tx state of the generated Tx that generated the referenced record is returned together with the result of the select statement. The value returned here may be a physical commit. Thereby, the client 405 can know whether or not the Tx state of the generated Tx related to the target Tx is a physical commit.

 同様にして、クエリ実行部424が、update文の要求を受けた場合、update対象のレコードに対応した生成TxのTx状態がフィジカルコミットか否かを示す値を、update文の結果と合わせて返す。 Similarly, when the query execution unit 424 receives a request for an update statement, it returns a value indicating whether the Tx state of the generated Tx corresponding to the record to be updated is a physical commit, together with the result of the update statement. .

 クエリ実行部424が、commit要求をクライアント405から受け、ログ出力を行った場合、I/F制御処理(S1000)の結果がコミット完了出力であれば、コミット完了通知(例えばロジカルコミットの完了通知)を返す。 When the query execution unit 424 receives a commit request from the client 405 and outputs a log, if the result of the I / F control process (S1000) is a commit completion output, a commit completion notification (for example, a logical commit completion notification) return it.

 その後、クエリ実行部424が、check要求をクライアント405から受けた場合、対象Txのログ出力に対する応答を受けており、且つ、対象Txに関わる全ての生成TxのTx状態がフィジカルコミットであれば、コミット完了通知(例えばフィジカルコミットの完了通知)を返す。 After that, when the query execution unit 424 receives a check request from the client 405, it receives a response to the log output of the target Tx, and if the Tx states of all the generated Tx related to the target Tx are physical commits, Returns a commit completion notification (eg, physical commit completion notification).

 なお、I/F制御処理は、クライアント405が行ってもよい。すなわち、クライアント405が、受信したコミット完了通知を出力(表示)するか否かを制御してもよい。具体的には、例えば、クライアント405は、受信したコミット完了通知を出力しないと決めたらなら、そのコミット完了通知を出力しない。 Note that the client 405 may perform the I / F control processing. In other words, the client 405 may control whether to output (display) the received commit completion notification. Specifically, for example, if the client 405 determines not to output the received commit completion notification, the client 405 does not output the commit completion notification.

 また、上述したように、フィジカルコミットの完了通知は必ずしもされないでもよい。具体的には、例えば、少なくともロジカルコミットの完了通知がされなかった場合に、フィジカルコミットの完了通知がされてもよい。 Also, as described above, the completion notification of the physical commit does not necessarily have to be performed. Specifically, for example, at least when a logical commit completion notification is not sent, a physical commit completion notification may be sent.

 図11は、クライアント405とDBMS412間の通信の別の一例を示すシーケンス図である。 FIG. 11 is a sequence diagram illustrating another example of communication between the client 405 and the DBMS 412.

 図11によれば、クエリ実行部424は、Tx要求を受信した場合、Begin~Commitまでの一連のTx処理を実行し、そのTx処理の結果を返す。その際、クエリ実行部424は、I/F制御処理(S1000)の結果に従い、ロジカルコミットの完了通知を出力する/出力しない。また、クエリ実行部424は、フィジカルコミットの完了通知を出力する/出力しないを制御する。 According to FIG. 11, when the query execution unit 424 receives a Tx request, the query execution unit 424 executes a series of Tx processes from Begin to Commit, and returns a result of the Tx process. At this time, the query execution unit 424 outputs / does not output the logical commit completion notification according to the result of the I / F control process (S1000). The query execution unit 424 controls whether or not to output a physical commit completion notification.

 図12は、I/F制御処理(S1000)の流れの一例を示す。 FIG. 12 shows an example of the flow of I / F control processing (S1000).

 クエリ実行部424は、システム情報24内のモード制御情報28が、投機実行処理モードのオンを表しているか否かを判定する(S1201)。S1201の判定結果が否定の場合(S1201:No)、ロジカルコミット出力の完了通知は行われない。 The query execution unit 424 determines whether or not the mode control information 28 in the system information 24 indicates that the speculative execution processing mode is on (S1201). When the determination result in S1201 is negative (S1201: No), the completion notification of the logical commit output is not performed.

 S1201の判定結果が肯定の場合(S1201:Yes)、クエリ実行部424は、システム情報24内の出力制御情報26が、ロジカルコミット出力を行うことを表しているか否かを判定する(S1202)。S1202の判定結果が否定の場合(S1202:No)、ロジカルコミット出力の完了通知は行われない。 If the determination result in S1201 is affirmative (S1201: Yes), the query execution unit 424 determines whether or not the output control information 26 in the system information 24 represents performing logical commit output (S1202). When the determination result in S1202 is negative (S1202: No), the completion notification of the logical commit output is not performed.

 S1202の判定結果が肯定の場合(S1202:Yes)、クエリ実行部424は、ロジカルコミット出力の完了通知を行う。 If the determination result in S1202 is affirmative (S1202: Yes), the query execution unit 424 notifies the completion of the logical commit output.

 図13は、設定ユーザインターフェースの一例を示す。 FIG. 13 shows an example of the setting user interface.

 設定ユーザインターフェース1300は、例えばGUI(Graphical User Interface)であり、ログ管理部115によりクライアント405又は管理システム等の外部システムに提供される。設定ユーザインターフェース1300は、投機実行処理モードをオンとするかオフとするかを選択するためのUI(ユーザインターフェース)と、ロジカルコミット出力を行う(オン)か否か(オフ)を選択するためのUIとを含む。いずれのUIも、ラジオボタンであるが、それに限らない。設定ユーザインターフェース1300を介して入力された指定(投機実行処理モードのオン/オフ、及び、ロジカルコミット出力のオン/オフ)が、システム情報24に登録される。 The setting user interface 1300 is, for example, a GUI (Graphical User Interface), and is provided by the log management unit 115 to an external system such as the client 405 or a management system. The setting user interface 1300 is used to select a UI (user interface) for selecting whether the speculative execution processing mode is turned on or off, and whether to perform logical commit output (on) or not (off). UI. Each UI is a radio button, but is not limited thereto. The designation (speculation execution processing mode on / off and logical commit output on / off) input via the setting user interface 1300 is registered in the system information 24.

 以下、実施形態を総括する。なお、総括の説明において、適宜、実施形態の変形例等の新たな記載を追加することができる。 Hereinafter, the embodiments will be summarized. Note that in the general description, new descriptions such as modifications of the embodiment can be added as appropriate.

 以下の課題のうちの少なくとも1つを解決するシステムが提供される。
(課題1)データベースのTxのコミットのためのログ出力の応答を受けること無しにそのTxの結果に基づく別のTxを開始する投機実行処理が行われ得る環境では、投機実行処理によるスループット向上を少なくともユーザが認識しづらい。データベースのTx処理の全体において、Txのコミットのためのログ出力からそのログ出力の応答を受信するまでの時間が占める割合は小さくないからである。
(課題2)投機実行処理では、ログ不整合が起こり得る。例えば、Tx1がレコードAをレコードBに更新したという第1ログが出力されたものの第1ログの書込みが完了していないにも関わらず、Tx2がレコードBをレコードCに更新したという第2ログの書込みが先に完了してしまい、第1ログが書き込まれる前に障害が生じた場合、データベースリカバリ処理においてログ不整合が起こり得る。
A system for solving at least one of the following problems is provided.
(Problem 1) In an environment where speculative execution processing for starting another Tx based on the result of Tx can be performed without receiving a log output response for Tx commit of the database, throughput improvement by speculative execution processing is improved. At least difficult for the user to recognize. This is because, in the entire Tx processing of the database, the ratio of the time from the log output for Tx commit to the reception of the log output response is not small.
(Problem 2) Log inconsistency may occur in speculative execution processing. For example, although the first log that Tx1 updated record A to record B was output, the second log that Tx2 updated record B to record C even though the writing of the first log was not completed If a failure occurs before the first log is written, the log inconsistency may occur in the database recovery process.

 課題1は、例えば次の通り解決可能である。すなわち、DBMS412が、データベースのトランザクションのコミットのためにログを出力し、そのログ出力の応答を受けること無しにコミット完了(ロジカルコミット出力としてのコミット完了)を出力する。これにより、投機実行処理によるスループット向上をユーザが感じることができる。 Issue 1 can be solved as follows, for example. That is, the DBMS 412 outputs a log for committing a database transaction, and outputs commit completion (commit completion as a logical commit output) without receiving a response to the log output. Thereby, the user can feel the throughput improvement by speculative execution processing.

 なお、DBMS412は、コミットのためのログ出力が行われてからそのログ出力の応答を受ける前にコミット完了を出力することであるロジカルコミット出力を実行するか否かを表す情報である出力制御情報26を管理する。DBMS412は、ロジカルコミット出力を実行することを出力制御情報26が表していれば、トランザクションのコミットのために行ったログ出力の応答を受ける前にそのコミットの完了を出力する。このように、出力制御情報26の内容次第で、ロジカルコミット出力を行うか否かの制御が可能である。 Note that the DBMS 412 is output control information that is information indicating whether or not to execute logical commit output, which is to output commit completion before receiving a log output response after log output for commit is performed. 26 is managed. If the output control information 26 indicates that a logical commit output is to be executed, the DBMS 412 outputs the completion of the commit before receiving a log output response made for the commit of the transaction. Thus, depending on the contents of the output control information 26, it is possible to control whether or not to perform logical commit output.

 また、DBMS412は、ロジカルコミット出力を行うか否かの指定である出力指定を受け付ける設定ユーザインターフェース1300を提供する。DBMS412は、設定ユーザインターフェース1300を通じて出力指定(ロジカルコミット出力のオン/オフの指定)を受け、受けた出力指定に従い出力制御情報26を更新する。このように、ユーザが、ロジカルコミット出力のオン/オフを切り替えることができる。単にコミット出力のオン/オフを切り替えるとなると、ロジカルコミット出力が不要であるがフィジカルコミット出力が必要とされる場合、フィジカルコミット出力もオフとされてしまうことになる。このため、コミット出力のオン/オフの切替えに関して、ロジカルコミット出力が切り出され、そのロジカルコミット出力についてオン/オフの切替えが可能であることの意義は大きい。なお、ロジカルコミット出力のオン/オフに加えて、フィジカルコミット出力のオン/オフの切替えのUIが設定ユーザインターフェース1300に含まれてもよい。 Also, the DBMS 412 provides a setting user interface 1300 that accepts an output designation that is a designation of whether or not to perform logical commit output. The DBMS 412 receives an output designation (logical commit output on / off designation) through the setting user interface 1300 and updates the output control information 26 according to the received output designation. In this way, the user can switch on / off of the logical commit output. If the commit output is simply switched on / off, the logical commit output is not necessary, but if the physical commit output is required, the physical commit output is also turned off. For this reason, regarding the on / off switching of the commit output, it is significant that the logical commit output is cut out and the logical commit output can be switched on / off. Note that in addition to turning on / off the logical commit output, a UI for switching on / off the physical commit output may be included in the setting user interface 1300.

 また、DBMS412は、投機実行処理モードがオンか否かを表す情報であるモード制御情報28を管理する。DBMS412は、投機実行処理モードがオンであることをモード制御情報28が表している場合、トランザクションのコミットのためのログ出力の応答を受けること無しにそのトランザクションの結果に基づく別のトランザクションを開始するようになっている。DBMS412は、投機実行処理モードがオンか否かの指定であるモード指定を、設定ユーザインターフェース1300(又は別のユーザインターフェース)を通じて受け、受けたモード指定に従いモード制御情報28を更新する。このように、投機実行処理モードのオン/オフもユーザは切り替えることができる。ロジカルコミット出力のオン/オフのためのUIと、投機実行処理モードのオン/オフのためのUIと、フィジカルコミット出力のオン/オフのためのUIが、同一のGUIにあってもよいし異なるGUIにあってもよい。また、投機実行処理モードについてオンが選択されている場合、DBMS412は、ロジカルコミット出力のオンを無効(例えば、選択できないようディスエーブルの状態)としてよい。 Also, the DBMS 412 manages mode control information 28 that is information indicating whether or not the speculative execution processing mode is ON. If the mode control information 28 indicates that the speculative execution processing mode is on, the DBMS 412 starts another transaction based on the result of the transaction without receiving a log output response for committing the transaction. It is like that. The DBMS 412 receives a mode designation that is a designation as to whether or not the speculative execution processing mode is on through the setting user interface 1300 (or another user interface), and updates the mode control information 28 according to the received mode designation. Thus, the user can also switch on / off of the speculative execution processing mode. The UI for turning on / off the logical commit output, the UI for turning on / off the speculative execution processing mode, and the UI for turning on / off the physical commit output may be in the same GUI. It may be in the GUI. In addition, when ON is selected for the speculative execution processing mode, the DBMS 412 may disable the logical commit output ON (for example, in a disabled state so that it cannot be selected).

 また、DBMS412は、出力制御情報26が、少なくとも、ロジカルコミット出力を実行しないことを表していれば、フィジカルコミット出力を実行してよい。 Further, the DBMS 412 may execute the physical commit output if the output control information 26 indicates that at least the logical commit output is not executed.

 課題2は、例えば次の通り解決可能である。すなわち、DBMS412が、Txのログ出力の完了応答を受信し且つそのTxに関わる全ての生成TxのTx状態がフィジカルコミットであることを意味するフィジカルコミットの他に、ログ出力が行われただけの状態を意味するロジカルコミットというコミット状態を管理する。データベースリカバリ処理では、DBMS412は、いつまでもフィジカルコミットが成立しないTxが1つでもでれば(図8のS811:Yesとなれば)リカバリエラーとすることができ、全てのTxのTx状態がフィジカルコミットになったら、データベースリカバリ処理を完了する。これにより、ログ不整合のあり得るログの適用を回避できる。 Problem 2 can be solved as follows, for example. That is, the DBMS 412 receives a Tx log output completion response, and the log output is only performed in addition to the physical commit which means that the Tx state of all generated Tx related to the Tx is a physical commit. Manages commit status called logical commit, which means status. In the database recovery process, the DBMS 412 can set a recovery error if there is only one Tx for which physical commit is not established forever (S811: Yes in FIG. 8), and the Tx states of all Tx are physical commits. When it comes to, the database recovery process is completed. As a result, it is possible to avoid application of logs that may have log inconsistencies.

 具体的には、Txのログ30は、そのTxの状態がフィジカルコミットであるか否かを示す情報の一例であるコミットフラグ16を含む。また、ログ30は、Txの参照に関する情報を含んだ情報の一例であるリードセット37を含む。DBMS412は、リードセット37に基づき、生成トランザクションの各々のTx状態がフィジカルコミットであるか否かを判定する。 Specifically, the Tx log 30 includes a commit flag 16 that is an example of information indicating whether or not the state of the Tx is a physical commit. Further, the log 30 includes a lead set 37 which is an example of information including information related to Tx reference. The DBMS 412 determines whether each Tx state of the generated transaction is a physical commit based on the read set 37.

 リードセット37は、各生成TxのTxIDを含む。DBMS412は、リードセット37から特定された各生成TxのTxIDに対応した現在のTx状態を特定することで、各生成Txの状態がフィジカルコミットであるか否かを判定する。 The lead set 37 includes TxID of each generated Tx. The DBMS 412 determines whether or not the state of each generated Tx is a physical commit by specifying the current Tx state corresponding to the TxID of each generated Tx specified from the lead set 37.

 DBMS412は、出力対象のログ30に含まれるリードセット37から特定される各生成Txの現在のTx状態がフィジカルコミットか否かの判定を、出力対象のログ30を出力するときに実行する。その判定の結果が肯定の場合、DBMS412は、出力対象のログ30が含むコミットフラグ16を立ててから、そのログ30を出力する。 The DBMS 412 determines whether or not the current Tx state of each generated Tx specified from the read set 37 included in the output target log 30 is a physical commit when outputting the output target log 30. If the result of the determination is affirmative, the DBMS 412 sets the commit flag 16 included in the output target log 30 and then outputs the log 30.

 DBMS412は、生成TxのTx状態がフィジカルコミットであれば、その生成TxのTxIDをログ30に記録しない。 If the Tx state of the generated Tx is a physical commit, the DBMS 412 does not record the TxID of the generated Tx in the log 30.

 DBMS412は、データベースリカバリ処理において読み出されたログ(出力済ログの一例)について、そのログが含むコミットフラグ16がフィジカルコミットを表していれば、データベースリカバリ処理においてそのログを適用する。 The DBMS 412 applies the log in the database recovery process if the commit flag 16 included in the log indicates a physical commit for the log read in the database recovery process (an example of an output log).

 DBMS412は、データベースリカバリ処理において読み出されたログが含むコミットフラグ16がフィジカルコミットを表していなければ、(x1)そのログに対応したトランザクションに関わる全ての生成Txの現在の状態がフィジカルコミットか否かを判定し、(x2)(x1)の判定の結果が肯定の場合、そのログを適用し、且つ、そのログに対応したTxの現在のTx状態をフィジカルコミットに変更する。DBMS412は、データベースリカバリ処理において、ログが読み出される都度にログ適用処理を行う。ログ適用処理では、読み出されたログについての(x1)の判定と、過去のログ適用処理において(x1)の判定の結果が否定となったログについての再度の(x1)の判定とが行われる。 If the commit flag 16 included in the log read in the database recovery process does not indicate a physical commit, the DBMS 412 (x1) determines whether the current state of all generated Tx related to the transaction corresponding to the log is a physical commit. If the determination result of (x2) (x1) is affirmative, the log is applied, and the current Tx state of Tx corresponding to the log is changed to physical commit. The DBMS 412 performs a log application process every time a log is read in the database recovery process. In the log application process, the determination of (x1) for the read log and the determination of (x1) again for the log for which the determination result of (x1) is negative in the past log application process are performed. Is called.

 以上、一実施形態を説明したが、本発明は、この実施形態に限定されるものでなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。 As mentioned above, although one embodiment was described, it cannot be overemphasized that this invention can be variously changed in the range which is not limited to this embodiment and does not deviate from the summary.

 例えば、リードセット(参照情報の一例)は、各参照レコードエントリに代えて、タイムスタンプ(以下、TS)のみでもよいし、そのTSのときに参照可能なレコードのIDのリストでもよい。TSは、時刻でもよいしカウント値であってもよい。クエリ実行部は、例えば、TS「120」より前のTxのTx状態が全てフィジカルコミットであれば、TS「120」に対応したTxのTx状態もフィジカルコミットにしてよいと判断できる。また、例えば、クエリ実行部は、例えば、TS「119」に対応したTxについてコミットのためのログ出力が行われたはずであるがそのログがログファイルに書かれていなければ、TS「120」に対応したTxのTx状態をフィジカルコミットにしてはならないと判断できる(TS「119」に対応したTxのTx状態がフィジカルコミットでないからである)。このように、リードセットがTSであっても、対象TxのTx状態をフィジカルコミットにできるか否かの判断することができる。 For example, a lead set (an example of reference information) may be only a time stamp (hereinafter referred to as TS) instead of each reference record entry, or a list of record IDs that can be referred to at the time of the TS. TS may be a time or a count value. For example, if all Tx states of Tx prior to TS “120” are physical commits, the query execution unit can determine that the Tx state of Tx corresponding to TS “120” may also be physical commits. Further, for example, the query execution unit, for example, should have output a log for commit for Tx corresponding to TS “119”, but if the log is not written in the log file, TS “120” It can be determined that the Tx state corresponding to Tx should not be a physical commit (because the Tx state corresponding to TS “119” is not a physical commit). In this way, even if the lead set is TS, it can be determined whether the Tx state of the target Tx can be a physical commit.

 401…データベースサーバ

 
401 ... Database server

Claims (14)

 データベースのトランザクションのコミットのためのログ出力の応答を受けること無しに、そのトランザクションの結果に基づく別のトランザクションを開始する計算機システムであって、
 トランザクションに関する情報を含んだ情報である管理情報を記憶する記憶部と、
 データベースのトランザクションのコミットのために、前記管理情報に基づき生成されたログを出力し、そのログ出力の応答を受けること無しにコミット完了を出力するプロセッサと
を有する計算機システム。
A computer system that starts another transaction based on the result of a transaction without receiving a log output response for the commit of the database transaction,
A storage unit for storing management information which is information including information on transactions;
A computer system comprising: a processor that outputs a log generated based on the management information and commits completion without receiving a response to the log output for committing a database transaction.
 前記記憶部は、コミットのためのログ出力が行われてからそのログ出力の応答を受ける前にコミット完了を出力することであるロジカルコミット出力を実行するか否かを表す情報である出力制御情報を記憶し、
 前記プロセッサは、ロジカルコミット出力を実行することを前記出力制御情報が表していれば、トランザクションのコミットのために行ったログ出力の応答を受ける前にそのコミットの完了を出力する、
請求項1記載の計算機システム。
The storage unit is output control information that is information indicating whether or not to execute a logical commit output that is to output a commit completion before receiving a log output response after a log output for commit is performed Remember
If the output control information indicates that a logical commit output is to be executed, the processor outputs the completion of the commit before receiving a log output response made for transaction commit.
The computer system according to claim 1.
 前記プロセッサは、
  ロジカルコミット出力を行うか否かの指定である出力指定を受け付けるユーザインターフェースを提供し、
  前記ユーザインターフェースを通じて出力指定を受け、
  前記受けた出力指定に従い前記出力制御情報を更新する、
請求項2記載の計算機システム。
The processor is
Provide a user interface that accepts output specification that specifies whether to perform logical commit output,
Receive output designation through the user interface,
Updating the output control information according to the received output designation;
The computer system according to claim 2.
 前記記憶部は、トランザクションのコミットのためのログ出力の応答を受けること無しにそのトランザクションの結果に基づく別のトランザクションを開始する処理モードである投機実行処理モードがオンか否かを表す情報であるモード制御情報を記憶し、
 前記プロセッサは、前記投機実行処理モードがオンであることを前記モード制御情報が表している場合、トランザクションのコミットのためのログ出力の応答を受けること無しにそのトランザクションの結果に基づく別のトランザクションを開始するようになっており、
 前記プロセッサは、
  前記投機実行処理モードがオンか否かの指定であるモード指定を、前記ユーザインターフェース又は別のユーザインターフェースを通じて受け、
  前記受けたモード指定に従い前記モード制御情報を更新する、
請求項3記載の計算機システム。
The storage unit is information indicating whether or not a speculative execution processing mode, which is a processing mode for starting another transaction based on a result of the transaction without receiving a log output response for committing the transaction, is on. Store mode control information,
When the mode control information indicates that the speculative execution processing mode is on, the processor can execute another transaction based on the result of the transaction without receiving a log output response for committing the transaction. To start,
The processor is
Receiving a mode designation that is a designation of whether or not the speculative execution processing mode is on, through the user interface or another user interface;
Updating the mode control information in accordance with the received mode designation;
The computer system according to claim 3.
 前記プロセッサが、
  ロジカルコミット出力を実行しないことを前記出力制御情報が表していれば、トランザクションのコミットのために行ったログ出力の応答を受ける前にコミット完了を出力せず、
  前記出力制御情報が、少なくとも、ロジカルコミット出力を実行しないことを表していれば、トランザクションのコミットのために行ったログ出力の応答を受け、且つ、そのトランザクションに関わる生成トランザクションの各々の状態がフィジカルコミットの場合、コミット完了を出力し、
 フィジカルコミットは、トランザクションのコミットのためのログ出力の応答を受け、且つ、そのトランザクションに関わる生成トランザクションの各々の状態がフィジカルコミットであることを意味する状態であり、
 前記生成トランザクションの各々は、そのトランザクションにより参照されたレコードを生成したトランザクションである、
請求項2記載の計算機システム。
The processor is
If the output control information indicates that the logical commit output is not executed, the commit completion is not output before receiving the log output response made for the transaction commit,
If the output control information indicates that at least the logical commit output is not executed, the response of the log output performed for the transaction commit is received, and the state of each of the generated transactions related to the transaction is physical. In case of commit, output commit completion,
A physical commit is a state that means that a response of a log output for committing a transaction is received and each state of a generated transaction related to the transaction is a physical commit.
Each of the generated transactions is a transaction that generated a record referenced by the transaction.
The computer system according to claim 2.
 いずれかのトランザクションである対象トランザクションの状態として、
  前記対象トランザクションのコミットのためのログ出力が行われてからそのログ出力の応答を受ける前の状態であるロジカルコミットと、
  前記対象トランザクションのコミットのためのログ出力の応答を受け、且つ、前記対象トランザクションに関わる生成トランザクションの各々の状態がフィジカルコミットであることを意味する状態であるフィジカルコミットと
があり、
 前記生成トランザクションの各々は、前記対象トランザクションにより参照されたレコードを生成したトランザクションである、
 前記プロセッサにより出力されたログは、そのログに対応したトランザクションの状態がフィジカルコミットであるか否かを示す情報であるコミット状態情報を含む、
請求項1記載の計算機システム。
As the status of the target transaction that is one of the transactions,
A logical commit that is in a state before the log output for the commit of the target transaction is performed and a response of the log output is received;
There is a physical commit that receives a log output response for committing the target transaction, and that means that each state of the generated transaction related to the target transaction is a physical commit,
Each of the generation transactions is a transaction that generates a record referenced by the target transaction.
The log output by the processor includes commit status information that is information indicating whether the status of the transaction corresponding to the log is a physical commit.
The computer system according to claim 1.
 前記対象トランザクションに対応したログは、前記対象トランザクションの参照に関する情報を含んだ情報である参照情報を含み、
 前記プロセッサは、前記参照情報に基づき、前記生成トランザクションの各々の状態がフィジカルコミットであるか否かを判定する、
請求項6記載の計算機システム。
The log corresponding to the target transaction includes reference information that is information including information related to the reference of the target transaction,
The processor determines whether each state of the generated transaction is a physical commit based on the reference information.
The computer system according to claim 6.
 前記参照情報は、前記生成トランザクションの各々について、その生成トランザクションのIDを含み、
 前記プロセッサは、前記参照情報から特定された各生成トランザクションのIDに対応した現在のトランザクション状態を特定することで、前記生成トランザクションの各々の状態がフィジカルコミットであるか否かを判定する、
請求項7記載の計算機システム。
The reference information includes, for each of the generated transactions, an ID of the generated transaction,
The processor determines whether each state of the generated transaction is a physical commit by specifying a current transaction state corresponding to an ID of each generated transaction specified from the reference information.
The computer system according to claim 7.
 前記プロセッサは、
  出力対象のログに含まれる参照情報に対応した生成トランザクションの各々の現在の状態がフィジカルコミットか否かの判定を、前記出力対象のログを出力するときに実行し、
  その判定の結果が肯定の場合、前記出力対象のログが含むコミット状態情報を、フィジカルコミットを表す情報に変更してから、前記出力対象のログを出力する、
請求項6記載の計算機システム。
The processor is
Determining whether the current state of each of the generated transactions corresponding to the reference information included in the output target log is a physical commit when executing the output target log;
If the result of the determination is affirmative, the commit status information included in the output target log is changed to information representing a physical commit, and then the output target log is output.
The computer system according to claim 6.
 前記プロセッサは、
  生成トランザクションの状態がフィジカルコミットでなければ、その生成トランザクションのIDを前記対象トランザクションのログに記録し、
  生成トランザクションの状態がフィジカルコミットであれば、その生成トランザクションのIDを前記対象トランザクションのログに記録しない、
請求項9記載の計算機システム。
The processor is
If the state of the generated transaction is not a physical commit, the ID of the generated transaction is recorded in the log of the target transaction,
If the status of the generated transaction is a physical commit, the ID of the generated transaction is not recorded in the log of the target transaction.
The computer system according to claim 9.
 前記プロセッサは、出力済のログの各々について、そのログが含むコミット状態情報がフィジカルコミットを表していれば、データベースリカバリ処理においてそのログを適用する、
請求項6記載の計算機システム。
For each output log, the processor applies the log in the database recovery process if the commit status information included in the log represents a physical commit.
The computer system according to claim 6.
 前記プロセッサは、出力済のログの各々について、そのログが含むコミット状態情報がフィジカルコミットを表していなければ、
  (x1)そのログに対応したトランザクションに関わる生成トランザクションの各々の現在の状態がフィジカルコミットか否かを判定し、
  (x2)(x1)の判定の結果が肯定の場合、前記データベースリカバリ処理においてそのログを適用し、且つ、そのログに対応したトランザクションの現在の状態をフィジカルコミットに変更する、
請求項11記載の計算機システム。
The processor, for each output log, if the commit status information included in the log does not represent a physical commit,
(X1) It is determined whether the current state of each of the generated transactions related to the transaction corresponding to the log is a physical commit,
(X2) When the determination result of (x1) is affirmative, the log is applied in the database recovery process, and the current state of the transaction corresponding to the log is changed to a physical commit.
The computer system according to claim 11.
 前記プロセッサは、前記データベースリカバリ処理において、ログが読み出される都度にログ適用処理を行い、
 前記ログ適用処理では、読み出されたログについての(x1)の判定と、過去のログ適用処理において(x1)の判定の結果が否定となったログについての再度の(x1)の判定とが行われる、
請求項12記載の計算機システム。
The processor performs a log application process each time a log is read in the database recovery process,
In the log application process, the determination of (x1) for the read log and the determination of (x1) again for the log for which the determination result of (x1) is negative in the past log application process. Done,
The computer system according to claim 12.
 データベースのトランザクションのコミットのためのログ出力の応答を受けること無しに、そのトランザクションの結果に基づく別のトランザクションを開始するデータベース管理方法において、
 データベースのトランザクションのコミットのためのログ出力が行われたことを検出し、
 検出されたログ出力の応答を受けること無しにコミット完了を出力する、
データベース管理方法。
In the database management method of starting another transaction based on the result of the transaction without receiving a log output response for the commit of the database transaction,
Detects that log output for database transaction commit occurred,
Output commit completion without receiving response of detected log output,
Database management method.
PCT/JP2015/069479 2015-07-07 2015-07-07 Computer system and database management method Ceased WO2017006423A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017526828A JP6263673B2 (en) 2015-07-07 2015-07-07 Computer system and database management method
PCT/JP2015/069479 WO2017006423A1 (en) 2015-07-07 2015-07-07 Computer system and database management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/069479 WO2017006423A1 (en) 2015-07-07 2015-07-07 Computer system and database management method

Publications (1)

Publication Number Publication Date
WO2017006423A1 true WO2017006423A1 (en) 2017-01-12

Family

ID=57685251

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/069479 Ceased WO2017006423A1 (en) 2015-07-07 2015-07-07 Computer system and database management method

Country Status (2)

Country Link
JP (1) JP6263673B2 (en)
WO (1) WO2017006423A1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120109895A1 (en) * 2010-10-28 2012-05-03 Microsoft Corporation Versatile in-memory database recovery
WO2013062894A1 (en) * 2011-10-26 2013-05-02 Nec Laboratories America, Inc. Online transaction processing

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120109895A1 (en) * 2010-10-28 2012-05-03 Microsoft Corporation Versatile in-memory database recovery
WO2013062894A1 (en) * 2011-10-26 2013-05-02 Nec Laboratories America, Inc. Online transaction processing

Also Published As

Publication number Publication date
JP6263673B2 (en) 2018-01-17
JPWO2017006423A1 (en) 2017-08-10

Similar Documents

Publication Publication Date Title
US10157108B2 (en) Multi-way, zero-copy, passive transaction log collection in distributed transaction systems
JP6152431B2 (en) Database management system and method
CN118276783A (en) Data partition switching between storage clusters
US12282781B2 (en) Cluster bootstrapping for distributed computing systems
US20230385096A1 (en) Asynchronous queries on secondary data cores in a distributed computing system
US8832022B2 (en) Transaction processing device, transaction processing method and transaction processing program
US10007548B2 (en) Transaction system
US12182106B2 (en) Targeted sweep method for key-value data storage
US10635668B2 (en) Intelligently utilizing non-matching weighted indexes
US11321302B2 (en) Computer system and database management method
US20180203771A1 (en) Database Redo Log Optimization by Skipping MVCC Redo Log Records
JP2024539861A (en) Method, system and computer program for loading data into a target database system
US12235740B2 (en) Backup and recovery under group-level encryption
US11656953B2 (en) Small database page recovery
US11880495B2 (en) Processing log entries under group-level encryption
CN110532225A (en) Storage engine switching method, apparatus, electronic device and medium
JP6263673B2 (en) Computer system and database management method
CN114328546A (en) Timestamp mode determination method and device of database management system
US12443489B2 (en) Offloading redo log processing to solid-state drives in database systems
EP3690656A1 (en) Method and system for inline deduplication using accelerator pools
WO2016120988A1 (en) Database system and database management method

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2017526828

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15897686

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15897686

Country of ref document: EP

Kind code of ref document: A1