From dcb2c5affd89f4475516a4cff37d0fa5cadb1864 Mon Sep 17 00:00:00 2001 From: Dirk Zimoch Date: Tue, 28 Jun 2022 09:08:57 +0200 Subject: [PATCH] fix CA event queuing problem with arrays under high network load --- modules/database/src/ioc/db/dbEvent.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/database/src/ioc/db/dbEvent.c b/modules/database/src/ioc/db/dbEvent.c index b3c641798..4af4a8952 100644 --- a/modules/database/src/ioc/db/dbEvent.c +++ b/modules/database/src/ioc/db/dbEvent.c @@ -789,6 +789,18 @@ static void db_queue_event_log (evSubscrip *pevent, db_field_log *pLog) LOCKEVQUE (ev_que); + /* if we have an event on the queue and both the last + * event on the queue and the current event are empty, + * simply ignore duplicate events. + */ + if (pevent->npend > 0u + && !dbfl_has_copy(*pevent->pLastLog) + && !dbfl_has_copy(pLog)) { + db_delete_field_log(pLog); + UNLOCKEVQUE (ev_que); + return; + } + /* * add to task local event que */