Motr  M0
m0_be_tx_group Struct Reference

#include <tx_group.h>

Collaboration diagram for m0_be_tx_group:
Collaboration graph

Data Fields

struct m0_be_tx_group_cfg tg_cfg
 
struct m0_be_tx_credit tg_used
 
struct m0_be_tx_credit tg_size
 
struct m0_be_tx_credit tg_log_reserved
 
m0_bcount_t tg_payload_prepared
 
uint32_t tg_nr_unclosed
 
uint32_t tg_nr_unstable
 
struct m0_tl tg_txs
 
struct m0_tl tg_txs_recovering
 
struct be_recovering_txtg_rtxs
 
struct m0_tlink tg_engine_linkage
 
uint64_t tg_magic
 
struct m0_be_group_format tg_od
 
struct m0_be_logtg_log
 
struct m0_be_domaintg_domain
 
struct m0_be_enginetg_engine
 
struct m0_be_tx_group_fom tg_fom
 
struct m0_be_reg_area tg_reg_area
 
bool tg_recovering
 
struct m0_be_reg_area_merger tg_merger
 
struct m0_sm_timer tg_close_timer
 
struct m0_sm_ast tg_close_timer_arm
 
struct m0_sm_ast tg_close_timer_disarm
 
m0_time_t tg_close_deadline
 
enum m0_be_tx_group_state tg_state
 

Detailed Description

Transaction group is a collection of transactions, consecutive in closing order, that are written to the log and recovered together.

A new group is initially empty. It absorbs transactions as they are closed, until the group either grows larger than m0_be_log::lg_gr_size_max or grows older than XXX. At that point, the group is closed and a new group is opened up to an upper limit (XXX) on groups number (1 is a possible and reasonable such limit).

Once a group is closed it constructs in memory its persistent representation, consisting of group header, sequence of transaction representations and group commit block. The memory for this representation is pre-allocated in transaction engine to avoid dead-locks. Once representation is constructed, it is written to the log in one or multiple asynchronous IOs. Before group commit block is written, all other IOs for the group must complete. After that, the commit block is written. Once commit block IO completes, it is guaranteed that the entire group is on the log. Waiting for IO completion can be eliminated by using (currently unimplemented) barrier interface provided by m0_stob, or by placing in the commit block a strong checksum of group representation (the latter approach allows to check whether the entire group made it to the log).

Definition at line 104 of file tx_group.h.

Field Documentation

◆ tg_cfg

struct m0_be_tx_group_cfg tg_cfg

Definition at line 105 of file tx_group.h.

◆ tg_close_deadline

m0_time_t tg_close_deadline

Definition at line 144 of file tx_group.h.

◆ tg_close_timer

struct m0_sm_timer tg_close_timer

Fields for BE engine

Definition at line 141 of file tx_group.h.

◆ tg_close_timer_arm

struct m0_sm_ast tg_close_timer_arm

Definition at line 142 of file tx_group.h.

◆ tg_close_timer_disarm

struct m0_sm_ast tg_close_timer_disarm

Definition at line 143 of file tx_group.h.

◆ tg_domain

struct m0_be_domain* tg_domain

Definition at line 132 of file tx_group.h.

◆ tg_engine

struct m0_be_engine* tg_engine

Definition at line 133 of file tx_group.h.

◆ tg_engine_linkage

struct m0_tlink tg_engine_linkage

Definition at line 126 of file tx_group.h.

◆ tg_fom

struct m0_be_tx_group_fom tg_fom

Definition at line 134 of file tx_group.h.

◆ tg_log

struct m0_be_log* tg_log

Definition at line 131 of file tx_group.h.

◆ tg_log_reserved

struct m0_be_tx_credit tg_log_reserved

Definition at line 109 of file tx_group.h.

◆ tg_magic

uint64_t tg_magic

Definition at line 128 of file tx_group.h.

◆ tg_merger

struct m0_be_reg_area_merger tg_merger

Definition at line 137 of file tx_group.h.

◆ tg_nr_unclosed

uint32_t tg_nr_unclosed

The number of transactions that have not reached M0_BTS_CLOSED state.

Definition at line 114 of file tx_group.h.

◆ tg_nr_unstable

uint32_t tg_nr_unstable

The number of transactions that have not reached M0_BTS_DONE state.

Definition at line 118 of file tx_group.h.

◆ tg_od

struct m0_be_group_format tg_od

XXX DOCUMENTME

Definition at line 130 of file tx_group.h.

◆ tg_payload_prepared

m0_bcount_t tg_payload_prepared

Definition at line 110 of file tx_group.h.

◆ tg_recovering

bool tg_recovering

Definition at line 136 of file tx_group.h.

◆ tg_reg_area

struct m0_be_reg_area tg_reg_area

Definition at line 135 of file tx_group.h.

◆ tg_rtxs

struct be_recovering_tx* tg_rtxs

Preallocated array of recovering transactions.

Definition at line 124 of file tx_group.h.

◆ tg_size

struct m0_be_tx_credit tg_size

Definition at line 108 of file tx_group.h.

◆ tg_state

enum m0_be_tx_group_state tg_state

Group state. Is used and set by the engine.

Definition at line 146 of file tx_group.h.

◆ tg_txs

struct m0_tl tg_txs

List of transactions in the group.

Definition at line 120 of file tx_group.h.

◆ tg_txs_recovering

struct m0_tl tg_txs_recovering

List of recovering transactions in the group.

Definition at line 122 of file tx_group.h.

◆ tg_used

struct m0_be_tx_credit tg_used

Total size of all updates in all transactions in this group.

Definition at line 107 of file tx_group.h.


The documentation for this struct was generated from the following file: