> On 26/05/2016, at 3:17 AM, Jeffrey Mattox <[email protected]> wrote:
> 
> This page:
> https://www.sqlite.org/wal.html
> Contains the phrase, "... the checkpoint must stop when it reaches a page in 
> the WAL that is past the read mark of any current reader."
> 
> The term, "read mark" is not defined on that page.  Should that be "end mark”?

It appears the page has already been edited to that effect, but it doesn’t make 
sense now.

"A checkpoint can run concurrently with readers, however the checkpoint must 
stop when it reaches a page in the WAL that is past the end mark of any current 
reader. The checkpoint has to stop at that point because otherwise it might 
overwrite part of the database file that the reader is actively using.”

Readers are actively using pages BEFORE the end mark.

The previous text was correct, but the term “read mark” needs to be documented.

Looking at the source code, there are two points involved in each read lock for 
WAL mode: aReadMark[K] specifies the start of the read lock (which I assume can 
increase as the read progresses, but I haven’t looked deeper to confirm that), 
and mxFrame for the reader specifies the upper bound (which will be the "end 
mark” in the documentation).

Checkpointing can operate on frame numbers that are less than or equal to the 
minimum used aReadMark[].

_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to