From 6db2309e2c4b02c3811c339bb89c106a882e4ddc Mon Sep 17 00:00:00 2001 From: ayushaga14 Date: Thu, 17 Jul 2025 11:27:27 +0530 Subject: [PATCH 1/3] add process restart --- ebpf-run.sh | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/ebpf-run.sh b/ebpf-run.sh index a85566c..7061338 100644 --- a/ebpf-run.sh +++ b/ebpf-run.sh @@ -24,10 +24,25 @@ fi while : do -if [[ "${ENABLE_LOGS}" == "false" ]]; then - ./ebpf-logging >> "$LOG_FILE" 2>&1 -else - ./ebpf-logging -fi + # Start the mirroring module in the background + if [[ "${ENABLE_LOGS}" == "false" ]]; then + /mirroring-api-logging >> "$LOG_FILE" 2>&1 & + else + /mirroring-api-logging & + fi + mirroring_pid=$! + + # Monitor the process for 1 hour + elapsed=0 + while [ $elapsed -lt 600 ]; do + if ! kill -0 $mirroring_pid 2>/dev/null; then + break + fi + sleep 2 + elapsed=$((elapsed + 2)) + done + + # Kill the mirroring process after 1 hour or if it stopped + kill $mirroring_pid 2>/dev/null sleep 2 done From f08789311fbc55b7cfd92f436d0618b735e27162 Mon Sep 17 00:00:00 2001 From: ayushaga14 Date: Thu, 17 Jul 2025 11:42:17 +0530 Subject: [PATCH 2/3] fix --- ebpf-run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ebpf-run.sh b/ebpf-run.sh index 7061338..12c8d4e 100644 --- a/ebpf-run.sh +++ b/ebpf-run.sh @@ -26,9 +26,9 @@ while : do # Start the mirroring module in the background if [[ "${ENABLE_LOGS}" == "false" ]]; then - /mirroring-api-logging >> "$LOG_FILE" 2>&1 & + ./ebpf-logging >> "$LOG_FILE" 2>&1 & else - /mirroring-api-logging & + ./ebpf-logging & fi mirroring_pid=$! From ead43df96e442de0d57d0bfe4ff8a5b03c455381 Mon Sep 17 00:00:00 2001 From: gauravakto Date: Thu, 17 Jul 2025 14:36:12 +0530 Subject: [PATCH 3/3] Update kafka.go --- trafficUtil/kafkaUtil/kafka.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trafficUtil/kafkaUtil/kafka.go b/trafficUtil/kafkaUtil/kafka.go index 979b72e..9c91aad 100644 --- a/trafficUtil/kafkaUtil/kafka.go +++ b/trafficUtil/kafkaUtil/kafka.go @@ -306,7 +306,7 @@ func getKafkaWriter(kafkaURL string, batchSize int, batchTimeout time.Duration) WriteTimeout: batchTimeout, Async: true, Balancer: &kafka.Hash{}, - Compression: kafka.Zstd, + Compression: kafka.Lz4, } if useTLS {