[
https://issues.apache.org/jira/browse/HBASE-25901?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17348556#comment-17348556
]
yuhailang commented on HBASE-25901:
-----------------------------------
Inside the branch code I'm looking at, the queues are implemented by HashMap.
The code is as follows:
{code:java}
private Map<String, PriorityBlockingQueue<Path>> queues = new HashMap<>();
PriorityBlockingQueue<Path> queue = queues.get(logPrefix);
if (queue == null) {
queue = new PriorityBlockingQueue<>(queueSizePerGroup, new LogsComparator());
queue.put(log);
queues.put(logPrefix, queue);
...
}
{code}
When writing multiple different logPrefix data to HashMap at the same time, one
of the logPrefix may be lost due to resize function.
> Replication maybe lose data when the regionserver is restarted.
> ---------------------------------------------------------------
>
> Key: HBASE-25901
> URL: https://issues.apache.org/jira/browse/HBASE-25901
> Project: HBase
> Issue Type: Bug
> Components: Replication
> Affects Versions: 2.1.4
> Environment: hbase version: 2.1.4
> hbase.wal.provider: multiwal
>
> Reporter: yuhailang
> Priority: Minor
> Attachments: HBASE-25901-v1.patch
>
> Original Estimate: 12h
> Remaining Estimate: 12h
>
> When multiwal is used, restarting the region server may result in the loss of
> replication data.This may be due to a non thread safe update of the queues in
> the ReplicationSource#
> enqueueLog.
> .
--
This message was sent by Atlassian Jira
(v8.3.4#803005)