From bd22baf9adae1bda00e6b18c012c5db763aaee72 Mon Sep 17 00:00:00 2001 From: Scott Hernandez Date: Tue, 30 Dec 2014 14:39:19 -0500 Subject: SERVER-16502: better logging for kv_catalog collection metadata --- src/mongo/db/storage/kv/kv_catalog.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/mongo') diff --git a/src/mongo/db/storage/kv/kv_catalog.cpp b/src/mongo/db/storage/kv/kv_catalog.cpp index 213d68f9787..a5a37c69ede 100644 --- a/src/mongo/db/storage/kv/kv_catalog.cpp +++ b/src/mongo/db/storage/kv/kv_catalog.cpp @@ -252,8 +252,11 @@ namespace { BSONObj obj = _findEntry( opCtx, ns ); LOG(3) << " fetched CCE metadata: " << obj; BSONCollectionCatalogEntry::MetaData md; - if ( obj["md"].isABSONObj() ) - md.parse( obj["md"].Obj() ); + const BSONElement mdElement = obj["md"]; + if ( mdElement.isABSONObj() ) { + LOG(3) << "returning metadata: " << mdElement; + md.parse( mdElement.Obj() ); + } return md; } @@ -299,6 +302,7 @@ namespace { obj = b.obj(); } + LOG(3) << "recording new metadata: " << obj; StatusWith status = _rs->updateRecord( opCtx, loc, obj.objdata(), -- cgit v1.2.1