rgw/multisite: include error code in object sync failure log message

Append retcode and its string representation to the log line to facilitate the
diagnosis of sync issues.

Signed-off-by: Oguzhan Ozmen <oozmen@bloomberg.net>
This commit is contained in:
Oguzhan Ozmen 2026-05-27 19:38:37 +00:00
parent 21be389c67
commit c29b9f0c86

View File

@ -4495,7 +4495,9 @@ public:
if (retcode < 0 && retcode != -ENOENT) {
set_status() << "failed to sync obj; retcode=" << retcode;
tn->log(0, SSTR("ERROR: failed to sync object: "
<< bucket_shard_str{bs} << "/" << key.name));
<< bucket_shard_str{bs} << "/" << key.name
<< " retcode=" << retcode
<< " (" << cpp_strerror(-retcode) << ")"));
if (!ignore_sync_error(retcode)) {
error_ss << bucket_shard_str{bs} << "/" << key.name;
sync_status = retcode;