sjlee commented on PR #7828: URL: https://github.com/apache/hadoop/pull/7828#issuecomment-3114012031
@shameersss1 Thanks for your contribution. I haven't sat down and looked at the larger code yet, but a couple of questions: - Why are we using the read lock for a mutation operation? Shouldn't we be using the write lock? The read lock will still permit concurrent operation and is not the right thing to use here, no? - Regarding the unit test, I wonder how it is passing even with the read lock? Maybe the concurrency is not enough to reproduce the problem? It would be great if you could reproduce the problem with the old code first and prove that the new code fixes it. - Have you done a fully analysis of the all reads and writes to this hashmap so that all read access is protected by the read lock and all write access by the write lock? That is the correct thing to do here. -- 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: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org