More reconciliation question

30 views
Skip to first unread message

Matan Tennenhaus

unread,
Mar 27, 2024, 12:52:36 PMMar 27
to wiredtiger-users
Thanks for the answers. I apologize for posting again in a new thread, comments are deleted automatically.
Chenhao Qu‏, as you mentioned, a page can be reconciled again for eviction. I am speaking about pages that have same write generation number as before, meaning of course the same K/V pairs and, and they are dirty again as you explained.
1)If a checkpoint reconciles a page and it stays in memory as is, will a future reader for a key that was updated (and it needs the original value) get it from the same old cell page in the memory or from someplace else?(HS?) In other words are page cells that were updated in reconciliation and stayed in mem are accessible for readers?
2) I see that for in the same scenario, in the first reconciliation the page state is WT_REF_MEM, and the rec_result is 0, and in the second time for the same page the page state is WT_REF_LOCKED and the rec_result is WT_PM_REC_REPLACE. Can you shed some light for this values meaning - why the ref was not locked in the first time and changed for the second time, and what the rec_result value means?

Again, much appreciate your answers, they are big help for me.
Matan.

Chenhao Qu

unread,
Mar 27, 2024, 6:23:07 PMMar 27
to wiredtig...@googlegroups.com
Hi Matan

1)If a checkpoint reconciles a page and it stays in memory as is, will a future reader for a key that was updated (and it needs the original value) get it from the same old cell page in the memory or from someplace else?(HS?) In other words are page cells that were updated in reconciliation and stayed in mem are accessible for readers?

If the page stays in memory, the reader will still get the data from the in-memory page so they are accessible for readers.

2) I see that for in the same scenario, in the first reconciliation the page state is WT_REF_MEM, and the rec_result is 0, and in the second time for the same page the page state is WT_REF_LOCKED and the rec_result is WT_PM_REC_REPLACE. Can you shed some light for this values meaning - why the ref was not locked in the first time and changed for the second time, and what the rec_result value means?

The ref is not locked because it is the checkpoint doing reconciliation. It doesn’t need exclusive access. The second time it’s eviction doing reconciliation, it needs exclusive access to the page so it locks the ref. There are several possibilities for the rec_result:

     * WT_PM_REC_EMPTY the new reconciled page is an empty page
     * WT_PM_REC_MULTIBLOCK we reconcile the page into multiple split pages
     * WT_PM_REC_REPLACE we reconcile the page into a single page

Hopefully this is clear to you

Thanks
Chenhao

--
You received this message because you are subscribed to the Google Groups "wiredtiger-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wiredtiger-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/wiredtiger-users/ad8bc964-2540-48eb-8192-dd855202f099n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages