|
kaloian.manassiev, yielding will generally be required for good performance, in my opinion. Long running operations that do not yield require us to keep around a lot of history. Today that means high cache pressure, as we don't save history information to stable storage. However, even if we do so in the future, reading from historic data is going to be fundamentally more expensive than reading recent data that may be kept in memory.
The other obvious reason we need yielding is to prevent and/or resolve update conflicts. If you're doing an update of a document that has recently been changed, you must yield to be able to read the more recent version of the document and update that (assuming it still matches the update criteria).
|
|
This effectively means that any find/aggregation and etc, which is executed under a logical session won't be able to yield its locks either. I encountered this as part of my changes for SERVER-37244 and filed SERVER-37689, but now that I think about it more I think we might just disallow yielding in sessions (which is as if we disallowed yielding altogether).
david.storch, geert.bosch - do you think it is about time we threw out yielding or there are some use cases that still depend on it? Can you weigh on whether we should do that or implement SERVER-37689? I would be happy to close SERVER-37689 as won't fix.
|