You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Duo Zhang (Jira)" <ji...@apache.org> on 2022/08/24 02:48:00 UTC

[jira] [Commented] (HBASE-27321) The ReplicationLogCleaner is not thread safe but can be called from different thread at the same time

    [ https://issues.apache.org/jira/browse/HBASE-27321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17583957#comment-17583957 ] 

Duo Zhang commented on HBASE-27321:
-----------------------------------

I think either we change ReplicationLogCleaner to be thread safe, by passing something like a CleanerContext so we can share something between methods, or we make sure there is only one cleaner run.

Techinally the former approach is OK, but allowing multiple cleaner run at the same time seems useless and will cause  confusing error such as the two cleaner runs want to delete the same file and one of the cleaner will fail and log some errors, while there is no real problem.

So I prefer the latter approach, to disable multiple cleaners run at the same time.

> The ReplicationLogCleaner is not thread safe but can be called from different thread at the same time
> -----------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-27321
>                 URL: https://issues.apache.org/jira/browse/HBASE-27321
>             Project: HBase
>          Issue Type: Bug
>          Components: master, Replication
>            Reporter: Duo Zhang
>            Priority: Critical
>
> In preClean method we will update the class fields and then use them in the getDeletableFiles method. This implies that we will have only one cleaner run at the same time.
> But actually, in MasterRpcServices.runCleanerChore, we will call execute the HFileCleaner and LogCleaner directly, not in the cleanerChore thread.
> This could cause data loss for replication, which is a very serious problem.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)