From e2a146cf5d8ab94baa218c176560ea4e47b1c026 Mon Sep 17 00:00:00 2001 From: gagliardetto Date: Thu, 9 May 2024 14:19:20 +0200 Subject: [PATCH] Cleanup --- bucketteer/write.go | 3 ++- deprecated/bucketteer/write.go | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bucketteer/write.go b/bucketteer/write.go index bc4f8024..01f927f9 100644 --- a/bucketteer/write.go +++ b/bucketteer/write.go @@ -11,6 +11,7 @@ import ( bin "github.com/gagliardetto/binary" "github.com/rpcpool/yellowstone-faithful/indexmeta" + "k8s.io/klog/v2" ) type Writer struct { @@ -226,7 +227,7 @@ func seal( for prefix := range prefixToHashes { entries := getCleanSet(prefixToHashes[prefix]) if len(entries) != len(prefixToHashes[prefix]) { - panic(fmt.Sprintf("duplicate hashes for prefix %v", prefix)) + klog.Errorf("duplicate hashes for prefix %v", prefix) } sortWithCompare(entries, func(i, j int) int { if entries[i] < entries[j] { diff --git a/deprecated/bucketteer/write.go b/deprecated/bucketteer/write.go index 5837f1be..9b9cf343 100644 --- a/deprecated/bucketteer/write.go +++ b/deprecated/bucketteer/write.go @@ -9,6 +9,7 @@ import ( "sort" bin "github.com/gagliardetto/binary" + "k8s.io/klog/v2" ) type Writer struct { @@ -206,7 +207,7 @@ func seal( for _, prefix := range prefixes { entries := getCleanSet(prefixToHashes[prefix]) if len(entries) != len(prefixToHashes[prefix]) { - panic(fmt.Sprintf("duplicate hashes for prefix %v", prefix)) + klog.Errorf("duplicate hashes for prefix %v", prefix) } sortWithCompare(entries, func(i, j int) int { if entries[i] < entries[j] {