Skip to content

Commit f52a4ad

Browse files
committed
SERVER-16740 Log contents instead of pointer address in shardCollection failure
1 parent c887b10 commit f52a4ad

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/mongo/s/commands_admin.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -787,10 +787,10 @@ namespace mongo {
787787
WriteConcernOptions noThrottle;
788788
if (!chunk->moveAndCommit(to, Chunk::MaxChunkSize,
789789
&noThrottle, true, 0, moveResult)) {
790-
warning().stream()
791-
<< "Couldn't move chunk " << chunk << " to shard " << to
792-
<< " while sharding collection " << ns << ". Reason: "
793-
<< moveResult << endl;
790+
warning() << "couldn't move chunk " << chunk->toString()
791+
<< " to shard " << to
792+
<< " while sharding collection " << ns
793+
<< ". Reason: " << moveResult;
794794
}
795795
}
796796

@@ -811,10 +811,10 @@ namespace mongo {
811811
if ( ! subSplits.empty() ){
812812
Status status = currentChunk->multiSplit(subSplits, NULL);
813813
if ( !status.isOK() ){
814-
warning().stream()
815-
<< "Couldn't split chunk " << currentChunk
816-
<< " while sharding collection " << ns << ". Reason: "
817-
<< status << endl;
814+
warning() << "couldn't split chunk "
815+
<< currentChunk->toString()
816+
<< " while sharding collection " << ns
817+
<< causedBy(status);
818818
}
819819
subSplits.clear();
820820
}

0 commit comments

Comments
 (0)