3 comments

[ 1.3 ms ] story [ 14.7 ms ] thread
What an odd thing! What's the purpose of that? This looks one case where a comment explaining the intention would add value.

Update: It seems that what it does is to only log 10% of errors... on average. Of course that also seems to make logs non-deterministic.

Yes a hack to stop someone spamming the same error from bringing the server down. Not the worst of Mongo hacks by far.
This is in the Java client, not core.