We’re using MySQL version 5.7.34 and xbstream/xbcloud 2.4.24.
We have an automated restore tool that is receiving an error from s3 saying a key doesn’t exist when attempting to download. During the research of the original upload, it appears xbcloud is getting a non response from aws and then marking the upload as failed. The problem is our code is seeing a 0 return code and thinking everything went as planned. Here’s the output from xbcloud followed by lines of logging indicating what our automation is seeing:
211208 12:24:41 xbcloud: Failed to parse XML response.
211208 12:24:41 xbcloud: error: failed to upload chunk: xtrabackup-XXXX-2021-12-07_1800/schema/table.ibd.qp.xbcrypt.00000000000000013931, size: 65654
211208 12:24:42 xbcloud: Upload failed.
I, [2021-12-08T12:24:42.523266 #15100] INFO -- : Child process stderr:
I, [2021-12-08T12:24:42.523287 #15100] INFO -- : Child process exit code: 0
Digging through the xbcloud code at percona-xtrabackup/s3.cc at 8.0 · percona/percona-xtrabackup · GitHub, it appears the code block in question is:
void S3_client::retry_error(Http_response *resp, bool *retry) {
S3_response s3_resp;
if (!s3_resp.parse_http_response(*resp)) {
msg_ts("%s: Failed to parse XML response.\n", my_progname);
} else if (s3_resp.error()) {
msg_ts("%s: S3 error message: %s\n", my_progname,
s3_resp.error_message().c_str());
if (s3_resp.error_code() == "RequestTimeout") {
*retry = true;
}
}
}
From my limited experience with C++, should that code block be returning false after the unhandled error from AWS?