fix(mount): return dropped error (#8623)
This commit is contained in:
@@ -226,6 +226,7 @@ func (c *RDMAMountClient) ReadNeedle(ctx context.Context, fileID string, offset,
|
|||||||
|
|
||||||
var data []byte
|
var data []byte
|
||||||
|
|
||||||
|
var n int
|
||||||
if useTempFile && tempFilePath != "" {
|
if useTempFile && tempFilePath != "" {
|
||||||
// Zero-copy path: read from temp file (page cache)
|
// Zero-copy path: read from temp file (page cache)
|
||||||
glog.V(4).Infof("🔥 Using zero-copy temp file: %s", tempFilePath)
|
glog.V(4).Infof("🔥 Using zero-copy temp file: %s", tempFilePath)
|
||||||
@@ -237,7 +238,7 @@ func (c *RDMAMountClient) ReadNeedle(ctx context.Context, fileID string, offset,
|
|||||||
}
|
}
|
||||||
buffer := make([]byte, bufferSize)
|
buffer := make([]byte, bufferSize)
|
||||||
|
|
||||||
n, err := c.readFromTempFile(tempFilePath, buffer)
|
n, err = c.readFromTempFile(tempFilePath, buffer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.V(2).Infof("Zero-copy failed, falling back to HTTP body: %v", err)
|
glog.V(2).Infof("Zero-copy failed, falling back to HTTP body: %v", err)
|
||||||
// Fall back to reading HTTP body
|
// Fall back to reading HTTP body
|
||||||
|
|||||||
Reference in New Issue
Block a user