Project

General

Profile

Actions

Cleanup #53682

open

common: use fmt::print for stderr logging

Added by 玮文 胡 over 2 years ago. Updated 7 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 3 (1 open2 closed)

Related to Ceph - Bug #57923: log: writes to stderr (pipe) may not be atomicResolvedPatrick Donnelly

Actions
Copied to Ceph - Backport #57925: pacific: common: use fmt::print for stderr loggingRejectedActions
Copied to Ceph - Backport #57926: quincy: common: use fmt::print for stderr loggingNewActions
Actions

Also available in: Atom PDF