Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's some faulty reasoning in this post. Without the code, it's hard to pin down exactly where things went wrong.

These are the steps described in the post:

   1. Write intent record (async)
   2. Perform operation in memory
   3. Write completion record (async)
   4. Wait for the completion record to be written to the WAL
   5. Return success to client
If 4 is done correctly then 3 is not needed - it can just wait for the intent to be durable before replying to the client. Perhaps there's a small benefit to speculatively executing the operation before the WAL is committed - but I'm skeptical and my guess is that 4 is not being done correctly. The author added an update to the article:

> This is tracked through io_uring's completion queue - we only send a success response after receiving confirmation that the completion record has been persisted to stable storage

This makes it sound like he's submitting write operations for the completion record and then misinterpreting the completion queue for those writes as "the record is now in durable storage".



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: