-
Type: Task
-
Resolution: Done
-
Priority: Critical - P2
-
Affects Version/s: None
-
Component/s: manual
-
Labels:
Taken from FAQ: Concurrency
Write lock. If used with the nolock lock option, the eval option does not take a write lock and cannot write data to the database.
Taken from eval
By default, eval takes a global write lock before evaluating the JavaScript function. As a result, eval blocks all other read and write operations to the database while the eval operation runs. Set nolock to true on the eval command to prevent the eval command from taking the global write lock before evaluating the JavaScript. nolock does not impact whether operations within the JavaScript code itself takes a write lock.
These two doc's pages conflict each other regarding writes performed when the nolock option is specified. Can we please fix this up and ideally clarify the use-cases for using the lock vs nolock as this will help end-users understand the what/why of supplying the nolock option.