I found a contradiction in a Wikipedia article and not sure where the mistake is (or maybe I don't understand it correctly).
According to Wikipedia in Read committed isolation level:
"In this isolation level, a lock-based concurrency control DBMS implementation keeps write locks (acquired on selected data) until the end of the transaction, but read locks are released as soon as the SELECT operation is performed (so the non-repeatable reads phenomenon can occur in this isolation level, as discussed below)"
Further the explanation of Non-repeatable reads phenomena which can happen in Read committed isolation level:
Transaction 1:
SELECT * FROM users WHERE id = 1;
Transaction 2:
UPDATE users SET age = 21 WHERE id = 1; COMMIT;
Transaction 1:
SELECT * FROM users WHERE id = 1; COMMIT;
According the the first quote a write lock should have been acquired after the 1st select statement in the 1st transaction. How come the second transaction can successfully aquire the write lock and commit if this lock type is supposed to be exclusive? Does the DBMS really keep write locks on selected data?