Ch. 4 Ticket: Timeout Deprecated Answer?

I completed the “Ticket: Timeouts” from chapter 4 and based on documentation syntax differs from the example provided which appears deprecated?

Also, is w="majority" necessary before specifying the write timeout value?

@Kyle_89075 Best to exclude the answer so that other students don’t get to see it?

Good call. Removed the answer reference.

1 Like

No, it’s not necessary for this ticket. That’s to do with Write Concern, not timeouts.

Okay, I see. Just curious because the video stressed that when your write concern is more than 1, you should set a write timeout. But at default value of 1, it’s not as important?

It’s a fail safe for when your write concern is greater than the number of available nodes in the event of a fail-over, so that you’re not waiting for longer than the default.

By the way, the test I was doing re overwriting my original message worked. Click on the pencil icon on my first post to see what I mean:
image
Then click on yours too. It looks like it shows the last two history trails. I initial thought it was the first and last.

1 Like

Makes sense. So in the case of mflix_sample, we’re just adding a write timeout max value for practice even though it wouldn’t affect a default write concern? Or is the write concern above 1?

How’d you overwrite the history like that?

Yep, pretty much for practice. The default write concern is 1. Have a look at the documentation for WC.

If you edit your post again, it will replace the original post. So a minimum of 2 edits within different times. However, I also realised that original posts can still be retrieved.

1 Like

I see. Thanks for all your help! Much clearer now.

1 Like