Skip to content

Commit

Permalink
Fix: index events according to their local row id
Browse files Browse the repository at this point in the history
We use this row id as a watermark, and update it after every ingestion
of an event. Previously, we were iterating over things in an undefined
order, and effectively sometimes ingesting events out of order, causing
bad things to happen to the watermark, leading to much FUN.
  • Loading branch information
cronokirby committed Jul 25, 2024
1 parent 21b8d7f commit f6399bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/util/cometindex/src/indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ GROUP BY
events.type,
blocks.height,
tx_results.tx_hash
ORDER BY
events.rowid ASC
"#,
)
.bind(watermark)
Expand Down

0 comments on commit f6399bc

Please sign in to comment.