MongoDB Java Connection driver

1143015 pts.
Tags:
Big Data
Java
MongoDB
I'm pretty new to MongoDB and I'm trying to figure out how to use the below code for its Java Connection driver. Why does it use a random number generator?
if (!((_ok) ? true : (Math.random() > 0.1))) {
    return res;
}
Thanks!
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

The original idea behind that was to only show 10% of server errors, to not spam the log, without using a Timer or other method of filtering.

Owner at DreamBot

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: