Affects Version/s: 0.94.0
Fix Version/s: 0.94.1
I found this issue trying to run YCSB on 0.94, I don't think it exists on any other branch. I believe that this was introduced in
HBASE-5058 "Allow HBaseAdmin to use an existing connection".
The issue is that in HCM.getMaster it does this recipe:
- Check if the master is null and runs (if so, return)
- Grab a lock on masterLock
- nullify this.master
- try to get a new master
The issue happens at 3, it should re-run 1 since while you're waiting on the lock someone else could have already fixed it for you. What happens right now is that the threads are all able to set the master to null before others are able to get out of getMaster and it's a complete mess.
Figuring it out took me some time because it doesn't manifest itself right away, silent retries are done in the background. Basically the first clue was this:
This was caused by the little dance up in HBaseAdmin where it deletes "stale" connections... which are not stale at all.