Mnesia dets and log behave when vm crash

I’m reading code about mnesia:dirty_write/2
log and commit(dets) seem has diff sync implement

do_dirty(Tid, Commit) when Commit#commit.schema_ops == [] ->
    mnesia_log:log(Commit),
    do_commit(Tid, Commit).

So I image this situation

  • open a local disc_copies table
  • dirty_write {record, 1}
  • wait X second, sync to dets and log dump
  • dirty_write {record, 2}
  • wait Y second, sync to dets and log not dump
  • vm crash

if {record, 2} will overwrite by {record, 1} when vm restart?