Can't change ownership of the file during trim binlog #1107
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.
Summary:
Mysqld error log:
2019-10-29 21:08:57 3013526 [ERROR] Taking backup from binary-logs-3306.000003 to binlog_backup.trunc
�mysqld: Can't change ownership of the file 'binary-logs-3306.000003' (Errcode: 1 - Operation not permitted)
2019-10-29 21:08:58 3013526 [ERROR] Could not take backup of the truncated binlog file binary-logs-3306.000003
2019-10-29 21:08:58 3013526 [Note] Crashed binlog file binary-logs-3306.000003 size is 189413002, but recovered up to 189412705. Binlog trimmed to 189412705 bytes.
2019-10-29 21:08:58 3013526 [Note] [rpl_wait_for_semi_sync_ack] Last ACKed pos initialized to: binary-logs-3306.000003:189418122
This issue is caused by mysqld is running under mysql user instead of root user.
We copy these files for diagnostic purpose and it should be ok to don't change ownership. :)
Originally Reviewed By: yizhang82, bhatvinay
Reference Patch: 8ee8ebe
fbshipit-source-id: f62bc35