4 ms·
You overwrite the entire array. Replacement is a safe, idempotent operation. If you're concerned about concurrency for array updates, you'll usually need a for
by bpicolo 2y ago
You overwrite the entire array. Replacement is a safe, idempotent operation.
If you're concerned about concurrency for array updates, you'll usually need a form of concurrency control whether the database supports partial updates or not.
- account42 2y agoUnless your array is only a relatively small part of the file this defeats the purpose of patching. And yes, concurrency is also an issue in simple cases (e.g. append/prepend) that json patch handles fine on its own.