thinQmaster Virtual testing partner Adaptive practice exams that find your weak spots and drill them. Every answer explained. From $69
Enroll

thinQmaster

Find your exam

Five questions free, before you decide.

Step 1 · choose a vendor

In one of our camps? Your practice exams come with the tuition — they are on your study page already.

Data & Analytics · Advanced

Optimistic Concurrency Control

A strategy that lets transactions proceed without locks and checks for conflicts at write time using version numbers or timestamps.

Definition

Each update verifies that the row version hasn't changed since it was read; if it has, the update fails and must be retried. It works well when conflicts are rare. Cosmos DB ETags, Delta Lake commits and rowversion columns all use it.

Example

UPDATE Items SET Qty = 9, Ver = Ver + 1 WHERE ID = 5 AND Ver = 3;

Exam tip

Low contention favors optimistic concurrency; high contention favors pessimistic locking.

Related terms