BFS: Write-lock the stream inode in BPlusTree::MakeEmpty().
I was experimenting with forcing the CheckVisitor to always rebuild all indices, when I got a KDL from a Tracker process that I had running a query in the background. The fault address was invalid (0x7b4493418), and the stack trace was bfs_read_query -> GetNextMatching -> TreeIterator::Traverse. That method read-locks inodes, and it looks like query references to inodes are managed correctly. This seems like the most plausible culprit for missing locks. I didn't manage to reproduce the KDL, unfortunately, but hopefully this resolves it nonetheless.
This commit is contained in:
@@ -853,6 +853,7 @@ BPlusTree::MakeEmpty()
|
|||||||
{
|
{
|
||||||
// Put all nodes into the free list in order
|
// Put all nodes into the free list in order
|
||||||
Transaction transaction(fStream->GetVolume(), fStream->BlockNumber());
|
Transaction transaction(fStream->GetVolume(), fStream->BlockNumber());
|
||||||
|
fStream->WriteLockInTransaction(transaction);
|
||||||
|
|
||||||
// Reset the header, and root node
|
// Reset the header, and root node
|
||||||
CachedNode cached(this);
|
CachedNode cached(this);
|
||||||
|
|||||||
Reference in New Issue
Block a user