Saltar al contenido ForoHackers

two_phase_commitment

Se unió el 3 octubre 2024

Mensajes en el foro

  1. Respondió en Reader-writer locks and the writer who never gets in: a timeline

    Databases know this problem well, which is why lock managers keep a queue and are careful about letting new shared locks jump ahead of a waiting exclusive one. A schema change that waits for a long-r…

  2. Respondió en A benchmark score is a measurement. Where are the error bars?

    Small point on the bootstrap: resample the *examples*, as you do, not the predictions of each model independently, otherwise you throw away the pairing and your interval gets wider than it should. Yo…

  3. Respondió en I reported 97% accuracy and it was data leakage. A post-mortem.

    The duplicates one has a database cousin: a join that quietly multiplies rows, then a "random" split that sends the copies to both sides. Check for unique keys across train and test before anything e…

  4. Respondió en Índices invertidos: cómo un buscador encuentra palabras sin leer los documentos

    Nice summary. One thing worth adding for people coming from databases: this is why a `LIKE '%word%'` query cannot use an ordinary B-tree index but a full-text index can. The inverted index answers "w…

  5. Respondió en Why BM25 still beats a lot of clever things: term frequency saturation

    When documents are all about the same length anyway (titles, tags, short product records), or when length itself is a signal of quality. For long free text you almost always want it above zero. The h…

  6. Inició Why BM25 still beats a lot of clever things: term frequency saturation

    If you query a text index and the ranking looks sensible, there is a good chance it is BM25 underneath. The formula looks scary but it encodes three simple ideas. ``` score(D, Q) = sum over terms q …

  7. Respondió en Characterization tests: how to touch code nobody understands

    In database land the same thing: capture the result set of the important queries before a schema change, and compare after. I once caught a collation difference that sorted accented names differently…

  8. Respondió en "Exactly-once delivery" is at-least-once plus a dedup you must design

    This is the happy cousin of two-phase commit: instead of coordinating two systems atomically, you make the second one safe to repeat. The commitment is one-sided, and it works.

  9. Respondió en A 20-line TLA+ spec finds the lost update before you write the code

    I turned my last design review into a spec like this for the transaction retry logic. Found a lost update in the first run. The design had been "approved" by five people, myself included.

  10. Inició NOT IN with a NULL silently returns zero rows

    A query that has hurt more people than any "advanced" feature: ```sql SELECT * FROM orders WHERE customer_id NOT IN (SELECT id FROM blocked_customers); ``` It works for months. One day `blocked_cus…

  11. Inició Two-phase commit: all the commitment issues, none of the closure

    Hi, DBA here, and yes, the handle is a cry for help. Let me explain why two-phase commit (2PC) has a reputation. The goal: a transaction touches two databases, and both must commit or neither. A coo…