Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PXB-3302: GTID of the last change output truncated in Xtrabackup back… #1576

Merged
merged 1 commit into from
Jul 10, 2024

Conversation

satya-bodapati
Copy link
Contributor

…up log

https://perconadev.atlassian.net/browse/PXB-3302

Problem:

If the number of GTID sets are absolutely large on a MySQL instance, the output “GTID of the last change” in the Xtrabackup log is truncated compared to the full output in xtrabackup_binlog_info and xtrabackup_info

Analysis:

The new error logging framework had limitation of 8192 characters and anything above is truncated.

A string buf is formed and later passed to default implementaion of error logging. log_write_errstream().

See log_sink_trad():
if (output_buffer != nullptr) {
if (msg_len < output_buffer->data.data_buffer.length)
output_buffer->data.data_buffer.length = msg_len;
else // truncate message to buffer-size (and leave space for '\0')
msg_len = output_buffer->data.data_buffer.length - 1;

Fix:

Since xtrabackup dont use any other configurable loggers, we can avoid this output_buffer, and directly log to stderr.

…up log

https://perconadev.atlassian.net/browse/PXB-3302

Problem:
--------
If the number of GTID sets are absolutely large on a MySQL instance, the output
“GTID of the last change” in the Xtrabackup log is truncated compared to the
full output in xtrabackup_binlog_info and xtrabackup_info

Analysis:
---------
The new error logging framework had limitation of 8192 characters and anything
above is truncated.

A string buf is formed and later passed to default implementaion of error logging.
log_write_errstream().

See log_sink_trad():
     if (output_buffer != nullptr) {
        if (msg_len < output_buffer->data.data_buffer.length)
          output_buffer->data.data_buffer.length = msg_len;
        else  // truncate message to buffer-size (and leave space for '\0')
          msg_len = output_buffer->data.data_buffer.length - 1;

Fix:
----
Since xtrabackup dont use any other configurable loggers, we can avoid this output_buffer,
and directly log to stderr.
@satya-bodapati satya-bodapati self-assigned this Jun 28, 2024
@satya-bodapati satya-bodapati merged commit 1adc4cf into percona:8.0 Jul 10, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants