spock_apply: run exception-log work in ApplyOperationContext#499
spock_apply: run exception-log work in ApplyOperationContext#499ibrarahmad wants to merge 6 commits into
Conversation
After RollbackAndReleaseCurrentSubTransaction the current memory context is TopTransactionContext, so per-row palloc in log_insert_exception accumulated for the whole apply transaction. Switch to ApplyOperationContext for the exception-log body and reset that context per message in handle_update and handle_delete.
|
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 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Trigger the use_try_block retry path by killing the apply worker mid-transaction with sub_disable, then re-enabling so the new worker matches its prior commit_lsn. Poll memory context snapshots while apply is mid-transaction and assert TopTransactionContext stays well under the pre-fix per-row growth.
Shorten the verbose MemoryContextSwitchTo comment, drop the brittle "level: 2;" prefix from 022's three context regexes, and add use lib 't'.
…ndler Replace the per-handler MemoryContextReset calls with a single reset after each dispatched message instead of scattering them in handle_*.
After RollbackAndReleaseCurrentSubTransaction the current memory context is TopTransactionContext, so per-row palloc in log_insert_exception accumulated for the whole apply transaction. Switch to ApplyOperationContext for the exception-log body and reset that context per message in handle_update and handle_delete.