Project

General

Profile

Cleanup #53682

common: use fmt::print for stderr logging

Added by 玮文 胡 over 2 years ago. Updated 6 months ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
Category:
common
Target version:
% Done:

0%

Tags:
backport_processed
Backport:
quincy,pacific
Reviewed:
Affected Versions:
Pull request ID:

Description

Reduce the number of syscalls to improve performance.

Also reduce the probability of https://tracker.ceph.com/issues/49551, since conmon is less likely to read partial log line.

Test shows that fmt::print is as performant as calling `writev` directly. And it is portable and safe in handling short write.


Related issues

Related to Ceph - Bug #57923: log: writes to stderr (pipe) may not be atomic Resolved
Copied to Ceph - Backport #57925: pacific: common: use fmt::print for stderr logging Rejected
Copied to Ceph - Backport #57926: quincy: common: use fmt::print for stderr logging New

History

#1 Updated by Patrick Donnelly over 1 year ago

  • Related to Bug #57923: log: writes to stderr (pipe) may not be atomic added

#2 Updated by Patrick Donnelly over 1 year ago

  • Status changed from New to Pending Backport
  • Target version set to v18.0.0
  • Backport changed from pacific, octopus to quincy,pacific

#3 Updated by Backport Bot over 1 year ago

  • Copied to Backport #57925: pacific: common: use fmt::print for stderr logging added

#4 Updated by Backport Bot over 1 year ago

  • Copied to Backport #57926: quincy: common: use fmt::print for stderr logging added

#5 Updated by Backport Bot over 1 year ago

  • Tags set to backport_processed

#6 Updated by Konstantin Shalygin 6 months ago

  • Assignee set to 玮文 胡

Also available in: Atom PDF