▲ | frollogaston 3 days ago | |||||||
Thread-safe just means that the threading by itself doesn't break anything. The race condition you're describing is outside this scope and would happen the same in a single-threaded event loop. Btw if you really want consistent multi reads, some DBMSes support setting a read timestamp, but the common ones don't. | ||||||||
▲ | branko_d 3 days ago | parent [-] | |||||||
> would happen the same in a single-threaded event loop Well...if you implemented a relational DBMS server without using threads. To my knowledge, no such DBMS exists, so the distinction seems rather academic. > Btw if you really want consistent multi reads, some DBMSes support setting a read timestamp, but the common ones don't. Could you elaborate? I can't say I heard of that mechanism. Perhaps you are referring to something like Oracle flashback queries or SQL Server temporal tables? Normally, I'd use MVCC-based "snapshot" transaction isolation for consistency between multiple queries, though they would need to be executed serially. | ||||||||
|