Skip to content

Commit e352e87

Browse files
author
lizongwei
committed
capacity应该=endversion-startversion+1 ,读取归档数据也存在漏掉数据的问题,极端情况,刚好漏掉的数据在另外一个历史数据库表。
1 parent b21630c commit e352e87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Storage/Vertex.Storage.Linq2db/Storage/EventArchive.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public async Task<List<EventDocument<TPrimaryKey>>> GetList(TPrimaryKey actorId,
9696
using var db = this.dbFactory.GetEventDb(this.optionName);
9797
var tables = (await db.GetTables()).Where(this.tableFilter).ToList();
9898
tables.Reverse();
99-
var capacity = (int)(endVersion - startVersion);
99+
var capacity = (int)(endVersion - startVersion) + 1;
100100
var result = new List<EventDocument<TPrimaryKey>>(capacity);
101101
switch (actorId)
102102
{

0 commit comments

Comments
 (0)