News for hackers. Stuff that matters.
Re:Speed of Rust vs. C by Chilinot on Saturday March 13, 2021 @06:38AM (#26445927)
You dont necessarily need to use locks in the db. You can use transactions as well, unless you want to do major changes to the DB where transactions would be in constant conflict state.
Re:Speed of Rust vs. C by bluejekyll on Saturday March 13, 2021 @06:46AM (#26445956)
You’re right, though that wasn’t really the point of my reply. More that concurrency in the DB is a DB design choice and not the responsibility of the language accessing the DB. This is especially true when accessing the DB from multiple nodes, which most deployed software does.
Re:Speed of Rust vs. C by branko_d on Sunday March 14, 2021 @06:07AM (#26454044)
Locks and transactions are intertwined. Write locks are typically released only when the transaction ends, and read locks too at some transaction isolation levels.