mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
aboutToDelete / checkLocation issue.
This commit is contained in:
parent
4669f5d10b
commit
f6c30d15f0
@ -485,7 +485,7 @@ DiskLoc BtreeBucket::advance(const DiskLoc& thisLoc, int& keyOfs, int direction,
|
||||
if( keyOfs < 0 || keyOfs >= n ) {
|
||||
cout << "ASSERT failure BtreeBucket::advance, caller: " << caller << endl;
|
||||
cout << " thisLoc: " << thisLoc.toString() << endl;
|
||||
cout << " keyOfs: " << keyOfs << " direction: " << direction << endl;
|
||||
cout << " keyOfs: " << keyOfs << " n:" << n << " direction: " << direction << endl;
|
||||
cout << bucketSummary() << endl;
|
||||
assert( keyOfs >= 0 && keyOfs < n );
|
||||
}
|
||||
|
@ -34,6 +34,10 @@ void aboutToDelete(const DiskLoc& dl) {
|
||||
if( it != cursorsByLocation.end() ) {
|
||||
ClientCursor *cc = it->second;
|
||||
assert( !cc->c->eof() );
|
||||
|
||||
// dm testing attempt
|
||||
cc->c->checkLocation();
|
||||
|
||||
cc->c->advance();
|
||||
cc->updateLocation();
|
||||
}
|
||||
|
@ -205,12 +205,18 @@ void newNamespace(const char *ns) {
|
||||
|
||||
void PhysicalDataFile::open(int fn, const char *filename) {
|
||||
int length;
|
||||
/*TEMP!
|
||||
if( fn <= 48 ) {
|
||||
length = 16 * 1024 * 1024;
|
||||
}
|
||||
else */
|
||||
if( fn <= 4 ) {
|
||||
length = (64*1024*1024) << fn;
|
||||
if( strstr(filename, "alleyinsider") && length < 512 * 1024 * 1024 )
|
||||
length = 512 * 1024 * 1024;
|
||||
} else
|
||||
length = 0x7ff00000;
|
||||
|
||||
assert( length >= 64*1024*1024 && length % 4096 == 0 );
|
||||
|
||||
assert(fn == fileNo);
|
||||
@ -565,7 +571,7 @@ void _indexRecord(IndexDetails& idx, JSObj& obj, DiskLoc newRecordLoc) {
|
||||
set<JSObj> keys;
|
||||
idx.getKeysFromObject(obj, keys);
|
||||
for( set<JSObj>::iterator i=keys.begin(); i != keys.end(); i++ ) {
|
||||
// cout << "_indexRecord " << i->toString() << endl;
|
||||
// cout << "temp: _indexRecord " << i->toString() << endl;
|
||||
assert( !newRecordLoc.isNull() );
|
||||
idx.head.btree()->insert(idx.head, idx.indexNamespace().c_str(), newRecordLoc,
|
||||
(JSObj&) *i, false, idx, true);
|
||||
|
@ -313,7 +313,13 @@ public:
|
||||
}
|
||||
|
||||
PhysicalDataFile* getFile(int n) {
|
||||
assert( n >= 0 && n < 100000 );
|
||||
if( 0 )
|
||||
assert(false);
|
||||
|
||||
if( n < 0 || n >= 100000 ) {
|
||||
cout << "getFile(): n=" << n << endl;
|
||||
assert( n >= 0 && n < 100000 );
|
||||
}
|
||||
#if defined(_DEBUG)
|
||||
if( n > 100 )
|
||||
cout << "getFile(): n=" << n << "?" << endl;
|
||||
|
Loading…
Reference in New Issue
Block a user