diff options
author | Kristina <kristina@10gen.com> | 2012-02-10 13:47:10 -0500 |
---|---|---|
committer | Kristina <kristina@10gen.com> | 2012-02-13 10:28:13 -0500 |
commit | 23cbe7d09c0370d61367c1da65ab4a944370edd1 (patch) | |
tree | 7aa1b39d422c8bda29c0a3d3defcbe8c8ec5a824 /src | |
parent | 2d8237e652e2875fb829e9604f79fccb1643f241 (diff) | |
download | mongo-23cbe7d09c0370d61367c1da65ab4a944370edd1.tar.gz |
Added array of success/failures to applyOps output SERVER-4259
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/oplog.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/oplog.cpp b/src/mongo/db/oplog.cpp index 2f9562c9f42..8c0cb3a2970 100644 --- a/src/mongo/db/oplog.cpp +++ b/src/mongo/db/oplog.cpp @@ -861,14 +861,16 @@ namespace mongo { // apply int num = 0; BSONObjIterator i( ops ); + BSONArrayBuilder ab; while ( i.more() ) { BSONElement e = i.next(); - // todo SERVER-4259 ? - applyOperation_inlock( e.Obj() , false ); + bool failed = applyOperation_inlock( e.Obj() , false ); + ab.append(!failed); num++; } result.append( "applied" , num ); + result.append( "results" , ab.arr() ); if ( ! fromRepl ) { // We want this applied atomically on slaves |