张老师,不好意思,纠正下上封邮件的描述,
在大量 merge region的场景中,会有一定几率产生孤儿region?

leojie <leo...@apache.org> 于2023年6月15日周四 17:02写道:

> 张老师,再请教一下,找到一个ISSUE
> https://issues.apache.org/jira/browse/HBASE-24370
> 这个ISSUE是说,在大量 merge region的场景中,会有一定概率产生小region么?
>
> leojie <leo...@apache.org> 于2023年6月5日周一 16:48写道:
>
>> 感谢张老师的回复,早一点的日志没了,(只能之后再留意这样的问题,进行日志保留)
>> 只剩下如下日志:
>> 2023-05-25 12:24:04,404 WARN
>>  [RpcServer.priority.RWQ.Fifo.write.handler=3,queue=0,port=60000]
>> assignment.AssignmentManager: No region state node for
>> newptc_log,15b746d47aeaca06320461eacd77e66b,1658994112119.5db648586560d01bcc5e4ae26348f14c.,
>> it should already be on node71.hadoop,60020,1679982360619
>> 如果是已经被合并的 region,只是没有正确的 offline的话,重启RS之后,应该不会导致数据丢失。
>> 我继续再合并一些低优先级的表,尝试复现一下这样的问题,再研究下HMaster的日志
>>
>> 张铎(Duo Zhang) <palomino...@gmail.com> 于2023年6月5日周一 16:37写道:
>>
>>> 建议 grep 一下 master 的日志,这种大概率是已经被合并的 region,只是没有正确的 offline,可以看看当前表里和他重叠的那个
>>> region 是怎么合并出来的
>>>
>>> 在 2.3 以后这种情况会少很多,主要是 AM-v2 和 procedure 存储的部分做了不少改进和优化
>>>
>>> leojie <leo...@apache.org> 于2023年6月5日周一 16:09写道:
>>>
>>> > hi all
>>> > 请教社区一些HBase2中 Orphan Regions的问题,使用的hbase版本是2.2.6,hadoop版本是3.3.2
>>> > HBase的hbck report页面出现了一些Orphan Regions,
>>> > Orphan Regions on RegionServer
>>> >
>>> > 126 region(s) in set.
>>> > Region NameReported Online RegionServer
>>> > newptc_log,09c83c3e,1628548002412.5db648586560d01bcc5e4ae26348f14c.
>>> > node27.hadoop,60020,1679982363818 <
>>> http://node27.hadoop:60030/rs-status>
>>> > Orphan Regions on FileSystem
>>> >
>>> > 164 region(s) in set.
>>> > Region Encoded NameFileSystem Path
>>> > 5db648586560d01bcc5e4ae26348f14c
>>> > hdfs://hadoop-namenode/hbase/data/default/newptc_log
>>> > /5db648586560d01bcc5e4ae26348f14c
>>> >
>>> > 这些region的特点是:
>>> >
>>> > 1.  孤儿region的元数据信息在hbase:meta表中不存在,但仍会被一些RS报告,RS界面上可以搜索到这个region的信息,
>>> > 2. 孤儿region对应的HBase表region是完整的,不存在region重叠或region空洞,表依旧正常被读写
>>> > 3. region的hdfs目录结构如下:
>>> > [root@hadoop-operator~]# sudo -uhbase hdfs dfs -ls -R
>>> > /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c
>>> > -rw-r--r--   3 hbase hbase        109 2023-04-06 10:37
>>> >
>>> /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/.regioninfo
>>> > drwxr-xr-x   - hbase hbase          0 2023-04-06 10:38
>>> > /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/.tmp
>>> > drwxr-xr-x   - hbase hbase          0 2023-04-17 18:10
>>> >
>>> /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/.tmp/task
>>> > drwxr-xr-x   - hbase hbase          0 2023-04-06 10:37
>>> >
>>> >
>>> /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/recovered.edits
>>> > -rw-r--r--   3 hbase hbase          0 2023-04-06 10:37
>>> >
>>> >
>>> /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/recovered.edits/3461430.seqid
>>> > drwxr-xr-x   - hbase hbase          0 2023-04-17 18:10
>>> > /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/task
>>> > -rw-r--r--   3 hbase hbase     121250 2023-04-17 17:06
>>> >
>>> >
>>> /hbase/data/default/newptc_log/5db648586560d01bcc5e4ae26348f14c/task/046f0b1f772e40e59131251eb6d6e44f
>>> >
>>> > 这些region下的hfile size大小不为0(个别是个空目录),我使用
>>> >
>>> >
>>> HFile.Reader读出这些hfile,与表中数据进行比对,发现这些孤儿region对应的数据不存在表里,(表没有设置TTL),且这些孤儿region
>>> > 对应的HFILE中的数据都有Put标识(非delete),因此不确定这些孤儿region下的数据是否还有用。
>>> > 我按照页面提示的步骤回放孤儿region目录,发现并不成功:
>>> > First make sure *hbase:meta* is in a healthy state; run *hbck2
>>> fixMeta* to
>>> > be sure. Once this is done, per Region below, run a bulk load -- *$
>>> hbase
>>> > completebulkload REGION_DIR_PATH TABLE_NAME* -- and then delete the
>>> > desiccated directory content (HFiles are removed upon successful load;
>>> all
>>> > that is left are empty directories and occasionally a seqid marking
>>> file).
>>> >
>>> >
>>> >
>>> 请教各位大佬,出现大面积孤儿region的根本原因是什么(发生这个问题之前,我们只是对表进行了大批量的小region合并操作,可能跟这个操作相关),是否有相关ISSUE修复?该如何确定这些孤儿region的hfile是否是冗余数据呢?
>>> > 当重启RS时,这些孤儿region就会消失了,不确定是否会导致数据丢失。
>>> >
>>>
>>

Reply via email to