From 6d55831884a0050dce08d3b314225d2f609994fe Mon Sep 17 00:00:00 2001 From: Thejas-bhat Date: Fri, 21 Aug 2026 10:15:45 -0700 Subject: [PATCH 1/2] fix racy read --- stats.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stats.go b/stats.go index 6e2b4db..74758d7 100644 --- a/stats.go +++ b/stats.go @@ -68,7 +68,7 @@ type Stats struct { } func (s *Stats) StatsMap() map[string]interface{} { - svet := reflect.TypeOf(*s) + svet := reflect.TypeOf(s).Elem() n := svet.NumField() m := make(map[string]interface{}, n) base := unsafe.Pointer(s) From 32b5fb12608c9b05d5ec23026313874794859fcc Mon Sep 17 00:00:00 2001 From: Thejas-bhat Date: Fri, 21 Aug 2026 11:35:47 -0700 Subject: [PATCH 2/2] udpate error stats --- stats.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stats.go b/stats.go index 74758d7..38def77 100644 --- a/stats.go +++ b/stats.go @@ -28,9 +28,9 @@ type Stats struct { TotNewDocsDropped uint64 TotNewVectorsProcessed uint64 - TotPersistBeg uint64 - TotPersistEnd uint64 - TotPersistErrors uint64 + TotPersistBeg uint64 + TotPersistEnd uint64 + TotPersistErr uint64 TotMergesBeg uint64 TotMergesEnd uint64 @@ -41,6 +41,7 @@ type Stats struct { TotVecSectionMergesBegin uint64 TotVecSectionMergesEnd uint64 + TotVecSectionMergeErr uint64 TotVecSectionMergeTime uint64 TotVecSectionVecsReconstructed uint64 TotVecSectionIVFIndexesCreated uint64