Repository navigation
meta(oracle): remove the connection error handler that could never run - #18458
Conversation
oracledb connections never emit 'error' (nothing in oracledb 6.10's lib emits on a Connection), and the handler, copied from the MariaDB dialect, checked error codes (PROTOCOL_CONNECTION_LOST, ESOCKET, ...) that oracledb does not use. Remove it along with the placeholder listener and the initializeConnection override. The only thing that emitted 'error' on an Oracle connection was the "abruptly closed" pool integration test, which now destroys the connection through the pool for Oracle, like it already does for db2, mariadb and sqlite3. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Important Review skippedReview was skipped as selected files did not have any reviewable changes. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe Oracle connection manager no longer installs temporary or socket-error listeners. The pool integration test now includes Oracle in the direct-connection-destruction path. ChangesOracle connection error handling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to No actionable merge-blocking risk remains in the reviewed changes. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 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 |
Pull Request Checklist
Description of Changes
Follow-up to #18218: the last item in this comment.
The Oracle connection manager attached an
errorhandler to every connection, but it could never run:Connectionis anEventEmitter, but nothing in oracledb 6.10 (lib/, including thin mode's network layer, or the native binding) emits on a connection. The only emitters areLob/QueryStreamstreams andPool's internal events. Thin mode stores socket errors and throws them from the next call.ESOCKET,ECONNRESET,EPIPE,PROTOCOL_CONNECTION_LOST, the same ones MySQL uses), while oracledb errors useNJS-/ORA-codes.This removes the handler, the placeholder listener that #18218 added in
connect(), and theinitializeConnection()override, so Oracle falls back to the base class's no-op. Broken connections are still detected byvalidate()(connection.isHealthy()), as before.The only thing that ever emitted
erroron an Oracle connection was theshould obtain new connection when old connection is abruptly closedpool integration test, which fakes anECONNRESET. The handler is what made that test pass for Oracle: without it, the test fails withError: Test ECONNRESET Error. For Oracle, that test now destroys the connection through the pool instead, like it already does for db2, mariadb and sqlite3.OracleConnectionkeeps itson(event: 'error')declaration, so the published type doesn't change (7.0.0-alpha.48 has it). TheremoveAllListenersdeclaration is removed: #18218 added it, and it hasn't been released.Verification
coreunit tests withDIALECT=oracle(2494 passing),@sequelize/oracletypings, lint and prettier.coreintegration tests withDIALECT=oracleagainst thedev/oracle/latestcontainer: 1775 passing, 0 failing. Without the test change,should obtain new connection when old connection is abruptly closedfails withError: Test ECONNRESET Error.List of Breaking Changes
None.
🤖 Generated with Claude Code
Summary by CodeRabbit
errorevents.