cxzl25 opened a new pull request, #3763:
URL: https://github.com/apache/celeborn/pull/3763

   ### What changes were proposed in this pull request?
   
   `ChannelsLimiter#userEventTriggered` unconditionally casts `ctx.alloc()` to
   `PooledByteBufAllocator` when handling a `TrimCache` event:
   
   ```java
   ((PooledByteBufAllocator) ctx.alloc()).trimCurrentThreadCache();
   ```
   
   The concrete type of ctx.alloc() is determined by
   celeborn.network.memory.allocator.pooled. When it is set to false (the
   documented escape hatch for workers whose direct memory stays high even after
   trimming), the allocator is an UnpooledByteBufAllocator, so this cast throws 
a
   ClassCastException on the Netty EventLoop thread the next time memory 
pressure
   triggers MemoryManager#trimAllListeners → ChannelsLimiter#onTrim →
   trimCache().
   
   ### Why are the changes needed?
   
   
   
   ### Does this PR resolve a correctness bug?
   
   <!-- Check if yes. The `correctness` label will be added/removed 
automatically. -->
   - [ ] Yes
   
   ### Does this PR introduce _any_ user-facing change?
   
   <!-- Check if yes. -->
   - [ ] Yes
   
   
   ### How was this patch tested?
   
   


-- 
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]

Reply via email to