@@ -50,31 +50,19 @@ namespace mongo {
5050
5151 MONGO_EXPORT_SERVER_PARAMETER (failIndexKeyTooLong, bool , true );
5252
53- /* *
54- * Invalidates all active cursors, which point at the bucket being deleted.
55- */
56- class InvalidateCursorsNotification : public BucketDeletionNotification {
57- public:
58- virtual void aboutToDeleteBucket (const DiskLoc& bucket) {
59- BtreeIndexCursor::aboutToDeleteBucket (bucket);
60- }
61- };
53+ void BtreeBasedAccessMethod::InvalidateCursorsNotification::aboutToDeleteBucket (
54+ const DiskLoc& bucket) {
55+ BtreeIndexCursor::aboutToDeleteBucket (bucket);
56+ }
6257
63- static InvalidateCursorsNotification invalidateCursors;
58+ BtreeBasedAccessMethod:: InvalidateCursorsNotification BtreeBasedAccessMethod:: invalidateCursors;
6459
6560 BtreeBasedAccessMethod::BtreeBasedAccessMethod (IndexCatalogEntry* btreeState,
66- RecordStore* recordStore )
61+ BtreeInterface* btree )
6762 : _btreeState(btreeState),
68- _recordStore ( recordStore ),
69- _descriptor(btreeState->descriptor ()) {
70-
63+ _descriptor (btreeState->descriptor ()),
64+ _newInterface(btree) {
7165 verify (0 == _descriptor->version () || 1 == _descriptor->version ());
72- _newInterface.reset (BtreeInterface::getInterface (btreeState->headManager (),
73- recordStore,
74- btreeState->ordering (),
75- _descriptor->indexNamespace (),
76- _descriptor->version (),
77- &invalidateCursors));
7866 }
7967
8068 // Find the keys for obj, put them in the tree pointing to loc
@@ -224,7 +212,7 @@ namespace mongo {
224212
225213
226214 Status BtreeBasedAccessMethod::touch ( OperationContext* txn ) const {
227- return _recordStore ->touch ( txn, NULL );
215+ return _btree ->touch (txn);
228216 }
229217
230218 DiskLoc BtreeBasedAccessMethod::findSingle (const BSONObj& key) const {
0 commit comments