amahussein edited a comment on pull request #2737: URL: https://github.com/apache/hadoop/pull/2737#issuecomment-822639062
Thanks @functioner The detailed discussions (except the lambda argument) should have been on the Jira. > IMO, this is a classic Producer-Consumer problem, and it is natural idea to improve performance using parallel way. > So, call.sendResponse() (network service) affects FSEditLogAsync (edit log sync service). So, I would say it's a bug. Now, I am really even more confused about the (Bug Vs. Improvement). So, I am going to pass on reviewing. > > If any concerns about lambda expression, we could improve it rather than reject it directly. > > @amahussein A common way to eliminate such overhead is preparing multiple consumer threads, and feed them with requests. > If the lambda expressions cause significant overhead, we can improve in that way. > This design pattern is widely used in Cassandra. Example: SEPWorker - SEPExecutor > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/concurrent/SEPWorker.java > https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/concurrent/SEPExecutor.java This is not what I meant. It is recommended to avoid use of lambda expressions in hot execution paths. There are so many ways to avoid lambda expressions simply by having runnables waiting for tasks to be added to a queue. -- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
