Record inserted twice for publishable document


A publishible doc is published to Broker, which is subscribed by many triggers.
One of the trigger subscribes to that document according to some filter conditions.
The trigger(handler) service processes the document.
The handler service checks for the record existence in the db table, If the record exists, it updates the existing record in the table with the doc contents . If the record is not present in the table, then it inserts a new record in the table.
It is clear that duplicate records cannot be inserted in the db table.
My now problem is , There appears to be duplicate records in the table which is reported by the customer.
How can this happen?
The processing type is Serial for the trigger.
I tested with document and everything goes fine.
But could not figure why this occured and what is causing this.

I really appreciate for the answers.