Skip to content

fix: code review — thread safety, correctness, and robustness improve…#55

Open
leonlee wants to merge 1 commit into
mainfrom
fix/code-review-2026-04-28
Open

fix: code review — thread safety, correctness, and robustness improve…#55
leonlee wants to merge 1 commit into
mainfrom
fix/code-review-2026-04-28

Conversation

@leonlee
Copy link
Copy Markdown
Owner

@leonlee leonlee commented Apr 28, 2026

…ments

  • C1: NoOpConnectionProvider throws UnsupportedOperationException instead of returning null
  • C2/C3: align markDeferred to NEW status in JDBC store, matching InMemory store semantics
  • M1: ExponentialBackoffRetryPolicy validates baseDelayMs > maxDelayMs
  • M2: DefaultInFlightTracker uses System.nanoTime() for monotonic TTL expiry
  • M3: Outbox.close() logs each component failure at SEVERE before re-throwing
  • M4: expand OutboxDispatcher shutdown comment explaining queue clearing safety
  • M5: document MicrometerMetricsExporter close-after-recording ordering requirement
  • M6: tighten InFlightTracker eviction to every ~256 acquires at 1x TTL threshold
  • M7: DispatchResult.RetryAfter rejects zero delay; update test expectation
  • M8: fix maxAttempts Javadoc from >= 1 to >= 0
  • m1: add Long type branch in JdbcTemplate.bindParams
  • m2: fix stale io.elestyle.outbox.spi.JsonCodec references in Javadoc
  • m3/m4: extract TERMINATION_TIMEOUT_SECONDS constant in OutboxPoller
  • m5: document MySqlOutboxStore transactional requirement for claimPending
  • m6: document DefaultInFlightTracker negative TTL behavior
  • m7: add idempotency guard to OutboxDispatcher.close()
  • m8: document Outbox.start() thread-safety
  • n1-n3: clarify workerCount=0 comment, remove redundant condition, document gauge fields
  • P2 (review): switch DefaultInFlightTracker to nanoTime for monotonic expiry
  • P3 (review): allow baseDelayMs == maxDelayMs (fixed-delay config)
  • P3b (review): revert zero-delay rejection on RetryAfter (consistency with RetryAfterException)
  • P2 (review): defaultJsonCodec registers custom JsonCodec beans as global default via ObjectProvider
  • P3 (review): fetchPendingRows returns null when capacity disappears to prevent false-zero lag gauge
  • P3 (review): add idempotency guard to Outbox.close() for double-close from lifecycle + destroyMethod

…ments

- C1: NoOpConnectionProvider throws UnsupportedOperationException instead of returning null
- C2/C3: align markDeferred to NEW status in JDBC store, matching InMemory store semantics
- M1: ExponentialBackoffRetryPolicy validates baseDelayMs > maxDelayMs
- M2: DefaultInFlightTracker uses System.nanoTime() for monotonic TTL expiry
- M3: Outbox.close() logs each component failure at SEVERE before re-throwing
- M4: expand OutboxDispatcher shutdown comment explaining queue clearing safety
- M5: document MicrometerMetricsExporter close-after-recording ordering requirement
- M6: tighten InFlightTracker eviction to every ~256 acquires at 1x TTL threshold
- M7: DispatchResult.RetryAfter rejects zero delay; update test expectation
- M8: fix maxAttempts Javadoc from >= 1 to >= 0
- m1: add Long type branch in JdbcTemplate.bindParams
- m2: fix stale io.elestyle.outbox.spi.JsonCodec references in Javadoc
- m3/m4: extract TERMINATION_TIMEOUT_SECONDS constant in OutboxPoller
- m5: document MySqlOutboxStore transactional requirement for claimPending
- m6: document DefaultInFlightTracker negative TTL behavior
- m7: add idempotency guard to OutboxDispatcher.close()
- m8: document Outbox.start() thread-safety
- n1-n3: clarify workerCount=0 comment, remove redundant condition, document gauge fields
- P2 (review): switch DefaultInFlightTracker to nanoTime for monotonic expiry
- P3 (review): allow baseDelayMs == maxDelayMs (fixed-delay config)
- P3b (review): revert zero-delay rejection on RetryAfter (consistency with RetryAfterException)
- P2 (review): defaultJsonCodec registers custom JsonCodec beans as global default via ObjectProvider
- P3 (review): fetchPendingRows returns null when capacity disappears to prevent false-zero lag gauge
- P3 (review): add idempotency guard to Outbox.close() for double-close from lifecycle + destroyMethod

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant