From 76bd2b46454ff6a9261ef3d02ce63d0b1ae8714c Mon Sep 17 00:00:00 2001 From: dwight Date: Sun, 1 Aug 2010 11:42:16 -0400 Subject: [PATCH] rs better diags --- db/repl/health.cpp | 13 ++++++++----- db/repl/rs_initialsync.cpp | 4 ++++ db/repl/rs_rollback.cpp | 8 ++++++-- db/repl/rs_sync.cpp | 11 +++++++---- 4 files changed, 25 insertions(+), 11 deletions(-) diff --git a/db/repl/health.cpp b/db/repl/health.cpp index e517ff0a900..2a45571f968 100644 --- a/db/repl/health.cpp +++ b/db/repl/health.cpp @@ -139,10 +139,11 @@ namespace mongo { be e = op["ts"]; if( e.type() == Date || e.type() == Timestamp ) { OpTime ot = e._opTime(); - ss << td( a("",ot.toString(),ot.toStringPretty()) ); + ss << td( time_t_to_String_short( ot.getSecs() ) ); + ss << td( ot.toString() ); skip.insert("ts"); } - else ss << td("?"); + else ss << td("?") << td("?"); e = op["h"]; if( e.type() == NumberLong ) { @@ -183,7 +184,7 @@ namespace mongo { ScopedConn conn(m->fullName()); auto_ptr c = conn->query(rsoplog, Query().sort("$natural",1), 20, 0, &fields); - static const char *h[] = {"ts","h","op","ns","rest",0}; + static const char *h[] = {"ts","optime", "h","op","ns","rest",0}; ss << "