Free all the 'buffers' and clear the vector. If 'randomize_core' is true, will switch thread between cores randomly before each free.
| 267 | /// If 'randomize_core' is true, will switch thread between cores randomly before |
| 268 | /// each free. |
| 269 | void FreeBuffers(BufferPool* pool, BufferPool::ClientHandle* client, |
| 270 | vector<BufferPool::BufferHandle>* buffers, bool randomize_core = false) { |
| 271 | for (auto& buffer : *buffers) { |
| 272 | if (randomize_core) CpuTestUtil::PinToRandomCore(&rng_); |
| 273 | pool->FreeBuffer(client, &buffer); |
| 274 | } |
| 275 | buffers->clear(); |
| 276 | } |
| 277 | |
| 278 | Status PinAll(BufferPool* pool, ClientHandle* client, vector<PageHandle>* pages) { |
| 279 | for (auto& page : *pages) RETURN_IF_ERROR(pool->Pin(client, &page)); |
nothing calls this directly
no test coverage detected