mirror of
https://github.com/usatiuk/dhfs.git
synced 2025-10-29 04:57:48 +01:00
Server: fix chunk merging
This commit is contained in:
@@ -474,6 +474,8 @@ public class DhfsFileServiceImpl implements DhfsFileService {
|
||||
continue;
|
||||
}
|
||||
|
||||
// FIXME: (and test this)
|
||||
beforeFirst = beforeFirst.headMap(takeLeft.getKey(), false);
|
||||
start = takeLeft.getKey();
|
||||
pendingWrites = readChunk(cuuid).concat(pendingWrites);
|
||||
combinedSize += getChunkSize(cuuid);
|
||||
@@ -495,6 +497,8 @@ public class DhfsFileServiceImpl implements DhfsFileService {
|
||||
continue;
|
||||
}
|
||||
|
||||
// FIXME: (and test this)
|
||||
afterLast = afterLast.tailMap(takeRight.getKey(), false);
|
||||
pendingWrites = pendingWrites.concat(readChunk(cuuid));
|
||||
combinedSize += getChunkSize(cuuid);
|
||||
removedChunks.put(takeRight.getKey(), takeRight.getValue());
|
||||
|
||||
Reference in New Issue
Block a user