This is an automated email from the ASF dual-hosted git repository. zhangduo pushed a commit to branch branch-3 in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-3 by this push: new d5c14b5e059 HBASE-28218 Add a check for getQueueStorage().hasData() in the getDeletableFiles method of ReplicationLogCleaner (#5536) d5c14b5e059 is described below commit d5c14b5e05920fa1fa568b5c0c6cb76e7e4c3706 Author: hiping-tech <58875741+hiping-t...@users.noreply.github.com> AuthorDate: Fri Nov 24 10:29:34 2023 +0800 HBASE-28218 Add a check for getQueueStorage().hasData() in the getDeletableFiles method of ReplicationLogCleaner (#5536) Co-authored-by: lvhaiping.lhp <lvhaiping....@alibaba-inc.com> Signed-off-by: Duo Zhang <zhang...@apache.org> (cherry picked from commit dba900f778614b392e5e83522cdda72487558f48) --- .../hadoop/hbase/replication/master/ReplicationLogCleaner.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java index 6ebcac7e453..7fc8feae72a 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/replication/master/ReplicationLogCleaner.java @@ -192,6 +192,14 @@ public class ReplicationLogCleaner extends BaseLogCleanerDelegate { if (this.getConf() == null) { return files; } + try { + if (!rpm.getQueueStorage().hasData()) { + return files; + } + } catch (ReplicationException e) { + LOG.error("Error occurred while executing queueStorage.hasData()", e); + return Collections.emptyList(); + } if (!canFilter) { // We can not delete anything if there are AddPeerProcedure running at the same time // See HBASE-27214 for more details.