We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0aefbc commit 0be3dd6Copy full SHA for 0be3dd6
LiteDB/Engine/Disk/DiskService.cs
@@ -259,7 +259,9 @@ public IEnumerable<PageBuffer> ReadFull(FileOrigin origin)
259
{
260
var position = stream.Position;
261
262
- stream.Read(buffer, 0, PAGE_SIZE);
+ var bytesRead = stream.Read(buffer, 0, PAGE_SIZE);
263
+
264
+ ENSURE(bytesRead == PAGE_SIZE, $"ReadFull must read PAGE_SIZE bytes [{bytesRead}]");
265
266
yield return new PageBuffer(buffer, 0, 0)
267
0 commit comments