mirror of
https://github.com/minio/minio.git
synced 2025-11-20 01:50:24 -05:00
fix: intrument os.OpenFile differently for Reads and Writes (#15449)
allows us to trace latency for READs or WRITEs
This commit is contained in:
@@ -237,7 +237,7 @@ func (jd *tierDiskJournal) Open() error {
|
||||
}
|
||||
|
||||
var err error
|
||||
jd.file, err = os.OpenFile(jd.JournalPath(), os.O_APPEND|os.O_CREATE|os.O_WRONLY|writeMode, 0o666)
|
||||
jd.file, err = OpenFile(jd.JournalPath(), os.O_APPEND|os.O_CREATE|os.O_WRONLY|writeMode, 0o666)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -259,7 +259,7 @@ func (jd *tierDiskJournal) Open() error {
|
||||
}
|
||||
|
||||
func (jd *tierDiskJournal) OpenRO() (io.ReadCloser, error) {
|
||||
file, err := os.Open(jd.ReadOnlyPath())
|
||||
file, err := Open(jd.ReadOnlyPath())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user