-
Notifications
You must be signed in to change notification settings - Fork 694
Closed
Description
From the source code it looks like once you've made a request to read contents of the file it will set the objectStat
field and will return that instead of making another request. However, when you call Stat() on the object it makes another request. Debugging showed that both isStarted
and objectInfoSet
are false:
Line 428 in de1893f
if !o.isStarted || !o.objectInfoSet { |
And the reason is that response.Error
is io.EOF
and the other parts of the code never get executed.
Lines 321 to 323 in de1893f
if response.Error != nil { | |
return response, response.Error | |
} |
obj, err := client.GetObject(ctx, "my-bucket", "my-file.txt", minio.GetObjectOptions{})
if err != nil {
return err
}
buf, err := io.ReadAll(obj)
lockfileStat, err := lockfile.Stat() // <--- this makes another request
if err != nil {
return err
}
Metadata
Metadata
Assignees
Labels
No labels