[SERVER-2185] writes can occur during a query Created: 07/Dec/10  Updated: 05/Apr/17  Resolved: 03/Dec/16

Status: Closed
Project: Core Server
Component/s: Storage
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Dwight Merriman Assignee: Eliot Horowitz (Inactive)
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

see below should be easy to correct.

mongod.exe!mongo::sayDbContext(const char * errmsg) Line 167 C++
mongod.exe!mongo::asserted(const char * msg, const char * file,
unsigned int line) Line 79 + 0x7 bytes C++
mongod.exe!mongo::MongoMutex::assertWriteLocked() Line 46 + 0x1d bytes C++
mongod.exe!mongo::dur::CommitJob::noteOp(boost::shared_ptr<mongo::dur::DurOp>
p) Line 112 C++
mongod.exe!mongo::dur::createdFile(std::basic_string<char,std::char_traits<char>,std::allocator<char>
> filename, unsigned __int64 len) Line 81 C++
mongod.exe!mongo::MongoMMF::create(std::basic_string<char,std::char_traits<char>,std::allocator<char>
> fname, unsigned __int64 & len, bool sequentialHint) Line 172 + 0x29
bytes C++
mongod.exe!mongo::MongoDataFile::open(const char * filename, int
minSize, bool preallocateOnly) Line 383 + 0x28 bytes C++
mongod.exe!mongo::Database::getFile(int n, int sizeNeeded, bool
preallocateOnly) Line 118 C++
mongod.exe!mongo::DataFileMgr::getExtent(const mongo::DiskLoc & dl)
Line 441 + 0x2e bytes C++
mongod.exe!mongo::DataFileMgr::findAll(const char * ns, const
mongo::DiskLoc & startLoc) Line 628 + 0x9 bytes C++
mongod.exe!mongo::findTableScan(const char * ns, const
mongo::BSONObj & order, const mongo::DiskLoc & startLoc) Line 674 +
0x11 bytes C++
mongod.exe!mongo::QueryPlan::newCursor(const mongo::DiskLoc &
startLoc, int numWanted) Line 200 + 0x20 bytes C++
mongod.exe!mongo::UserQueryOp::_init() Line 657 + 0x3d bytes C++
mongod.exe!mongo::QueryOp::init() Line 115 + 0xf bytes C++
mongod.exe!mongo::QueryPlanSet::Runner::initOp(mongo::QueryOp & op)
Line 643 + 0xf bytes C++
mongod.exe!mongo::QueryPlanSet::Runner::run() Line 580 + 0x15 bytes C++
mongod.exe!mongo::QueryPlanSet::runOp(mongo::QueryOp & op) Line 488
+ 0xc bytes C++
mongod.exe!mongo::MultiPlanScanner::runOpOnce(mongo::QueryOp & op)
Line 706 + 0x1a bytes C++
mongod.exe!mongo::MultiPlanScanner::runOp(mongo::QueryOp & op) Line
722 + 0x10 bytes C++
mongod.exe!mongo::MultiPlanScanner::runOp<mongo::UserQueryOp>(mongo::UserQueryOp
& op) Line 288 + 0x13 bytes C++
> mongod.exe!mongo::runQuery(mongo::Message & m, mongo::QueryMessage & q, mongo::CurOp & curop, mongo::Message & result) Line 1108 + 0x20 bytes C++
mongod.exe!mongo::receivedQuery(mongo::Client & c, mongo::DbResponse
& dbresponse, mongo::Message & m) Line 172 + 0x20 bytes C++
mongod.exe!mongo::assembleResponse(mongo::Message & m,
mongo::DbResponse & dbresponse, const mongo::SockAddr & client) Line
279 + 0x11 bytes C++
mongod.exe!mongo::DBDirectClient::call(mongo::Message & toSend,
mongo::Message & response, bool assertOk) Line 639 + 0x12 bytes C++
mongod.exe!mongo::DBClientCursor::init() Line 52 + 0x2a bytes C++
mongod.exe!mongo::DBClientBase::query(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
ns, mongo::Query query, int nToReturn, int nToSkip, const
mongo::BSONObj * fieldsToReturn, int queryOptions, int batchSize)
Line 572 + 0xf bytes C++
mongod.exe!mongo::DBDirectClient::query(const
std::basic_string<char,std::char_traits<char>,std::allocator<char> > &
ns, mongo::Query query, int nToReturn, int nToSkip, const
mongo::BSONObj * fieldsToReturn, int queryOptions) Line 657 + 0x46
bytes C++
mongod.exe!mongo::clearTmpCollections() Line 450 + 0x82 bytes C++
mongod.exe!mongo::_initAndListen(int listenPort, const char *
appserverLoc) Line 558 C++
mongod.exe!mongo::initAndListen(int listenPort, const char *
appserverLoc) Line 601 + 0x14 bytes C++
mongod.exe!main(int argc, char * * argv) Line 1100 + 0x12 bytes C++
mongod.exe!__tmainCRTStartup() Line 555 + 0x19 bytes C
mongod.exe!mainCRTStartup() Line 371 C



 Comments   
Comment by Aaron Staple [ 24/Mar/11 ]

@eliot - So in our current architecture, when we load data from a DiskLoc that is not mapped into memory we open the requested file if it exists and create it anew if it does not exist. But if we have a bad DiskLoc for some reason or the user has removed one of their data files this can create a file improperly. Do we want to guard against this? (I haven't yet studied how long this would take.)

Comment by Aaron Staple [ 08/Dec/10 ]

It looks like in this case we are just opening a file. I can also do an audit to see if there are any bad cases. One possible scenario is if we have corruption we might have a bad diskloc somewhere referencing a file that doesn't exist. Then this code path might create a new file (but I haven't checked carefully on this yet.)

Comment by Dwight Merriman [ 07/Dec/10 ]

this report may be invalid. i think MongoMMF::create opens existing files. i will leave open until someone checks...

Generated at Thu Feb 08 02:59:13 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.