stuck in an infinite loop in lookupRegion function
i can't connect our hbase cluster
I was expecting to exit with an error after 10 retries, but I've been looping infinitely in the lookupRegion method and I can't exit. The reason is because the timeout error of the context is overwritten by the sleepAndIncreaseBackoff method, causing the err to become nil, forming an infinite loop

Indeed there is 2 levels of retries here. The first one getRegionForRpc that will try 10 times and the second one in lookupRegion that just exponentially retry forever. They do have different purpose. I will have to dig more.
@LG991103 you have to use context with deadine/timeout if you want your requests to exit without retrying forever. It's not stuck, the default behavior is to retry forever until the request goes through to regionserver (it becomes available and starts accepting the requests for that region you are trying to send to).
The 10 times retry is only for unrecoverable cases where we can't determine which region to send the request to. So maybe zookeeper missing the state, or maybe master is down and haven't updated zookeeper for a while. Pretty much if you are getting ErrCannotFindRegion, hbase operator needs to go in an see if everything is healthy with the cluster.