I am writing a trigger that processes data as it comes in from an external process. I cannot control how much data is sent for processing, or how often the data arrives.
I am curious to know what would happen in the following scenario:
- A first batch of data arrives, the trigger is fired and processes data. The data contains many records, and processing takes let's say 5 seconds for argument's sake.
- Three seconds later, another second batch of data arrives that should also fire the trigger (3 seconds into the first batch being processed which will still run for a further 2 seconds).
My question is, do the two instances of the trigger run at the same time (the second instance runs as soon as it is fired), or does the second instance fire, but wait for processing of the first to complete?
Thanks in advance.