This is an automated email from the ASF dual-hosted git repository.
ndimiduk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/master by this push:
new dcffc4a7bb6 HBASE-28643 An unbounded backup failure message can cause
an irrecoverable state for the given backup (#6088)
dcffc4a7bb6 is described below
commit dcffc4a7bb607b3d3e87ca75deea188cc21740ed
Author: Ray Mattingly <[email protected]>
AuthorDate: Mon Sep 2 04:15:13 2024 -0400
HBASE-28643 An unbounded backup failure message can cause an irrecoverable
state for the given backup (#6088)
Co-authored-by: Ray Mattingly <[email protected]>
Signed-off-by: Nick Dimiduk <[email protected]>
---
.../src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git
a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
index 1fad5b6cfdb..5a0094740d6 100644
--- a/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
+++ b/hbase-backup/src/main/java/org/apache/hadoop/hbase/backup/BackupInfo.java
@@ -44,6 +44,7 @@ import
org.apache.hadoop.hbase.shaded.protobuf.generated.BackupProtos;
@InterfaceAudience.Private
public class BackupInfo implements Comparable<BackupInfo> {
private static final Logger LOG = LoggerFactory.getLogger(BackupInfo.class);
+ private static final int MAX_FAILED_MESSAGE_LENGTH = 1024;
public interface Filter {
/**
@@ -266,6 +267,9 @@ public class BackupInfo implements Comparable<BackupInfo> {
}
public void setFailedMsg(String failedMsg) {
+ if (failedMsg.length() > MAX_FAILED_MESSAGE_LENGTH) {
+ failedMsg = failedMsg.substring(0, MAX_FAILED_MESSAGE_LENGTH);
+ }
this.failedMsg = failedMsg;
}