33 #include "mongo/db/json.h" 60 virtual void setHead(OperationContext*
opCtx,
const RecordId newHead) {
73 template <
class OnDiskFormat>
89 template <
class OnDiskFormat>
120 void makeTree(
const std::string& spec);
125 void checkStructure(
const std::string& spec)
const;
135 int fillBucketToExactSize(
const DiskLoc bucketLoc,
int targetSize,
char startKey);
138 DiskLoc makeTree(
const BSONObj& spec);
140 void checkStructure(
const BSONObj& spec,
const DiskLoc node)
const;
142 bool isPresent(
const BSONObj& key,
int direction)
const;
144 static std::string expectedKey(
const char* spec);
HeapRecordStoreBtree recordStore
Definition: btree_test_help.h:79
Copyright (C) 2014 MongoDB Inc.
Definition: bson_collection_catalog_entry.cpp:38
DiskLoc dummyDiskLoc
Definition: btree_test_help.h:82
BSONObj key
Definition: btree_interface.cpp:334
represents a disk location/offset on disk in a database.
Definition: diskloc.h:53
BtreeLogic< OnDiskFormat >::KeyDataOwnedType KeyDataOwnedType
Definition: btree_test_help.h:93
OperationContext * _opCtx
Definition: btree_test_help.h:146
BtreeLogic< OnDiskFormat >::KeyHeaderType KeyHeaderType
Definition: btree_test_help.h:94
BtreeLogic< OnDiskFormat >::BucketType BucketType
Definition: btree_test_help.h:92
BSONObj simpleKey(char c, int n)
Generates key on a field 'a', with the specified number of repetitions of the character.
Definition: btree_test_help.cpp:52
This structure encapsulates a Btree and all the infrastructure needed by it (head manager...
Definition: btree_test_help.h:74
string bigNumString(long long n, int len)
Generates a string of the specified length containing repeated concatenation of the hexadecimal repre...
Definition: btree_test_help.cpp:42
RecordId _head
Definition: btree_test_help.h:65
A RecordStore that stores all data on the heap.
Definition: heap_record_store_btree.h:45
OnDiskFormat::FixedWidthKeyType FixedWidthKeyType
Definition: btree_test_help.h:96
Simple head manager, which performs no validity checking or persistence.
Definition: btree_test_help.h:54
std::unique_ptr< KVHarnessHelper > helper
Definition: kv_engine_test_timestamps.cpp:204
TestHeadManager headManager
Definition: btree_test_help.h:78
virtual void setHead(OperationContext *opCtx, const RecordId newHead)
Definition: btree_test_help.h:60
BtreeLogic< OnDiskFormat > btree
Definition: btree_test_help.h:81
virtual const RecordId getHead(OperationContext *opCtx) const
Definition: btree_test_help.h:56
Tool to construct custom tree shapes for tests.
Definition: btree_logic.h:52
std::unique_ptr< KVHarnessHelper > _helper
Definition: kv_catalog_feature_tracker_test.cpp:101
SavedCursorRegistry cursorRegistry
Definition: btree_test_help.h:80
ArtificialTreeBuilder(OperationContext *opCtx, BtreeLogicTestHelper< OnDiskFormat > *helper)
The tree builder wraps around the passed-in helper and will invoke methods on it. ...
Definition: btree_test_help.h:103
An abstraction for setting and getting data about the 'head' of an index.
Definition: head_manager.h:41
OperationContext * _opCtx
Definition: ephemeral_for_test_btree_impl.cpp:447
Collection *const OperationContext *const opCtx
Definition: collection_impl.cpp:80
Class that stores active cursors that have been saved (as part of yielding) to allow them to be inval...
Definition: record_store_v1_base.h:104
BtreeLogicTestHelper< OnDiskFormat > * _helper
Definition: btree_test_help.h:147