mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
[t:2506] [t:2507] Fix metadata (size writing) during write_pair_for_checkpoint
Also initialize the work item in the pair even if we actually are writing it. Fix crash in getting size of empty FILENUMS git-svn-id: file:///svn/toku/tokudb@19200 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
43aea2f126
commit
fffb7ba30a
2 changed files with 5 additions and 1 deletions
|
@ -1356,9 +1356,12 @@ write_pair_for_checkpoint (CACHETABLE ct, PAIR p)
|
|||
assert(ct->size_writing>=0);
|
||||
p->write_me = TRUE;
|
||||
p->remove_me = FALSE;
|
||||
workitem_init(&p->asyncwork, NULL, p);
|
||||
cachetable_write_pair(ct, p); // releases the write lock on the pair
|
||||
}
|
||||
else if (p->cq) {
|
||||
assert(ct->size_writing>=0);
|
||||
ct->size_writing += p->size; //cachetable_complete_write_pair will reduce by p->size
|
||||
workitem_init(&p->asyncwork, NULL, p);
|
||||
workqueue_enq(p->cq, &p->asyncwork, 1);
|
||||
}
|
||||
|
|
|
@ -177,7 +177,8 @@ static inline int toku_logsizeof_TXNID (TXNID txnid __attribute__((__unused__)))
|
|||
}
|
||||
|
||||
static inline int toku_logsizeof_FILENUMS (FILENUMS fs) {
|
||||
return 4 + fs.num * toku_logsizeof_FILENUM(fs.filenums[0]);
|
||||
static const FILENUM f; //fs could have .num==0 and then we cannot dereference
|
||||
return 4 + fs.num * toku_logsizeof_FILENUM(f);
|
||||
}
|
||||
|
||||
static inline int toku_logsizeof_BYTESTRING (BYTESTRING bs) {
|
||||
|
|
Loading…
Add table
Reference in a new issue