From a23c6325f946e3005c00bef436aa81814026c27c Mon Sep 17 00:00:00 2001 From: Ben White Date: Wed, 4 Sep 2024 09:35:47 +0200 Subject: [PATCH] Disable overflow routing --- plugin-server/src/cdp/cdp-consumers.ts | 33 +------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) diff --git a/plugin-server/src/cdp/cdp-consumers.ts b/plugin-server/src/cdp/cdp-consumers.ts index 1baec072be7bd..544947ba6a5be 100644 --- a/plugin-server/src/cdp/cdp-consumers.ts +++ b/plugin-server/src/cdp/cdp-consumers.ts @@ -400,39 +400,8 @@ abstract class CdpConsumerBase { }) }) - const overflowGlobalsAndFunctions: Record = {} - - const notOverflowedInvocations = notMaskedInvocations.filter((item) => { - const state = states[item.hogFunction.id].state - - if (state === HogWatcherState.degraded) { - const key = `${item.globals.project.id}-${item.globals.event.uuid}` - overflowGlobalsAndFunctions[key] = overflowGlobalsAndFunctions[key] || { - globals: item.globals, - hogFunctionIds: [], - } - - overflowGlobalsAndFunctions[key].hogFunctionIds.push(item.hogFunction.id) - counterFunctionInvocation.inc({ outcome: 'overflowed' }, 1) - return false - } - - return true - }) - - Object.values(overflowGlobalsAndFunctions).forEach((item) => { - this.messagesToProduce.push({ - topic: KAFKA_CDP_FUNCTION_OVERFLOW, - value: { - source: 'event_invocations', - payload: item, - }, - key: item.globals.event.uuid, - }) - }) - const results = ( - await this.runManyWithHeartbeat(notOverflowedInvocations, (item) => + await this.runManyWithHeartbeat(notMaskedInvocations, (item) => this.hogExecutor.executeFunction(item.globals, item.hogFunction) ) ).filter((x) => !!x) as HogFunctionInvocationResult[]