fix(#13): record failed events when the listener re-read fails #22

Merged
KofTwentyTwo merged 2 commits from feature/GH-13-listener-reread-failures into develop 2026-10-07 01:50:00 +00:00
KofTwentyTwo commented 2026-10-07 00:07:17 +00:00 (Migrated from github.com)

Summary

  • A failed in-transaction re-read of updated records (Exception | LinkageError, for example a host possible-value provider) no longer drops the update. The listener records the updated keys in quickSearchFailedEvent after the commit, so basepull replays them, and a rolled-back write leaves no row.
  • The re-read failure is logged at warn straight away, with the table name and record count. With a transaction, a rollback (including a transaction the failed re-read aborted) would otherwise leave no trace of the cause.
  • A LinkageError from building or invoking the lazy publisher and client (for example the optional AWS SDK missing for AWS_SIGV4) is recorded the same way. The delete capture during a full reindex still runs.
  • A DEGRADED start without the AWS SDK no longer aborts host startup. In both modes the message names the missing class and the optional AWS SDK v2 dependencies (apache-client, sts), instead of reporting OpenSearch as unreachable.

Testing

  • CI=true ./mvnw verify: 353 unit tests and 19 integration tests pass, and the JaCoCo gate is met.
  • New unit tests cover:
    • a re-read failure with commit, with rollback and with no transaction
    • a LinkageError from the re-read, from building the client, and from publishing
    • recording itself failing (logged, nothing thrown)
    • DEGRADED and FAIL_FAST starts with a missing optional class

Closes #13

## Summary - A failed in-transaction re-read of updated records (`Exception | LinkageError`, for example a host possible-value provider) no longer drops the update. The listener records the updated keys in `quickSearchFailedEvent` after the commit, so basepull replays them, and a rolled-back write leaves no row. - The re-read failure is logged at warn straight away, with the table name and record count. With a transaction, a rollback (including a transaction the failed re-read aborted) would otherwise leave no trace of the cause. - A `LinkageError` from building or invoking the lazy publisher and client (for example the optional AWS SDK missing for `AWS_SIGV4`) is recorded the same way. The delete capture during a full reindex still runs. - A DEGRADED start without the AWS SDK no longer aborts host startup. In both modes the message names the missing class and the optional AWS SDK v2 dependencies (`apache-client`, `sts`), instead of reporting OpenSearch as unreachable. ## Testing - `CI=true ./mvnw verify`: 353 unit tests and 19 integration tests pass, and the JaCoCo gate is met. - New unit tests cover: - a re-read failure with commit, with rollback and with no transaction - a `LinkageError` from the re-read, from building the client, and from publishing - recording itself failing (logged, nothing thrown) - DEGRADED and FAIL_FAST starts with a missing optional class Closes #13
Sign in to join this conversation.