You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "kamcheungting-db (via GitHub)" <gi...@apache.org> on 2026/08/06 01:01:55 UTC
[PR] fix(logging): run FatalHandler on all kFatal paths [iceberg-cpp]
kamcheungting-db opened a new pull request, #872:
URL: https://github.com/apache/iceberg-cpp/pull/872
Follow-up to #725 (merged): the registered `FatalHandler` runs only for the fixed-severity `ICEBERG_LOG_FATAL`. Reaching `kFatal` through the runtime-level forms aborts **without** invoking it:
- `ICEBERG_LOG(LogLevel::kFatal, ...)` → `LogToCurrentRuntime` flushes and aborts, no handler.
- `ICEBERG_LOG_TO(sink, LogLevel::kFatal, ...)` → `LogToExplicitRuntime`, same.
Those paths also format the message only when `ShouldLog(kFatal)` passes, so a handler (once wired) would miss the text for a filtered record. This was raised in review on #726; the fix didn't make it into the #725 merge, so it is submitted separately here.
**Change:** extract the fatal sequence into a shared `internal::DispatchFatal` — format the message once, emit it if the logger is enabled, flush that same logger, run any registered `FatalHandler`, then `std::abort()` — and route all three fatal paths (`LogFatal`, `LogToCurrentRuntime`, `LogToExplicitRuntime`) through it. A handler that itself throws cannot prevent the abort.
**Tests:** two death tests asserting the handler fires for the generic runtime-level `kFatal` and for `ICEBERG_LOG_TO(..., kFatal)`.
Behavior for non-fatal levels and for `ICEBERG_LOG_FATAL` is unchanged.
This pull request and its description were written by Isaac.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(logging): run FatalHandler on all kFatal paths [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac commented on PR #872:
URL: https://github.com/apache/iceberg-cpp/pull/872#issuecomment-5303158435
I've incorporated this patch into https://github.com/apache/iceberg-cpp/commit/31274f5fd1b5f6b34ca18f833e4b25ea76faf1cd. So let me close this PR.
I just created https://github.com/apache/iceberg-cpp/issues/887 while reviewing this. Let me know if you have any idea.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(logging): run FatalHandler on all kFatal paths [iceberg-cpp]
Posted by "wgtmac (via GitHub)" <gi...@apache.org>.
wgtmac closed pull request #872: fix(logging): run FatalHandler on all kFatal paths
URL: https://github.com/apache/iceberg-cpp/pull/872
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org