Sets p->dirty and p->LSN appropriately; checks their consistency.
This commit is contained in:
parent
918fb9d375
commit
5972fcc549
1 changed files with 7 additions and 1 deletions
|
@ -63,6 +63,10 @@ void pageRead(Page *ret) {
|
||||||
abort();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ret->dirty = 0;
|
||||||
|
ret->LSN = *lsn_ptr(ret);
|
||||||
|
|
||||||
pthread_mutex_unlock(&stable_mutex);
|
pthread_mutex_unlock(&stable_mutex);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -80,7 +84,9 @@ void pageWrite(Page * ret) {
|
||||||
/* assert(ret->pending == 0); */
|
/* assert(ret->pending == 0); */
|
||||||
|
|
||||||
// If necessary, force the log to disk so that ret's LSN will be stable.
|
// If necessary, force the log to disk so that ret's LSN will be stable.
|
||||||
LogForce(pageReadLSN(ret));
|
|
||||||
|
assert(ret->LSN == pageReadLSN(ret));
|
||||||
|
LogForce(ret->LSN);
|
||||||
|
|
||||||
pthread_mutex_lock(&stable_mutex);
|
pthread_mutex_lock(&stable_mutex);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue