szetszwo commented on code in PR #8431:
URL: https://github.com/apache/ozone/pull/8431#discussion_r2084973185
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/events/FixedThreadPoolWithAffinityExecutor.java:
##########
@@ -249,57 +251,51 @@ public ContainerReportProcessTask(BlockingQueue<P> queue,
@Override
public void run() {
while (isRunning.get()) {
- try {
- Object report = queue.poll(1, TimeUnit.MILLISECONDS);
- if (report == null) {
- continue;
- }
+ Object report = queue.poll();
+ if (report == null) {
+ continue;
+ }
Review Comment:
@shangshu-qian , thanks for working on this!
This is busy waiting. Have you checked the CPU usage after this change?
```java
Object report = queue.poll(1, TimeUnit.MILLISECONDS);
```
Using a BlockingQueue seems to be better but the 1ms timeout is too short.
We should increase the timeout.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]