mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
fix reading chunk length calculation
This commit is contained in:
parent
270e91b0be
commit
c055ee7334
@ -103,7 +103,7 @@ public class SeaweedRead {
|
||||
chunkCache.setChunk(chunkView.fileId, chunkData);
|
||||
}
|
||||
|
||||
int len = (int) chunkView.size;
|
||||
int len = (int) chunkView.size - (int) (startOffset - chunkView.logicOffset);
|
||||
LOG.debug("readChunkView fid:{} chunkData.length:{} chunkView.offset:{} chunkView[{};{}) startOffset:{}",
|
||||
chunkView.fileId, chunkData.length, chunkView.offset, chunkView.logicOffset, chunkView.logicOffset + chunkView.size, startOffset);
|
||||
buf.put(chunkData, (int) (startOffset - chunkView.logicOffset + chunkView.offset), len);
|
||||
|
Loading…
Reference in New Issue
Block a user