Skip to content

Commit e0accd8

Browse files
committed
reconcile analyze
1 parent ea5afe8 commit e0accd8

File tree

12 files changed

+111
-37
lines changed

12 files changed

+111
-37
lines changed

python安装.txt

+10
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
/usr/bin/ld: /usr/local/lib64/libsnappy.a(snappy.cc.o): relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
2+
/usr/bin/ld: /usr/local/lib64/libsnappy.a(snappy-sinksource.cc.o): relocation R_X86_64_32 against symbol `_ZTVN6snappy6SourceE' can not be used when making a shared object; recompile with -fPIC
3+
/usr/bin/ld: /usr/local/lib64/libsnappy.a(snappy-c.cc.o): relocation R_X86_64_PC32 against symbol `snappy_max_compressed_length' can not be used when making a shared object; recompile with -fPIC
4+
/usr/bin/ld: final link failed: Bad value
5+
collect2: error: ld returned 1 exit status
6+
7+
如果编译报错,可以跳过snappy,对应命令如下:
8+
cmake -DENABLE_SNAPPY=0 ../.
9+
10+
111
./configure --prefix=/usr/local/python-3.8.8 --enable-shared CFLAGS=-fPIC --enable-optimizations 升级python时候源码编译一定带上,否则高版本wiredtiger编译的时候会报错

wiredtiger-11.1.0/wiredtiger-11.1.0/examples/c/ex_access.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,17 @@ access_example(void)
7070

7171
/* Open a connection to the database, creating it if necessary. */
7272
//error_check(wiredtiger_open(home, NULL, "create,statistics=(all),create,verbose=[evictserver=5,evict=5,split=5,evict_stuck=5]", &conn));
73-
// error_check(wiredtiger_open(home, NULL, "create,cache_size=1M, statistics=(all),create,verbose=[vessrify=5, split=5, overflow=5, generation=5, block=5, write=5, evictserver=5, evict_stuck=5, block_cache=5, checkpoint_progress=5, checkpoint=5, checkpoint_cleanup=5, block=5,overflow=5,reconcile=5,evictserver=5,evict=5,split=5,evict_stuck=5]", &conn));
73+
//error_check(wiredtiger_open(home, NULL, "create,cache_size=1M, statistics=(all),create,verbose=[split=5, overflow=5, generation=5, block=5, write=5, evictserver=5, evict_stuck=5, block_cache=5, checkpoint_progress=5, checkpoint=5, checkpoint_cleanup=5, block=5,overflow=5,reconcile=5,evictserver=5,evict=5,split=5,evict_stuck=5]", &conn));
7474

7575
error_check(wiredtiger_open(home, NULL, "create,cache_size=1M, statistics=(all),create,verbose=[\
7676
backup=5, block=5, block_cache=5, checkpoint=5, checkpoint_cleanup=5,checkpoint_progress=5,compact=5,\
7777
compact_progress=5,error_returns=5,evict=5,evict_stuck=5,evictserver=5,fileops=5,generation=5,handleops=5,log=5,\
7878
hs=5, history_store_activity=5,lsm=5,lsm_manager=5,metadata=5,mutex=5,out_of_order=5,overflow=5,read=5,reconcile=5,recovery=5, \
7979
recovery_progress=5,rts=5, salvage=5, shared_cache=5,split=5,temporary=5,thread_group=5,timestamp=5,tiered=5,transaction=5,verify=5,\
80-
version=5,write=5, config_all_verbos=1, api=5] ", &conn));
80+
version=5,write=5, config_all_verbos=1, api=-3, metadata=-3] ", &conn));
8181

8282
/* Open a session handle for the database. */
83-
error_check(conn->open_session(conn, NULL, NULL, &session));
83+
error_check(conn->open_session(conn, NULL, NULL, &session));
8484
/*! [access example connection] */
8585

8686

@@ -103,7 +103,7 @@ access_example(void)
103103
value_item.size = strlen(value_item.data);
104104
__wt_random_init_seed(NULL, &rnd);
105105

106-
for (i=400;i > 0; i--) {
106+
for (i=50;i > 0; i--) {
107107
rval = __wt_random(&rnd);
108108

109109
cursor->set_key(cursor, i); /* Insert a record. */

wiredtiger-11.1.0/wiredtiger-11.1.0/src/btree/bt_split.c

+12-3
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,8 @@ __split_internal(WT_SESSION_IMPL *session, WT_PAGE *parent, WT_PAGE *page)
11601160
/*
11611161
* __split_internal_lock --
11621162
* Lock an internal page.
1163-
*/ //获取page对应的page_lock锁,也就是锁住ref->home这个internal page
1163+
*/
1164+
//获取page对应的page_lock锁,也就是锁住ref->home这个internal page, 并返回parent page
11641165
static int
11651166
__split_internal_lock(WT_SESSION_IMPL *session, WT_REF *ref, bool trylock, WT_PAGE **parentp)
11661167
{
@@ -1670,6 +1671,8 @@ __split_multi_inmem_fail(WT_SESSION_IMPL *session, WT_PAGE *orig, WT_MULTI *mult
16701671
* __wt_multi_to_ref --
16711672
* Move a multi-block entry into a WT_REF structure.
16721673
*/
1674+
//__wt_evict->__evict_page_dirty_update->__wt_split_multi->__split_multi_lock->__split_multi->__wt_multi_to_ref
1675+
//让page指向拆分后的磁盘元数据
16731676
int
16741677
__wt_multi_to_ref(WT_SESSION_IMPL *session, WT_PAGE *page, WT_MULTI *multi, WT_REF **refp,
16751678
size_t *incrp, bool closing)
@@ -2103,7 +2106,9 @@ __split_insert_lock(WT_SESSION_IMPL *session, WT_REF *ref)
21032106
/*
21042107
* __wt_split_insert --
21052108
* Split a page's last insert list entries into a separate page.
2106-
*/ //__wt_evict
2109+
*/
2110+
//__wt_evict: inmem_split,内存中的page进行拆分,拆分后的还是在内存中不会写入磁盘
2111+
//__evict_reconcile: 对page拆分为多个page后写入磁盘中
21072112
int
21082113
__wt_split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
21092114
{
@@ -2123,6 +2128,7 @@ __wt_split_insert(WT_SESSION_IMPL *session, WT_REF *ref)
21232128
* __split_multi --
21242129
* Split a page into multiple pages.
21252130
*/
2131+
//__wt_evict->__evict_page_dirty_update->__wt_split_multi->__split_multi_lock->__split_multi
21262132
static int
21272133
__split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
21282134
{
@@ -2147,7 +2153,7 @@ __split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
21472153
*/
21482154
WT_RET(__wt_calloc_def(session, new_entries, &ref_new));
21492155
for (i = 0; i < new_entries; ++i)
2150-
WT_ERR(
2156+
WT_ERR( //让page指向拆分后的磁盘元数据
21512157
__wt_multi_to_ref(session, page, &mod->mod_multi[i], &ref_new[i], &parent_incr, closing));
21522158

21532159
/*
@@ -2189,13 +2195,15 @@ __split_multi(WT_SESSION_IMPL *session, WT_REF *ref, bool closing)
21892195
* __split_multi_lock --
21902196
* Split a page into multiple pages.
21912197
*/
2198+
//__wt_evict->__evict_page_dirty_update->__wt_split_multi->__split_multi_lock
21922199
static int
21932200
__split_multi_lock(WT_SESSION_IMPL *session, WT_REF *ref, int closing)
21942201
{
21952202
WT_DECL_RET;
21962203
WT_PAGE *parent;
21972204

21982205
/* Lock the parent page, then proceed with the split. */
2206+
//获取page对应的page_lock锁,也就是锁住ref->home这个internal page, 并返回parent page
21992207
WT_RET(__split_internal_lock(session, ref, false, &parent));
22002208
if ((ret = __split_multi(session, ref, closing)) != 0 || closing) {
22012209
__split_internal_unlock(session, parent);
@@ -2213,6 +2221,7 @@ __split_multi_lock(WT_SESSION_IMPL *session, WT_REF *ref, int closing)
22132221
* __wt_split_multi --
22142222
* Split a page into multiple pages.
22152223
*/
2224+
//__wt_evict->__evict_page_dirty_update->__wt_split_multi
22162225
int
22172226
__wt_split_multi(WT_SESSION_IMPL *session, WT_REF *ref, int closing)
22182227
{

wiredtiger-11.1.0/wiredtiger-11.1.0/src/conn/conn_api.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -2219,7 +2219,8 @@ __wt_verbose_config(WT_SESSION_IMPL *session, const char *cfg[], bool reconfig)
22192219
*/
22202220
verbose_value = WT_VERBOSE_DEBUG_1;
22212221
goto verbos_assign;
2222-
} else if (sval.type == WT_CONFIG_ITEM_NUM && sval.val >= WT_VERBOSE_INFO &&
2222+
//yang add todo xxxxx ,这里应该是
2223+
} else if (sval.type == WT_CONFIG_ITEM_NUM && sval.val >= WT_VERBOSE_ERROR &&
22232224
sval.val <= WT_VERBOSE_DEBUG_5) {
22242225
verbose_value = (WT_VERBOSE_LEVEL)sval.val;
22252226
goto verbos_assign;

wiredtiger-11.1.0/wiredtiger-11.1.0/src/evict/evict_page.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,8 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32
173173
* Review the page for conditions that would block its eviction. If the check fails (for
174174
* example, we find a page with active children), quit. Make this check for clean pages, too:
175175
* while unlikely eviction would choose an internal page with children, it's not disallowed.
176-
*/ //判断是否可以进行mem split,结果存入inmem_split
176+
*/
177+
//判断是否可以进行mem split,结果存入inmem_split
177178
WT_ERR(__evict_review(session, ref, flags, &inmem_split));
178179

179180
/*
@@ -197,6 +198,7 @@ __wt_evict(WT_SESSION_IMPL *session, WT_REF *ref, uint8_t previous_state, uint32
197198
* Fail 0.1% of the time after we have done reconciliation. We should always evict the page of a
198199
* dead tree.
199200
*/
201+
//让0.1%的evict reconcile跳过后续流程,直接err
200202
if (!closing && !tree_dead &&
201203
__wt_failpoint(session, WT_TIMING_STRESS_FAILPOINT_EVICTION_FAIL_AFTER_RECONCILIATION, 10)) {
202204
ret = EBUSY;
@@ -395,6 +397,7 @@ __evict_page_clean_update(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t flags)
395397
* __evict_page_dirty_update --
396398
* Update a dirty page's reference on eviction.
397399
*/
400+
//__wt_evict->__evict_page_dirty_update
398401
static int
399402
__evict_page_dirty_update(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags)
400403
{
@@ -441,6 +444,7 @@ __evict_page_dirty_update(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_
441444
WT_ASSERT(session, closing == false);
442445
WT_RET(__wt_split_rewrite(session, ref, &mod->mod_multi[0]));
443446
} else
447+
//一般走这里,一个page通过evict reconcile拆分为多个page
444448
WT_RET(__wt_split_multi(session, ref, closing));
445449
break;
446450
case WT_PM_REC_REPLACE:
@@ -717,6 +721,8 @@ __evict_review(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags, bool
717721
* __evict_reconcile --
718722
* Reconcile the page for eviction.
719723
*/
724+
//__wt_evict: inmem_split,内存中的page进行拆分,拆分后的还是在内存中不会写入磁盘
725+
//__evict_reconcile: 对page拆分为多个page后写入磁盘中
720726
static int
721727
__evict_reconcile(WT_SESSION_IMPL *session, WT_REF *ref, uint32_t evict_flags)
722728
{

wiredtiger-11.1.0/wiredtiger-11.1.0/src/include/btmem.h

+16-2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
#define WT_REC_CHECKPOINT_RUNNING 0x008u
3232
#define WT_REC_CLEAN_AFTER_REC 0x010u
3333
#define WT_REC_EVICT 0x020u
34+
//__evict_reconcile中如果是leaf page设置该标识
3435
#define WT_REC_HS 0x040u
3536
#define WT_REC_IN_MEMORY 0x080u
3637
#define WT_REC_SCRUB 0x100u
@@ -135,7 +136,7 @@ __wt_page_header_byteswap(WT_PAGE_HEADER *dsk)
135136
* WT_PAGE_HEADER_BYTE_SIZE --
136137
* The first usable data byte on the block (past the combined headers).
137138
*/
138-
//page header + block header
139+
//page header(WT_PAGE_HEADER_SIZE) + block header(WT_BLOCK_HEADER_SIZE)
139140
#define WT_PAGE_HEADER_BYTE_SIZE(btree) ((u_int)(WT_PAGE_HEADER_SIZE + (btree)->block_header))
140141
//dsk开始跳过page header + block header
141142
#define WT_PAGE_HEADER_BYTE(btree, dsk) \
@@ -273,7 +274,7 @@ struct __wt_multi {
273274
/*
274275
* Block's key: either a column-store record number or a row-store variable length byte string.
275276
*/
276-
//page拆分后对应的ref key,参考__rec_split_write
277+
//page拆分后对应的ref key,参考__rec_split_dump_keys的打印,赋值的地方在__rec_split_write
277278
union {
278279
uint64_t recno;
279280
WT_IKEY *ikey;
@@ -403,8 +404,10 @@ struct __wt_page_modify {
403404
uint32_t multi_entries; /* Multiple blocks element count */
404405
} m;
405406
#undef mod_multi
407+
//赋值参考__rec_write_wrapup, 一次reconcile结束后,reconcile的multi信息转存到mod->mod_multi中
406408
#define mod_multi u1.m.multi
407409
#undef mod_multi_entries
410+
//赋值参考__rec_write_wrapup,一次reconcile结束后,reconcile的multi信息转存到mod->mod_multi中
408411
#define mod_multi_entries u1.m.multi_entries
409412
} u1;
410413

@@ -464,13 +467,17 @@ struct __wt_page_modify {
464467
WT_INSERT_HEAD **insert;
465468

466469
/* Updated items for row-stores. */
470+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
467471
WT_UPDATE **update;
468472
} row_leaf;
469473
#undef mod_row_insert
474+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
475+
470476
//WT_PAGE_ALLOC_AND_SWAP、__split_insert分配空间
471477
//WT_ROW_INSERT_SLOT获取对应的跳跃表,实际上insert是个数组,数组每个成员对应一个跳跃表,参考__wt_leaf_page_can_split
472478
#define mod_row_insert u2.row_leaf.insert
473479
#undef mod_row_update
480+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
474481
#define mod_row_update u2.row_leaf.update
475482
} u2;
476483

@@ -505,6 +512,7 @@ struct __wt_page_modify {
505512
* WT_PAGE_DIRTY --
506513
* Two or more updates have been added to the page.
507514
*/
515+
//__wt_page_modify_clear
508516
#define WT_PAGE_CLEAN 0
509517
#define WT_PAGE_DIRTY_FIRST 1
510518
#define WT_PAGE_DIRTY 2
@@ -514,6 +522,7 @@ struct __wt_page_modify {
514522
#define WT_PM_REC_EMPTY 1 /* Reconciliation: no replacement */
515523
#define WT_PM_REC_MULTIBLOCK 2 /* Reconciliation: multiple blocks */
516524
#define WT_PM_REC_REPLACE 3 /* Reconciliation: single block */
525+
//复制参考__rec_write_wrapup
517526
uint8_t rec_result; /* Reconciliation state */
518527

519528
#define WT_PAGE_RS_RESTORED 0x1
@@ -690,6 +699,7 @@ struct __wt_page {
690699
//指向该page存储的真实数据,见__wt_page_alloc
691700
WT_ROW *row; /* Key/value pairs */
692701
#undef pg_row
702+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
693703
//指向该page存储的真实数据,见__wt_page_alloc
694704
#define pg_row u.row
695705

@@ -1023,6 +1033,7 @@ struct __wt_ref {
10231033
* or NULL if page created in-memory.
10241034
*/
10251035
//数据对应的磁盘地址???????
1036+
//例如evict reconcile流程中的__wt_multi_to_ref,指向该page对应的磁盘元数据信息
10261037
void *addr;
10271038

10281039
/*
@@ -1248,6 +1259,7 @@ struct __wt_row { /* On-page key, on-page cell, or off-page WT_IKEY */
12481259
* WT_ROW_FOREACH --
12491260
* Walk the entries of an in-memory row-store leaf page.
12501261
*/
1262+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
12511263
#define WT_ROW_FOREACH(page, rip, i) \
12521264
for ((i) = (page)->entries, (rip) = (page)->pg_row; (i) > 0; ++(rip), --(i))
12531265
#define WT_ROW_FOREACH_REVERSE(page, rip, i) \
@@ -1557,6 +1569,7 @@ struct __wt_insert_head {
15571569
* following macros return an array entry if the array of pointers and the specific structure exist,
15581570
* else NULL.
15591571
*/
1572+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
15601573
#define WT_ROW_INSERT_SLOT(page, slot) \
15611574
((page)->modify == NULL || (page)->modify->mod_row_insert == NULL ? \
15621575
NULL : \
@@ -1571,6 +1584,7 @@ struct __wt_insert_head {
15711584
* insert array. That's because the insert array requires an extra slot to hold keys that sort
15721585
* before any key found on the original page.
15731586
*/
1587+
//pg_row指向磁盘KV相关数据,mod_row_insert指向内存相关KV数据,mod_row_update记录内存中同一个K的变更过程
15741588
#define WT_ROW_INSERT_SMALLEST(page) \
15751589
((page)->modify == NULL || (page)->modify->mod_row_insert == NULL ? \
15761590
NULL : \

wiredtiger-11.1.0/wiredtiger-11.1.0/src/include/btree.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ split_pct - The percentage of the leaf_page_max we will fill on-disk pages up to
130130
uint32_t maxleafpage; /* Leaf page max size */
131131
uint32_t maxleafkey; /* Leaf page max key size */
132132
uint32_t maxleafvalue; /* Leaf page max value size */
133+
//注意cache_size这里是/1000而不是除100
133134
//memory_page_max配置默认5M,取MIN(5M, (conn->cache->eviction_dirty_trigger * cache_size) / 1000) example测试也就是默认2M
134135
uint64_t maxmempage; /* In-memory page max size */
135136
//4 * WT_MAX(btree->maxintlpage, btree->maxleafpage);
@@ -198,7 +199,8 @@ split_pct - The percentage of the leaf_page_max we will fill on-disk pages up to
198199

199200
//__wt_btree_open->__wt_blkcache_open
200201
WT_BM *bm; /* Block manager reference */ //__wt_btree.bm
201-
u_int block_header; /* WT_PAGE_HEADER_BYTE_SIZE */
202+
//WT_BLOCK_HEADER_SIZE
203+
u_int block_header; /* WT_PAGE_HEADER_BYTE_SIZE */ //yang add todo xxxxx 备注长度错了,容易误解
202204

203205
//__rec_set_page_write_gen中自增
204206
uint64_t write_gen; /* Write generation */

wiredtiger-11.1.0/wiredtiger-11.1.0/src/include/btree_inline.h

+13-10
Original file line numberDiff line numberDiff line change
@@ -1715,7 +1715,7 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
17151715
WT_INSERT *ins;
17161716
WT_INSERT_HEAD *ins_head;
17171717
size_t size;
1718-
int count;
1718+
int count1 = 0, count2 = 0;
17191719

17201720
btree = S2BT(session);
17211721

@@ -1744,7 +1744,7 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
17441744
* correctness (the page must be reconciled again before being evicted after the split,
17451745
* information from a previous reconciliation will be wrong, so we can't evict immediately).
17461746
*/
1747-
//这里是大阈值,如果page内存找过这个阈值,则不能进行memsplite,而是__evict_reconcile
1747+
//这里是大阈值,如果page内存超过这个阈值,则不能进行memsplite,而是__evict_reconcile
17481748
if (page->memory_footprint < btree->splitmempage)
17491749
return (false);
17501750
if (WT_PAGE_IS_INTERNAL(page))
@@ -1774,14 +1774,14 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
17741774
//page消耗的内存较高,大于maxleafpage * 2,并且至少有5个KV
17751775
#define WT_MAX_SPLIT_COUNT 5
17761776
if (page->memory_footprint > (size_t)btree->maxleafpage * 2) {
1777-
for (count = 0, ins = ins_head->head[0]; ins != NULL; ins = ins->next[0]) {
1778-
if (++count < WT_MAX_SPLIT_COUNT)
1777+
for (count1 = 0, ins = ins_head->head[0]; ins != NULL; ins = ins->next[0]) {
1778+
if (++count1 < WT_MAX_SPLIT_COUNT)
17791779
continue;
17801780

17811781
//当一个page使用内存较高的时候一般从这里返回
17821782
WT_STAT_CONN_DATA_INCR(session, cache_inmem_splittable);
17831783
printf("yang test ......111111........page->entries:%d..........__wt_leaf_page_can_split......count:%d..........\r\n",
1784-
(int)page->entries, count);
1784+
(int)page->entries, count1);
17851785
return (true);
17861786
}
17871787

@@ -1797,17 +1797,20 @@ __wt_leaf_page_can_split(WT_SESSION_IMPL *session, WT_PAGE *page)
17971797
#define WT_MIN_SPLIT_COUNT 30
17981798
#define WT_MIN_SPLIT_MULTIPLIER 16 /* At level 2, we see 1/16th entries */
17991799
//通过level2大概算一下有多少KV及使用的内存,这样可以避免扫描所有KV影响性能
1800-
for (count = 0, size = 0, ins = ins_head->head[WT_MIN_SPLIT_DEPTH]; ins != NULL;
1800+
for (count2 = 0, size = 0, ins = ins_head->head[WT_MIN_SPLIT_DEPTH]; ins != NULL;
18011801
ins = ins->next[WT_MIN_SPLIT_DEPTH]) {
1802-
count += WT_MIN_SPLIT_MULTIPLIER;
1802+
count2 += WT_MIN_SPLIT_MULTIPLIER;
18031803
size += WT_MIN_SPLIT_MULTIPLIER * (WT_INSERT_KEY_SIZE(ins) + WT_UPDATE_MEMSIZE(ins->upd));
1804-
if (count > WT_MIN_SPLIT_COUNT && size > (size_t)btree->maxleafpage) {
1804+
if (count2 > WT_MIN_SPLIT_COUNT && size > (size_t)btree->maxleafpage) {
18051805
WT_STAT_CONN_DATA_INCR(session, cache_inmem_splittable);
1806-
printf("yang test ..__wt_leaf_page_can_split....sssssssssssssssss........count:%d..........size:%d................\r\n", (int)count, (int)size);
1806+
printf("yang test ..__wt_leaf_page_can_split....sssssssssssssssss........count2:%d..........size:%d................\r\n", (int)count2, (int)size);
18071807
return (true);
18081808
}
18091809
}
1810-
printf("yang test ..__wt_leaf_page_can_split....11111111111111........count:%d..........size:%d................\r\n", (int)count, (int)size);
1810+
1811+
printf("yang test ..__wt_leaf_page_can_split....11111111111111...page->memory_footprint:%d \
1812+
..btree->splitmempage:%d...count1:%d..........size:%d.....count2:%d...........\r\n",
1813+
(int)page->memory_footprint, (int)btree->splitmempage, (int)count1, (int)size, (int)count2);
18111814
return (false);
18121815
}
18131816

wiredtiger-11.1.0/wiredtiger-11.1.0/src/include/cache.h

+1
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ struct __wt_cache {
106106
uint64_t app_waits; /* User threads waited for cache */
107107
uint64_t app_evicts; /* Pages evicted by user threads */
108108

109+
//也就是历史最大的page->memory_footprint
109110
uint64_t evict_max_page_size; /* Largest page seen at eviction */
110111
struct timespec stuck_time; /* Stuck time */
111112

0 commit comments

Comments
 (0)