From 57ae3747932a7063bd853fdbbce98cf60dda72e2 Mon Sep 17 00:00:00 2001 From: Iraq Jaber Date: Fri, 8 Aug 2025 16:57:02 +0100 Subject: [PATCH] fix(projections): added check to make sure there cannot be 2 projections for the same table --- internal/query/projection/projection.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/query/projection/projection.go b/internal/query/projection/projection.go index e6f9c64b01..6afe658cc3 100644 --- a/internal/query/projection/projection.go +++ b/internal/query/projection/projection.go @@ -210,7 +210,14 @@ func Init(ctx context.Context) error { } func Start(ctx context.Context) { + projectionTableMap := make(map[string]bool, len(projections)) for _, projection := range projections { + table := projection.String() + if projectionTableMap[table] { + panic("projeciton for " + projection.String() + " already added") + } + projectionTableMap[table] = true + projection.Start(ctx) } }