One of our customer was recently hit with OOM error on almost all of the region servers.
Postmortem of the issue reveled that a corrupt HFile had made its way into one of the regions which resulted into the region brought offline immediately which is as per design.
What happened next reveals two issues:
- As soon as the region was offlined, Master noticed this and tried to assign the region to another region server which of course failed (again due to the corrupt HFile) and then Master tried to assign this to another and so on. So this region kept bouncing from one server to another and this went unnoticed for few hours and all region servers log were filled with thousands of this message:
For situation like this, the region should be marked "offlined_with_error" or something similar so that Master does not try to assign it to another server without user fixing the issue. I will create a separate JIRA for that.
- The second problem and the scope of this JIRA is that the function org.apache.hadoop.hbase.io.hfile.HFile.pickReaderVersion() throws exception without closing the FSDataInputStream objects even if closeIStream is set to true. This lead to orphan filesystem streams accumulating in region server and it eventually died of OOM.