Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Duplication | 0 |
TIP This summary will be updated as you push new changes. Give us feedback
9c1e416 to
a58b462
Compare
Key changes from main:
- Export TESTLOGDIR as absolute path so SpockTest.pm can locate PG logs
- Add $LOG_DIR module variable; use it in create_postgresql_conf and
create_cluster (fixes mismatch where PG wrote logs to parent/logs but
create_cluster created cwd/logs)
- Expose log_dir in get_test_config() (needed by tests that read PG logs)
- Add File::Basename; derive per-test log filenames from $0
- Set PSQLRC/PSQL_HISTORY to /dev/null; add -X flag to all psql calls
to prevent user psqlrc from polluting test output
- Improve destroy_cluster subscription cleanup query
Also update tests 013 and 016 to use $config->{log_dir} instead of
the hard-coded '../logs/' path that matched the old SpockTest.pm behavior.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Test 019 covers the bug where fd = PQsocket(applyconn) is captured once before stream_replay: and never refreshed. When the provider is killed with SIGKILL (no CopyDone), libpq reads a raw EOF, calls pqDropConnection to close conn->sock, and the first exception is "connection to other side has died". On re-entry at stream_replay: with use_try_block=true, the stale fd triggers epoll_ctl(EPOLL_CTL_ADD, closed_fd) -> EINVAL on Linux, or a second exception from PQconsumeInput on macOS — both caught as "error during exception handling". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…death fd = PQsocket(applyconn) was captured once before stream_replay: and never refreshed. When the provider connection dies, libpq's pqDropConnection closes conn->sock (sets it to PGINVALID_SOCKET) and marks status CONNECTION_BAD. On re-entry at stream_replay: with use_try_block=true, the stale fd is passed to WaitLatchOrSocket: epoll_ctl(EPOLL_CTL_ADD, closed_fd) -> EINVAL => ERROR "epoll_ctl() failed: Invalid argument" This hits the use_try_block=true branch in PG_CATCH, producing LOG "error during exception handling" + PG_RE_THROW. Fix: at stream_replay:, refresh fd = PQsocket(applyconn) and return cleanly if the connection is already dead. The worker exits with proc_exit(0) and the postmaster restarts it to reconnect. Set worker_status = SPOCK_WORKER_STATUS_STOPPED before returning so monitoring sees the correct state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
No description provided.