| 499 | } |
| 500 | |
| 501 | void BufferPool::Client::MoveToDirtyUnpinned(Page* page) { |
| 502 | // Only valid to unpin pages if spilling is enabled. |
| 503 | DCHECK(spilling_enabled()); |
| 504 | DCHECK_EQ(0, page->pin_count); |
| 505 | |
| 506 | unique_lock<mutex> lock(lock_); |
| 507 | DCHECK_CONSISTENCY(); |
| 508 | DCHECK(pinned_pages_.Contains(page)); |
| 509 | pinned_pages_.Remove(page); |
| 510 | dirty_unpinned_pages_.Enqueue(page); |
| 511 | |
| 512 | // Check if we should initiate writes for this (or another) dirty page. |
| 513 | WriteDirtyPagesAsync(); |
| 514 | } |
| 515 | |
| 516 | Status BufferPool::Client::StartMoveToPinned(ClientHandle* client, Page* page) { |
| 517 | unique_lock<mutex> cl(lock_); |