Hi!

Hi!

On Tue, Aug 15, 2023 at 11:24 PM kpesio--- via discuss
<[email protected]> wrote:
>
> Hi. Could someone confirm in some way about running multiple events at same 
> time.
>
> Documentation at 
> https://mariadb.com/kb/en/automating-mariadb-tasks-with-events/ states:
> "The event scheduler runs as a single thread. If any event is supposed to 
> start while another event is running, its execution will be skipped."

Events are put in a queue, sorted by next execution time
There are no skipping of events for which execution time has already expired.
This can be verified by looking at:
bool Event_queue::get_top_for_execution_if_time()

As Kristian pointed out, if there next execution time for an event put
back in queue is lower than the current time,
it's next execution time will be adjusted. However older events should
be executed before this one.

The next execution time is calculated in
Event_queue_element::compute_next_execution_time().
Sorry, but this code is a bit complex so I don't have time to go into
details now.
However I am reasonable sure that there will be no starving of old events.

I will fix the documentation to be more clear about this

Regards,
Monty
_______________________________________________
discuss mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to