TryGetMultiValueTree() private method

private TryGetMultiValueTree ( Voron.Trees.Tree tree, MemorySlice key, Voron.Trees.Tree &mvTree ) : bool
tree Voron.Trees.Tree
key MemorySlice
mvTree Voron.Trees.Tree
return bool
Esempio n. 1
0
		private Tree OpenOrCreateMultiValueTree(Transaction tx, Slice key, NodeHeader* item)
		{
			Tree tree;
			if (tx.TryGetMultiValueTree(this, key, out tree))
				return tree;

			var childTreeHeader =
				(TreeRootHeader*)((byte*)item + item->KeySize + Constants.NodeHeaderSize);
			Debug.Assert(childTreeHeader->RootPageNumber < tx.State.NextPageNumber);
			tree = childTreeHeader != null ?
				Open(tx, childTreeHeader) :
				Create(tx);

			tx.AddMultiValueTree(this, key, tree);
			return tree;
		}