Skip to content

Struct MDBX_defrag_result_t

ClassList > MDBX_defrag_result_t

The numerical metrics of progress and result of database defragmentation. More...

  • #include <mdbx.h>

Public Attributes

Type Name
unsigned cycles
size_t obstructed_pgno
size_t obstructed_span
uint64_t obstructed_txnid
mdbx_pid_t obstructor_pid
mdbx_tid_t obstructor_tid
size_t pages_left
size_t pages_moved
size_t pages_retained
size_t pages_scheduled
intptr_t pages_shrinked
size_t pages_whole
unsigned rough_estimation_cycle_progress_permille
size_t spent_time_dot16
unsigned stopping_reasons

Detailed Description

See also: mdbx_env_defrag()

See also: MDBX_defrag_notify_func

Public Attributes Documentation

variable cycles

unsigned MDBX_defrag_result_t::cycles;

The number of defragmentation cycles.


variable obstructed_pgno

size_t MDBX_defrag_result_t::obstructed_pgno;

The number of the page where the defragmentation stumbled, according to the reasons given in the stopping_reasons field.


variable obstructed_span

size_t MDBX_defrag_result_t::obstructed_span;

The length of the large/overflow-page span where the defragmentation stumbled, according to the reasons given in the stopping_reasons field.


variable obstructed_txnid

uint64_t MDBX_defrag_result_t::obstructed_txnid;

The transaction number corresponds to the earliest/first MVCC-snapshot held by reader(s) and preventing defragmentation.


variable obstructor_pid

mdbx_pid_t MDBX_defrag_result_t::obstructor_pid;

The system/native Process ID of one of a readers holding the MVCC snapshot that prevents defragmentation.


variable obstructor_tid

mdbx_tid_t MDBX_defrag_result_t::obstructor_tid;

The system/native Thread ID of one of a readers holding the MVCC snapshot that prevents defragmentation.


variable pages_left

size_t MDBX_defrag_result_t::pages_left;

The estimated remaining number of pages that are potentially defragmented.


variable pages_moved

size_t MDBX_defrag_result_t::pages_moved;

The total number of pages moved during defragmentation.


variable pages_retained

size_t MDBX_defrag_result_t::pages_retained;

The number of pages held by other processes via reading MVCC-snapshots that prevent reclaiming and defragmentation.


variable pages_scheduled

size_t MDBX_defrag_result_t::pages_scheduled;

The number of pages scheduled to be moved at the next stage of the current defragmentation cycle.


variable pages_shrinked

intptr_t MDBX_defrag_result_t::pages_shrinked;

The number of pages that the database size was shrinked by. In the worst case, this value can be negative, for instance -1, when defragmentation was stopped for some reason, or the database structure does not allow it to be defragmented by moving individual pages.


variable pages_whole

size_t MDBX_defrag_result_t::pages_whole;

The whole number of pages in the database.


variable rough_estimation_cycle_progress_permille

unsigned MDBX_defrag_result_t::rough_estimation_cycle_progress_permille;

Rough estimation a progress of the current defragmentation cycle in permilles (the 1000 means 100%).


variable spent_time_dot16

size_t MDBX_defrag_result_t::spent_time_dot16;

The time elapsed since the beginning of defragmentation in a 1/65536 second fractions.


variable stopping_reasons

unsigned MDBX_defrag_result_t::stopping_reasons;

Obstacles and reasons for stopping defragmentation in the form of a mask of OR'ed MDBX_defrag_stopping_reasons_t bits.



The documentation for this class was generated from the following file docs/mdbx.h