Skip to content

Commit

Permalink
HBASE-28643 An unbounded backup failure message can cause an irrecove…
Browse files Browse the repository at this point in the history
…rable state for the given backup (#6088)

Co-authored-by: Ray Mattingly <rmattingly@hubspot.com>
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org>
  • Loading branch information
rmdmattingly and Ray Mattingly authored Sep 2, 2024
1 parent 9d3ceb8 commit dcffc4a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
@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 {
/**
Expand Down Expand Up @@ -266,6 +267,9 @@ public String getFailedMsg() {
}

public void setFailedMsg(String failedMsg) {
if (failedMsg.length() > MAX_FAILED_MESSAGE_LENGTH) {
failedMsg = failedMsg.substring(0, MAX_FAILED_MESSAGE_LENGTH);
}
this.failedMsg = failedMsg;
}

Expand Down

0 comments on commit dcffc4a

Please sign in to comment.