Fixed misuse of Transaction::Split().
* This would cause "transaction too large" messages, and repairing the index would actually be thrown away. * We now properly finish/restart transactions instead which is actually working. * Removed the misleading Split() method altogether, as it's not even used anywhere (not very surprising given that it doesn't do what its name suggests).
This commit is contained in:
parent
0f94d73aaa
commit
55e5a42d73
@ -797,9 +797,12 @@ BPlusTree::MakeEmpty()
|
||||
|
||||
node->overflow_link = HOST_ENDIAN_TO_BFS_INT64((uint64)BPLUSTREE_FREE);
|
||||
|
||||
// It's not important to write it out in a single transaction
|
||||
if (transaction.IsTooLarge())
|
||||
transaction.Split();
|
||||
// It's not important to write it out in a single transaction; just
|
||||
// make sure it doesn't get too large
|
||||
if (offset % (1024 * 1024) == 0) {
|
||||
transaction.Done();
|
||||
transaction.Start(fStream->GetVolume(), fStream->BlockNumber());
|
||||
}
|
||||
}
|
||||
|
||||
return transaction.Done();
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2010, Axel Dörfler, axeld@pinc-software.de.
|
||||
* Copyright 2001-2012, Axel Dörfler, axeld@pinc-software.de.
|
||||
* This file may be used under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef JOURNAL_H
|
||||
@ -178,12 +178,6 @@ public:
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
void Split()
|
||||
{
|
||||
cache_start_sub_transaction(fJournal->GetVolume()->BlockCache(),
|
||||
fJournal->TransactionID());
|
||||
}
|
||||
|
||||
Volume* GetVolume() const
|
||||
{ return fJournal != NULL ? fJournal->GetVolume() : NULL; }
|
||||
int32 ID() const
|
||||
|
Loading…
Reference in New Issue
Block a user