The GitHub Actions job "Scalafmt" on pekko-persistence-r2dbc.git/port-snapshot-starting-point has failed. Run started by GitHub user pjfanning (triggered by pjfanning).
Head commit for run: fbbc33d29ae27b05d9c2c04058812d8ecffa8ce5 / PJ Fanning <[email protected]> core: don't miss events when starting from snapshots Motivation: Review of #515 found two bugs in the slice queries that start from snapshots, both inherited from akka-persistence-r2dbc 1.2.0: - rows dropped by the snapshot filter did not update the query state, so a fully filtered page completed the current query early and stalled the live query - with NoOffset the event query started at the min snapshot timestamp, so older events of entities without a snapshot were missed Modification: - BySliceQuery applies the filter after ContinuousQuery, on the envelopes, so filtered envelopes still advance the offset and the row count - The event query always starts at the given offset - Document that the events are still read from the offset, and that the offsets of the emitted envelopes are not increasing - Log a warning when the event of a snapshot is not found, and document the snapshot settings that must be set for custom plugin ids - The migration updates skip deleted events, like the snapshot plugin, and the guide mentions batching and that the feature is new in 2.0.0 Result: Events after a full page of filtered events, and events of entities without a snapshot, are emitted. Tests: - New EventsBySliceStartingFromSnapshotSmallBufferSpec (buffer-size 10) and an EventsBySliceStartingFromSnapshotSpec test for an entity without a snapshot: all 4 fail without the fix on H2 - H2: query and snapshot specs 109 succeeded, 0 failed - PostgreSQL: sbt core/test 429 succeeded; sbt migration/test 8 succeeded - Postgres migration script checked against a deleted event - MySQL and Yugabyte: left to CI - sbt core/mimaReportBinaryIssues migration/mimaReportBinaryIssues: no issues References: Refs #515 Report URL: https://github.com/apache/pekko-persistence-r2dbc/actions/runs/40332063976 With regards, GitHub Actions via GitBox --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
