fix: minor counting fit for creating index pages
This commit is contained in:
parent
a6ad0b18d1
commit
6b1d1640ef
1 changed files with 3 additions and 1 deletions
|
@ -73,6 +73,7 @@ public partial class CreateOrUpdateIndex : OperationBase
|
||||||
// find, we update with the existing entries. If we get to the end and
|
// find, we update with the existing entries. If we get to the end and
|
||||||
// still have any left over, we create those pages.
|
// still have any left over, we create those pages.
|
||||||
HashSet<string> existing = new();
|
HashSet<string> existing = new();
|
||||||
|
int created = 0;
|
||||||
|
|
||||||
foreach (Entity? entity in input)
|
foreach (Entity? entity in input)
|
||||||
{
|
{
|
||||||
|
@ -102,6 +103,7 @@ public partial class CreateOrUpdateIndex : OperationBase
|
||||||
{
|
{
|
||||||
foreach (string key in scanned.Keys.Where(key => !existing.Contains(key)))
|
foreach (string key in scanned.Keys.Where(key => !existing.Contains(key)))
|
||||||
{
|
{
|
||||||
|
created++;
|
||||||
yield return this.CreateIndex(key, scanned[key]);
|
yield return this.CreateIndex(key, scanned[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -110,7 +112,7 @@ public partial class CreateOrUpdateIndex : OperationBase
|
||||||
this.logger.LogDebug(
|
this.logger.LogDebug(
|
||||||
"Found {Old:N0} and created {New:N0} index pages for {Keys:N0} keys",
|
"Found {Old:N0} and created {New:N0} index pages for {Keys:N0} keys",
|
||||||
existing.Count,
|
existing.Count,
|
||||||
scanned.Count - existing.Count,
|
created,
|
||||||
scanned.Keys.Count()
|
scanned.Keys.Count()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue