17 - Timestamp-Ordering Concurrency Control (CMU Intro to Database Systems / Fall 2022)

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • Andy Pavlo (www.cs.cmu.edu...)
    Slides: 15445.courses....
    Notes: 15445.courses....
    15-445/645 Intro to Database Systems (Fall 2022)
    Carnegie Mellon University
    15445.courses....

КОМЕНТАРІ • 12

  • @TheKaratekidd32v
    @TheKaratekidd32v Рік тому +4

    Both the 'notes' and 'slides' links in the video description point at the slides.
    Notes can be found here: 15445.courses.cs.cmu.edu/fall2022/notes/17-timestampordering.pdf

  • @yehanzhang2745
    @yehanzhang2745 Рік тому +5

    The 2 invariants of basic T/O can be summarized as "You can neither foresee the future (as object with a larger timestamp is something in the future), nor change things that happened in the past (current txn with a smaller timestamp stand in the past)"

  • @jrbytes
    @jrbytes Рік тому +3

    I came to the lecture series because I was a bit rusty on DBMS internals, but stayed for the DJ Mooshoo drama.

  • @CyberSoundStation
    @CyberSoundStation Рік тому +1

    In OCC Forward Validation step #3, can someone please explain why we need this condition - WriteSet(Ti) intersection WriteSet(Tj) = Empty ?

    • @YaphtersW
      @YaphtersW Рік тому

      My understanding is it allows Ti and Tj to do the write phase at the same time (unlike step #2), so Tj might finish the write phase earlier than Ti. If this happens and their write sets intersect, Ti might overwrite Tj's write, which is incorrect as Ti's ts is smaller

  • @jennwng
    @jennwng Рік тому

    At 1:10:27, it says "there isn't anything in the private workspace that I missed". Why? Wouldn't T2 need to check T1's private workspace, and notice the timestamp there is infinity, which is in the future than it's own timestamp (0)? In which case, T2 should realize it has missed something, and abort itself?

  • @xinyuzhang121
    @xinyuzhang121 Рік тому +2

    Great lecture

  • @김경환-p2z3c
    @김경환-p2z3c Рік тому

    1:10:02 For schedule shown in slide, T2 did vaildate phase before T1 does. But why do we have to check T2 when T1 does forward vaildation?

  • @nahzor
    @nahzor Рік тому

    Would the thomas write rule fail if the two transactions were incrementing a counter A? T1 is allowed to commit without doing the write. So A will be 1 after T1 and T2 finish. But shouldn’t A be 2 to be correct? Assuming A is 0 at the beginning.

    • @hatxu4062
      @hatxu4062 3 місяці тому

      In your case T1 and T2 both read the initial value of A, so R-TS(A) = 2. When T1 wants to write A, TS(T1) < R-TS(A), so T1 has to abort even with Thomas write rule

  • @WeiHu
    @WeiHu Рік тому

    38:30 Why does T1 need to abort? Can't T1 read the local copy of A?

    • @solokyo_
      @solokyo_ Рік тому

      I think It depends on your isolation level, if it is read committed or higher then T1 has to abort.