MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Dblqh::Fragrecord Struct Reference
Collaboration diagram for Dblqh::Fragrecord:

Public Types

enum  ExecSrStatus { IDLE = 0, ACTIVE = 2 }
enum  FragStatus {
  FREE = 0, FSACTIVE = 1, DEFINED = 2, BLOCKED = 3,
  ACTIVE_CREATION = 4, CRASH_RECOVERING = 5, REMOVING = 6
}
enum  LogFlag { STATE_TRUE = 0, STATE_FALSE = 1 }
enum  SrStatus { SS_IDLE = 0, SS_STARTED = 1, SS_COMPLETED = 2 }
enum  LcpFlag { LCP_STATE_TRUE = 0, LCP_STATE_FALSE = 1 }
enum  ActiveCreat { AC_NORMAL = 0, AC_IGNORED = 1, AC_NR_COPY = 2 }
typedef Bitmask< 8 > ScanNumberMask

Public Attributes

UintR execSrLastGci [4]
UintR execSrStartGci [4]
UintR execSrUserptr [4]
UintR lcpId [MAX_LCP_STORED]
UintR maxGciInLcp
UintR maxGciCompletedInLcp
UintR srLastGci [4]
UintR srStartGci [4]
UintR accFragptr
BlockReference execSrBlockref [4]
ScanNumberMask m_scanNumberMask
DLList< ScanRecord >::Head m_activeScans
DLFifoList< ScanRecord >::Head m_queuedScans
DLFifoList< ScanRecord >::Head m_queuedTupScans
Uint16 srLqhLognode [4]
UintR tupFragptr
UintR tuxFragptr
UintR activeTcCounter
ExecSrStatus execSrStatus
UintR fragId
FragStatus fragStatus
Uint8 m_copy_started_state
LogFlag logFlag
UintR masterPtr
union {
   Uint32   nextPool
   Uint32   nextList
}; 
Uint32 prevList
UintR newestGci
SrStatus srStatus
UintR srUserptr
UintR startGci
UintR tabRef
UintR firstWaitQueue
UintR lastWaitQueue
BlockReference accBlockref
BlockReference tuxBlockref
BlockReference masterBlockref
BlockReference srBlockref
BlockReference tupBlockref
LcpFlag lcpFlag
Uint16 copyNode
Uint8 copyFragState
Uint8 execSrNoReplicas
Uint8 fragCopy
Uint8 fragDistributionKey
Uint8 srChkpnr
Uint8 srNoLognodes
Uint8 tableType
UintR tableFragptr
Uint32 m_log_part_ptr_i
Uint16 lqhInstanceKey

Detailed Description

Definition at line 571 of file Dblqh.hpp.

Member Typedef Documentation

This variable contains references to active scan and copy fragment operations on the fragment. A maximum of four concurrently active is allowed.

Definition at line 695 of file Dblqh.hpp.

Member Enumeration Documentation

0 = undefined i.e fragStatus != ACTIVE_CREATION 1 = yes 2 = no

Definition at line 736 of file Dblqh.hpp.

Possible state transitions are:

  • FREE -> DEFINED Fragment record is allocated
  • DEFINED -> ACTIVE Add fragment is completed and fragment is ready to receive operations.
  • DEFINED -> ACTIVE_CREATION Add fragment is completed and fragment is ready to receive operations in parallel with a copy fragment which is performed from the primary replica
  • DEFINED -> CRASH_RECOVERING A fragment is ready to be recovered from a local checkpoint on disk
  • ACTIVE -> BLOCKED A local checkpoint is to be started. No more operations are allowed to be started until the local checkpoint has been started.
  • ACTIVE -> REMOVING A fragment is removed from the node
  • BLOCKED -> ACTIVE Operations are allowed again in the fragment.
  • CRASH_RECOVERING -> ACTIVE A fragment has been recovered and are now ready for operations again.
  • CRASH_RECOVERING -> REMOVING Fragment recovery failed or was cancelled.
  • ACTIVE_CREATION -> ACTIVE A fragment is now copied and now is a normal fragment
  • ACTIVE_CREATION -> REMOVING Copying of the fragment failed
  • REMOVING -> FREE Removing of the fragment is completed and the fragment is now free again.
Enumerator:
FREE 

Fragment record is currently not in use.

FSACTIVE 

Fragment is defined and usable for operations.

DEFINED 

Fragment is defined but not yet usable by operations

BLOCKED 

LQH is waiting for all active operations to complete the current phase so that the local checkpoint can be started.

ACTIVE_CREATION 

Fragment is defined and active but is under creation by the primary LQH.

CRASH_RECOVERING 

Fragment is recovering after a crash by executing the fragment log and so forth. Will need further breakdown.

REMOVING 

The fragment is currently removed. Operations are not allowed.

Definition at line 613 of file Dblqh.hpp.

Member Data Documentation

union { ... }

This variable contains the maximum global checkpoint identifier which was completed when the local checkpoint was started. Reference to the next fragment record in a free list of fragment records.

BlockReference Dblqh::Fragrecord::accBlockref

The block reference to ACC on the fragment makes it possible to have different ACC blocks for different fragments in the future.

Definition at line 792 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::accFragptr

The fragment pointers in ACC

Definition at line 673 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::activeTcCounter

This variable keeps track of how many operations that are active that have skipped writing the log but not yet committed or aborted. This is used during start of fragment.

Definition at line 713 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::copyFragState

This variable ensures that only one copy fragment is active at a time on the fragment.

Definition at line 836 of file Dblqh.hpp.

Uint16 Dblqh::Fragrecord::copyNode

Used to ensure that updates started with old configuration do not arrive here after the copy fragment has started. If they are allowed to arrive after they could update a record that has already been replicated to the new node. This type of arrival should be extremely rare but we must anyway ensure that no harm is done.

Definition at line 831 of file Dblqh.hpp.

BlockReference Dblqh::Fragrecord::execSrBlockref[4]

The EXEC_SR variables are used to keep track of which fragments that are interested in being executed as part of executing the fragment loop. It is initialised for every phase of executing the fragment log (the fragment log can be executed upto four times).

Each execution is capable of executing the log records on four fragment replicas. Requesting block reference for executing the fragment log in this phase.

Definition at line 688 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::execSrLastGci[4]

Last GCI for executing the fragment log in this phase.

Definition at line 645 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::execSrNoReplicas

The number of fragment replicas that will execute the log records in this round of executing the fragment log. Maximum four is possible.

Definition at line 842 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::execSrStartGci[4]

Start GCI for executing the fragment log in this phase.

Definition at line 649 of file Dblqh.hpp.

ExecSrStatus Dblqh::Fragrecord::execSrStatus

This status specifies whether this fragment is actively engaged in executing the fragment log.

Definition at line 719 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::execSrUserptr[4]

Requesting user pointer for executing the fragment log in this phase

Definition at line 654 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::firstWaitQueue

This is the queue to put operations that have been blocked during start of a local chkp.

Definition at line 784 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::fragCopy

This variable contains what type of replica this fragment is. Two types are possible:

  • Primary/Backup replica = 0
  • Stand-by replica = 1

It is not possible to distinguish between primary and backup on a fragment. This can only be done per transaction. DIH can change from primary to backup without informing the various replicas about this change.

Definition at line 855 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::fragDistributionKey

This is the last fragment distribution key that we have heard of.

Definition at line 860 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::fragId

The fragment id of this fragment.

Definition at line 724 of file Dblqh.hpp.

FragStatus Dblqh::Fragrecord::fragStatus

Status of fragment

Definition at line 729 of file Dblqh.hpp.

LcpFlag Dblqh::Fragrecord::lcpFlag

This state indicates if the fragment will participate in a checkpoint. Temporary tables with Fragrecord::logFlag permanently off will also have Fragrecord::lcpFlag off.

Definition at line 821 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::lcpId[MAX_LCP_STORED]

The LCP identifier of the LCP's. =0 means that the LCP number has not been stored. The LCP identifier is supplied by DIH when starting the LCP.

Definition at line 660 of file Dblqh.hpp.

LogFlag Dblqh::Fragrecord::logFlag

This flag indicates whether logging is currently activated at the fragment. During a system restart it is temporarily shut off. Some fragments have it permanently shut off.

Definition at line 749 of file Dblqh.hpp.

Uint16 Dblqh::Fragrecord::lqhInstanceKey

Instance key for fast access.

Definition at line 884 of file Dblqh.hpp.

Uint32 Dblqh::Fragrecord::m_log_part_ptr_i

Log part

Definition at line 879 of file Dblqh.hpp.

BlockReference Dblqh::Fragrecord::masterBlockref

The master block reference as sent in COPY_ACTIVEREQ.

Definition at line 801 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::maxGciCompletedInLcp

This variable contains the maximum global checkpoint identifier that exists in a certain local checkpoint. Maximum 4 local checkpoints is possible in this release.

Definition at line 667 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::newestGci

The newest GCI that has been committed on fragment

Definition at line 768 of file Dblqh.hpp.

BlockReference Dblqh::Fragrecord::srBlockref

These variables are used during system restart to recall from which node to execute the fragment log and which GCI's this node should start and stop from. Also to remember who to send the response to when system restart is completed.

Definition at line 808 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::srChkpnr

How many local checkpoints does the fragment contain

Definition at line 864 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::startGci

The starting global checkpoint of this fragment.

Definition at line 774 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::tableFragptr

For ordered index fragment, i-value of corresponding fragment in primary table.

Definition at line 874 of file Dblqh.hpp.

Uint8 Dblqh::Fragrecord::tableType

Table type.

Definition at line 869 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::tabRef

A reference to the table owning this fragment.

Definition at line 778 of file Dblqh.hpp.

BlockReference Dblqh::Fragrecord::tupBlockref

The block reference to TUP on the fragment makes it possible to have different TUP blocks for different fragments in the future.

Definition at line 814 of file Dblqh.hpp.

UintR Dblqh::Fragrecord::tupFragptr

The fragment pointers in TUP and TUX

Definition at line 705 of file Dblqh.hpp.

BlockReference Dblqh::Fragrecord::tuxBlockref

Ordered index block.

Definition at line 797 of file Dblqh.hpp.


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