mirror of
https://github.com/MariaDB/server.git
synced 2025-02-02 12:01:42 +01:00
[t:3925], make change per discussion with engineers
git-svn-id: file:///svn/toku/tokudb@37948 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
6288f0660f
commit
ce0a76d6a7
1 changed files with 8 additions and 0 deletions
|
@ -2411,6 +2411,14 @@ int toku_cachetable_get_and_pin_nonblocking (
|
|||
{
|
||||
CACHETABLE ct = cf->cachetable;
|
||||
cachetable_lock(ct);
|
||||
//
|
||||
// Even though there is a risk that cachetable_wait_write may wait on a bunch
|
||||
// of I/O to complete, we call this with the ydb lock held, because if we
|
||||
// are in this situation where a lot of data is being evicted on writer threads
|
||||
// then we are in a screw case anyway, so it should be ok to hold the ydb lock,
|
||||
// until a bunch of data is written out.
|
||||
//
|
||||
cachetable_wait_write(ct);
|
||||
int count = 0;
|
||||
PAIR p;
|
||||
for (p = ct->table[fullhash&(ct->table_size-1)]; p; p = p->hash_chain) {
|
||||
|
|
Loading…
Add table
Reference in a new issue