rpuch commented on code in PR #3547:
URL: https://github.com/apache/ignite-3/pull/3547#discussion_r1555905142
##########
modules/workers/src/main/java/org/apache/ignite/internal/worker/ThreadAssertions.java:
##########
@@ -64,20 +59,22 @@ public static void assertThreadAllowsToRead() {
public static void assertThreadAllowsTo(ThreadOperation
requestedOperation) {
Thread currentThread = Thread.currentThread();
- if
(BLACKLISTED_THREAD_NAMES.matcher(currentThread.getName()).matches()) {
- return;
- }
-
if (!(currentThread instanceof ThreadAttributes)) {
+ if (PublicApiThreading.executingSyncPublicApi()) {
+ // Allow everything if we ride a user thread while executing a
public API call.
+
+ return;
+ }
+
LOG.warn("Thread {} does not have allowed operations",
trackerException(), currentThread);
Review Comment:
Some errors/exceptions get swallowed, so we can't rely on the
`AssertionError` to track the problem that surfaced. Having it logged
explicitly gives this guarantee.
I removed the second (tracking) exception though.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]