Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix oplog replay segfault SERVER-4350

  • Loading branch information...
commit bd438596e1f9808663af9c476f0a08940b19df35 1 parent 2a44861
@erh erh authored
Showing with 2 additions and 1 deletion.
  1. +1 −0  db/dbhelpers.cpp
  2. +1 −1  db/oplog.cpp
View
1  db/dbhelpers.cpp
@@ -157,6 +157,7 @@ namespace mongo {
}
DiskLoc Helpers::findById(NamespaceDetails *d, BSONObj idquery) {
+ assert(d);
int idxNo = d->findIdIndex();
uassert(13430, "no _id index", idxNo>=0);
IndexDetails& i = d->idx( idxNo );
View
2  db/oplog.cpp
@@ -741,7 +741,7 @@ namespace mongo {
// of the form
// { _id:..., { x : {$size:...} }
// thus this is not ideal.
- else if( Helpers::findById(nsdetails(ns), updateCriteria).isNull() ) {
+ else if( nsdetails(ns) == NULL || Helpers::findById(nsdetails(ns), updateCriteria).isNull() ) {
failedUpdate = true;
}
else {
Please sign in to comment.
Something went wrong with that request. Please try again.