wernerdv commented on code in PR #13554:
URL: https://github.com/apache/ignite/pull/13554#discussion_r4004753958
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/evict/PageAbstractEvictionTracker.java:
##########
@@ -41,6 +41,13 @@ public abstract class PageAbstractEvictionTracker implements
PageEvictionTracker
/** Millis in day. */
private static final int DAY = 24 * 60 * 60 * 1000;
+ /**
+ * Thread-local marker that the current eviction is requested by
size-aware eviction, which may run
+ * while the calling thread already holds entry locks. When set, entries
whose locks are contended are skipped
+ * (via a non-blocking {@code evictInternal}) instead of blocking,
avoiding a lock-ordering deadlock.
+ */
+ private static final ThreadLocal<Boolean> EVICT_NON_BLOCKING = new
ThreadLocal<>();
Review Comment:
Agreed.
Moved the capability into the interface as evictDataPage(boolean tryLock)
(default evictDataPage() delegates to false), removed the ThreadLocal.
As a follow-up the method now returns boolean so the size-aware progress
guard can count an actual eviction as progress. Parameter named tryLock
(matching evictInternal(..., tryLock) / lockEntry(boolean tryLock)) rather than
blocking.
--
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]