Replies: 1 comment 1 reply
-
Netbox is built on Django, so it does what Django's ORM does. Is there a specific scenario that's causing you concern - is it web updates through the GUI, or systems making updates via the REST API, or just all updates in general? If multiple users are frequently updating the same object in conflicting ways, then there may be a business process issue. But if that is the problem, what would you rather happen instead? There are some third-party plugins which patch the Django ORM to perform "optimistic locking", where each object has a version number, and then the save performs a query like
This update will fail (zero rows updated) if the version number has already been changed by an overlapping request. In the case of a web UI or API request, this error would have to propagate back to the user. In the web UI, there is data in form fields. Either these would have to be refreshed from the database (losing any data in fields which the user has changed); or the fields would be left as-is, and the user would click Save again. In the latter case, this would simply overwrite all fields of the previous update, so it wouldn't really be any different to the current situation. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Wondering on the mindset behind the implementation of concurrent object updates.
Say, more than one user update (as in save) same object at the same time. I see netbox (v3.0.1) gets the latest before the actual save. This might be a problem if same fields are updated.
Beta Was this translation helpful? Give feedback.
All reactions