Writes in MongoDB are persisted before the server returns acknowledgement. For a typical replica set deployment, this additionally means replicated and made durable on disk for a majority of nodes.
MongoDB has tunable durability guarantees; clients can opt-out of this behavior.
The layers are deep, but this is the function that handles waiting before acknowledgement:
I think there's a meta argument encoded in the sampling bias discussion. That being: some people want to expose NPR as just another media center that produces watered down content labeled as science with a complete lack of journalistic integrity. Other people want to believe NPR and perhaps a few other select content producers are publishing articles such as this with the utmost respect to the material. I.e. Things like page views are not considered when it comes to telling a somewhat complete version of the story.
I think this case falls under the lack of journalistic integrity, regardless of whether the overall claim is right or wrong. My view is that when a science article wants introduce the idea that reality may be different than conventionally believed, the goal should be to write an (at least mildly) well rounded, informative piece, not a strictly persuasive piece. When the first response in hundreds of armchair physicists' minds around the world is surprise that selection bias wasn't even mentioned (mine included), I think it's fair to say the article falls more into the persuasive category.
Whoa. That should have set off alarm bells when being reviewed. Changing errno return values just because? And a counter-change in another place to put the changed errno back to the original.
I'd accept that from an intern. Any grown-up that did it would get a talking to, though not in public.
Despite not knowing anything about your dataset and insertion/deletion patterns, you may want to consider power of two allocation. It's a new feature in 2.2 that costs some additional disk space up front (new documents potentially get 2x padding), but can save a lot of disk over the long run by eliminating many data access patterns that add to fragmentation. One (pathological) benchmark I ran saved 800x the disk space after 1,000K (edited from 100K), insertions and deletes of 1-10KB documents.
N.B. I use the term employer throughout where it really can also mean manager or generally anyone responsible for figuring out what employees would value as compensation/perks.
One thing I've noticed being an employee is that when employers try to get feedback in how to compensate their employees or what kind of perks they can additionally offer the question asked is usually, "Is there anything I can do to make you happy?" That question is vague and oftentimes sounds like it should be answered in the negative. The employee doesn't want to look needy of course. Instead, the employer should ask, "Hey, are you happy with your hardware? You've been messing a lot with databases lately. Do you have enough RAM? Do you want some extra disks to mess with different RAIDs or filesystems?" or maybe, "Do you think we should get developers a second monitor? I really don't mind spending the money, it just never occured to me until now that it might be useful." Once an employer actually opens up a dialogue with an explicit offer or idea, the feedback the employer wants to hear will much more likely flow naturally.
More specifically with a topic such as health insurance, I as an employee need to be given some idea of what options are on the table when it comes to "improving" my health insurance plan. Are we talking about the employer paying more of the insurance or perhaps am I concerned about the lack of a plan that offers an unlimited lifetime benefits clause.
I feel my job as an employee is to do work that adds value to the company. If the company wants to genuinely add value to my well-being, but wants it to be more thoughtful or mutually beneficial than a raise, the ball's in their court to be creative and come up with a list of starter ideas. Now I'm not averse to thinking of what would be useful, but a vague email, or even a 1 on 1 asking me what can be improved is unfortunately not going to get any feedback because my mind really won't turn its attention to thinking about that for the time necessary. A personal anecdote offered in lesson form:
A CEO of a startup may hold a discussion on company offered stock options, to fill in people on how it works on a compensation level. When questions come up that the CEO does not feel comfortable answering (considering he's not a certified accountant), a normal CEO will advise you to ask an accountant (accountant? I'm 22 years old, I don't have an accountant, should I take off work hours to find an accountant, go to an accountant and ask him/her?). A creative CEO will get an accountant in the office for a day and schedule those with questions to have a 1 on 1 meeting.
In fairness to the rest of the article, in Listing 9 the author does protect the call to empty() with (the same) lock and also moves the condition inside of a while loop.
For what it's worth, I had used MySQL on a table with ~20 million rows and doing a count on an index would also be extremely slow. I put in triggers to do counts which worked perfectly for 99% of the sites, but there was some issue (either a bug or programmer error, never figured out which), but a handful of rows on this count table would claim there were a negative number of rows for a given query. (Any row with a negative number was typically zero a count of zero in the real table. In the cases where it was not zero, it was very close to it).
With an acquisition I went through, none of the unvested options (after acceleration) turned into anything (meaning those remaining shares were never issued/created). However the acquiring company put forth their own stock incentive plan in hopes of retaining employees.
A lot of the arguments I hear about why making jokes of women in computer fields is wrong is that these jokes make women (and some men) uncomfortable which is irreproachably wrong.
I couldn't respond to the thread directly on google because I was uncomfortable expressing any sympathy for Adam. I felt people I know would judge me in a negative light if they saw it in their feed. I feel here, the thin layer of anonymity/indirection is enough to say this small tidbit.
I don't think Adam woke up that morning, or any morning in fact, and thought to himself that he wants to hurt or harm anyone, physically or emotionally. I think Adam is a good person as are the vastly overwhelming majority of the human population.
I feel the continuation of being hostile towards him by some posters (including Shifra despite accepting the apology) after he apologized is unwarranted and furthermore, unproductive. Adam ate a huge piece of humble pie by posting that, regardless of whether the joke was meant in good faith or not and for others to come back with more negativity just encourages others that make a similar mistake in the future to not acknowledge it as such. People that want to participate in a reasonable debate focused on results can have their voices oppressed by a feeling of discomfort.
I'm not sure if I have anything of real value to add to the women in IT issue (and I'm sure most people that do also doubt the value of their own ideas), but I can say I am one person who is dissuaded of trying to help the issue because I don't want to offend people or alienate them and make them uncomfortable.
I feel the continuation of being hostile towards him by some posters (including Shifra despite accepting the apology) after he apologized is unwarranted and furthermore, unproductive.
I went through 22 months of withdrawal from medication fairly publicly while a member of an email list. I was incapable of keeping both feet out of my mouth and it seemed to not matter how hard I tried, things just came out all wrong. I wrote many heart-felt, sincere apologies. I had no agenda in terms of my public reputation or whatever. My only intent was to take genuine responsibility for my actions in spite of the burden I was living with and to try to take away whatever hurt I had done.
The result? I became the list scapegoat and if some asshole attacked me out of the blue for no apparent reason on some flimsy excuse, the entire list went "there she goes again!" It's been, oh, maybe six or eight years since then. Some of those folks have never forgiven me. I no longer feel responsible for their on-going hostility. They have a personal issue.
I'm a lot less apologetic than I used to be. Someone once said (in essence) that real justice must mean justice for both sides.
I saw the line you edited out. I hope that means there was some minor mis-communication because as far as I can tell, we're on the same side of the fence!
No miscommunication (that I'm aware of). It just seemed extraneous -- beating a dead horse. I'm the sort of person who "would have written a shorter letter, but didn't have that much time". So, yeah, I sometimes go back and snip a little. No big.
MongoDB has tunable durability guarantees; clients can opt-out of this behavior.
The layers are deep, but this is the function that handles waiting before acknowledgement:
https://github.com/mongodb/mongo/blob/20f42d9dc89999d119f35a...