PXB-3302: GTID of the last change output truncated in Xtrabackup back… #1576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…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.