void IndexCatalogEntry::setMultikey() { if ( isMultikey() ) return; NamespaceDetails* nsd = _collection->detailsWritable(); int idxNo = _indexNo(); if ( nsd->setIndexIsMultikey( idxNo, true ) ) { LOG(1) << _collection->ns().ns() << ": clearing plan cache - index " << _descriptor->keyPattern() << " set to multi key."; _collection->infoCache()->clearQueryCache(); } _isMultikey = true; }
void IndexCatalogEntry::setMultikey( OperationContext* txn ) { if ( isMultikey( txn ) ) return; if ( _collection->setIndexIsMultikey( txn, _descriptor->indexName(), true ) ) { if ( _infoCache ) { LOG(1) << _ns << ": clearing plan cache - index " << _descriptor->keyPattern() << " set to multi key."; _infoCache->clearQueryCache(); } } _isMultikey = true; }