|
|
@ -9765,7 +9765,10 @@ typedef struct mdb_copy { |
|
|
|
HANDLE mc_fd; |
|
|
|
HANDLE mc_fd; |
|
|
|
int mc_toggle; /**< Buffer number in provider */ |
|
|
|
int mc_toggle; /**< Buffer number in provider */ |
|
|
|
int mc_new; /**< (0-2 buffers to write) | (#MDB_EOF at end) */ |
|
|
|
int mc_new; /**< (0-2 buffers to write) | (#MDB_EOF at end) */ |
|
|
|
volatile int mc_error; /**< Error code, never cleared if set */ |
|
|
|
/** Error code. Never cleared if set. Both threads can set nonzero
|
|
|
|
|
|
|
|
* to fail the copy. Not mutex-protected, LMDB expects atomic int. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
volatile int mc_error; |
|
|
|
} mdb_copy; |
|
|
|
} mdb_copy; |
|
|
|
|
|
|
|
|
|
|
|
/** Dedicated writer thread for compacting copy. */ |
|
|
|
/** Dedicated writer thread for compacting copy. */ |
|
|
@ -9850,7 +9853,11 @@ mdb_env_cthr_toggle(mdb_copy *my, int adjust) |
|
|
|
return my->mc_error; |
|
|
|
return my->mc_error; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** Depth-first tree traversal for compacting copy. */ |
|
|
|
/** Depth-first tree traversal for compacting copy.
|
|
|
|
|
|
|
|
* @param[in] my control structure. |
|
|
|
|
|
|
|
* @param[in,out] pg database root. |
|
|
|
|
|
|
|
* @param[in] flags includes #F_DUPDATA if it is a sorted-duplicate sub-DB. |
|
|
|
|
|
|
|
*/ |
|
|
|
static int ESECT |
|
|
|
static int ESECT |
|
|
|
mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) |
|
|
|
mdb_env_cwalk(mdb_copy *my, pgno_t *pg, int flags) |
|
|
|
{ |
|
|
|
{ |
|
|
|