You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "okumin (via GitHub)" <gi...@apache.org> on 2025/12/22 06:40:25 UTC
[PR] Core, REST: Avoid logging on every error [iceberg]
okumin opened a new pull request, #14908:
URL: https://github.com/apache/iceberg/pull/14908
I see a long stack trace every time a REST server returns an error response, e.g., 404. This is the minimal reproduction.
```bash
$ gradle :iceberg-core:test --tests "org.apache.iceberg.rest.TestRESTCatalog.testSetNamespacePropertiesNamespaceDoesNotExist"
...
[qtp236002428-39] ERROR org.apache.iceberg.rest.RESTCatalogServlet - Error processing REST request
org.apache.iceberg.exceptions.RESTException: Unhandled error: ErrorResponse(code=404, type=NoSuchNamespaceException, message=Namespace does not exist: newdb)
org.apache.iceberg.exceptions.NoSuchNamespaceException: Namespace does not exist: newdb
at org.apache.iceberg.inmemory.InMemoryCatalog.loadNamespaceMetadata(InMemoryCatalog.java:275)
at org.apache.iceberg.rest.CatalogHandlers.updateNamespaceProperties(CatalogHandlers.java:218)
at org.apache.iceberg.rest.RESTCatalogAdapter.handleRequest(RESTCatalogAdapter.java:242)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
at org.apache.iceberg.rest.RESTCatalogAdapter.handleRequest(RESTCatalogAdapter.java:165)
at org.apache.iceberg.rest.RESTCatalogAdapter.execute(RESTCatalogAdapter.java:569)
at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
```
1. When an error happens, [errorHandler is triggered](https://github.com/apache/iceberg/blob/d6d44a7803b218e7da6d514e96ad98282f22a2b6/core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java#L584)
2. [The error handler constructs the error response, without throwing an exception](https://github.com/apache/iceberg/blob/d6d44a7803b218e7da6d514e96ad98282f22a2b6/core/src/test/java/org/apache/iceberg/rest/RESTCatalogServlet.java#L152-L161)
3. [The adapter throws a RESTException](https://github.com/apache/iceberg/blob/d6d44a7803b218e7da6d514e96ad98282f22a2b6/core/src/test/java/org/apache/iceberg/rest/RESTCatalogAdapter.java#L587)
4. [The servlet implementation attempts a non-local exit and logs the exception](https://github.com/apache/iceberg/blob/d6d44a7803b218e7da6d514e96ad98282f22a2b6/core/src/test/java/org/apache/iceberg/rest/RESTCatalogServlet.java#L109-L131)
Logging a stack trace for a 404 Not Found response is verbose in most use cases.
The first implementation of this pull request does not change the overall flow control. Ideally, `RESTCatalogAdapter#execute` should probably not throw a RESTException; however, it may require modifying `BaseHTTPClient`, so I opened this PR with a minimal change.
--
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] Core, REST: Avoid logging on every error [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #14908: Core, REST: Avoid logging on every error
URL: https://github.com/apache/iceberg/pull/14908
--
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] Core, REST: Avoid logging on every error [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14908:
URL: https://github.com/apache/iceberg/pull/14908#issuecomment-3821093242
This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.
--
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] Core, REST: Avoid logging on every error [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #14908:
URL: https://github.com/apache/iceberg/pull/14908#issuecomment-3787528057
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.
--
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