20250111
- 0秒思考
- Designing Data-Intensive Applications
- write skew: a race condition where multiple transactions
read the same objects and update some of them concurrently, leading to
an inconsistent state. In constrast, a dirty write or lost update occurs
when two transactions simultaneously read and update the same object,
resulting in one update being overwritten and lost.
- For example, you can think of a meeting room booking system. When
two transactions that read bookings to ensure the the room is empty at a
specific time and add a new booking record occur almost at the same
time, both transactions may add their bookings that conflict. In this
case, simply getting a lock for a record to be updated is infeasible.
- “This effect, where a write in one transaction changes the result of
a search query in another transaction, is called phantom”.
- One way to address the issue is materializing conflicts,
which turns a phantom into a lock conflict by creating concrete set of
rows that can be dealt with a lock.
- For example, we can create records (mtg room, time period)
beforehand, and use a lock when updating the records.
- This is uncommon in reality because it’s difficult to think about
how to materialize conflicts.
- serializable isolation: considered to be the strongest
isolation level
- “It guarantees that even though transactions may execute in
parallel, the end result is the same as if they had executed one at a
time, serially, without any concurrency.”
- I provided a consultation for a couple of my friend’s couple.
- Civics Questions
2 hours walk (exploration)
TODO:
- 2044E, F
- 2048D
- Smog test
- Ask my parents to transfer the ownership of my car
- Naturalization Interview (20250207)
index 20250110 20250112