Description
Came across this issue (HBASE-9338 test):
1. Client issues a request to move a region from ServerA to ServerB
2. ServerA is compacting that region and doesn't close region immediately. In fact, it takes a while to complete the request.
3. The master in the meantime, sends another close request.
4. ServerA sends it a NotServingRegionException
5. Master handles the exception, deletes the znode, and invokes regionOffline for the said region.
6. ServerA fails to operate on ZK in the CloseRegionHandler since the node is deleted.
The region is permanently offline.
There are potentially other situations where when a RegionServer is offline and the client asks for a region move off from that server, the master makes the region offline.