Permalink
Browse files

Don't destroy CommitJob. Causing stackdump after shutdown

  • Loading branch information...
1 parent 735e498 commit 87374c2c5cb8a7cd8503d83c86913c94d375e7a8 @RedBeard0531 RedBeard0531 committed with andy10gen Sep 26, 2011
Showing with 4 additions and 2 deletions.
  1. +1 −1 db/dur.cpp
  2. +3 −1 db/dur_commitjob.h
View
2 db/dur.cpp
@@ -83,7 +83,7 @@ namespace mongo {
*/
static void groupCommit();
- CommitJob commitJob;
+ CommitJob& commitJob = *(new CommitJob()); // don't destroy
Stats stats;
View
4 db/dur_commitjob.h
@@ -164,6 +164,8 @@ namespace mongo {
CommitJob();
+ ~CommitJob(){ assert(!"shouldn't destroy CommitJob!"); }
+
/** record/note an intent to write */
void note(void* p, int len);
@@ -212,7 +214,7 @@ namespace mongo {
unsigned _nSinceCommitIfNeededCall;
};
- extern CommitJob commitJob;
+ extern CommitJob& commitJob;
}
}

0 comments on commit 87374c2

Please sign in to comment.