mirror of
https://github.com/minio/minio.git
synced 2026-11-13 14:44:19 +00: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:
1 parent
aad9cb208a
commit
043aaa792d
8 files changed
+43
-36
No files matched your search
+2
-2
@@ -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