Noticed undesired behaviour how event (CREATE EVENT) initiates executions. New session created despite the fact that previous call hasn't ended yet. This creates concurrency and locks.
Would be nice to have option that new instance isn't started if previous call execution is still in action at scheduled time. As it works in Oracle jobs.
This is intentional. We recommend that if you don't need concurrent execution, you use user-level locks, for example
IF GET_LOCK('my_event_lock_1', 2) THEN
...
ENDIF;
On the other hand, if MariaDB would automatically skip events because of concurrent execution, there would've been no way for a user to implement concurrent execution if needed.
Sergei Golubchik
added a comment - This is intentional. We recommend that if you don't need concurrent execution, you use user-level locks, for example
IF GET_LOCK( 'my_event_lock_1' , 2) THEN
...
END IF ;
On the other hand, if MariaDB would automatically skip events because of concurrent execution, there would've been no way for a user to implement concurrent execution if needed.
Sergei Golubchik
added a comment - But the documentation could spell this out explicitly. I couldn't find it in
https://mariadb.com/kb/en/events/
https://mariadb.com/kb/en/event-limitations/
https://mariadb.com/kb/en/create-event/
Thank you for suggested idea to use GET_LOCK. That's acceptable. But it would be even better if additional option would be added to CREATE EVENT, ALTER EVENT commands, then there will be no need to implement locking for every single procedure called by each different event. So it becomes more like feature request now.
Tadas Balaišis
added a comment - - edited Thank you for suggested idea to use GET_LOCK. That's acceptable. But it would be even better if additional option would be added to CREATE EVENT, ALTER EVENT commands, then there will be no need to implement locking for every single procedure called by each different event. So it becomes more like feature request now.
I agree, an additional option could solve it for users who want to disallow concurrent execution, while still allowing it, when needed
Sergei Golubchik
added a comment - I agree, an additional option could solve it for users who want to disallow concurrent execution, while still allowing it, when needed
People
Unassigned
Tadas Balaišis
Votes:
0Vote for this issue
Watchers:
2Start watching this issue
Dates
Created:
Updated:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1038.7000000476837,"ttfb":170.80000019073486,"pageVisibility":"visible","entityId":127306,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"43f2896f-d4ef-4ddf-92f4-8136a2266954","navigationType":0,"readyForUser":1124.2000000476837,"redirectCount":0,"resourceLoadedEnd":777.3000001907349,"resourceLoadedStart":179.90000009536743,"resourceTiming":[{"duration":49.5,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":179.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":179.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":229.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":49.19999980926514,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":180.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":180.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":229.5,"responseStart":0,"secureConnectionStart":0},{"duration":455.90000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":180.5,"connectEnd":180.5,"connectStart":180.5,"domainLookupEnd":180.5,"domainLookupStart":180.5,"fetchStart":180.5,"redirectEnd":0,"redirectStart":0,"requestStart":231.70000004768372,"responseEnd":636.4000000953674,"responseStart":317.40000009536743,"secureConnectionStart":180.5},{"duration":596.8000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":180.5,"connectEnd":180.5,"connectStart":180.5,"domainLookupEnd":180.5,"domainLookupStart":180.5,"fetchStart":180.5,"redirectEnd":0,"redirectStart":0,"requestStart":231.70000004768372,"responseEnd":777.3000001907349,"responseStart":311.80000019073486,"secureConnectionStart":180.5},{"duration":136.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":180.80000019073486,"connectEnd":180.80000019073486,"connectStart":180.80000019073486,"domainLookupEnd":180.80000019073486,"domainLookupStart":180.80000019073486,"fetchStart":180.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":231.80000019073486,"responseEnd":317.30000019073486,"responseStart":316.10000014305115,"secureConnectionStart":180.80000019073486},{"duration":135.19999980926514,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":180.80000019073486,"connectEnd":180.80000019073486,"connectStart":180.80000019073486,"domainLookupEnd":180.80000019073486,"domainLookupStart":180.80000019073486,"fetchStart":180.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":231.90000009536743,"responseEnd":316,"responseStart":315.2000000476837,"secureConnectionStart":180.80000019073486},{"duration":170.70000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":181.10000014305115,"connectEnd":181.10000014305115,"connectStart":181.10000014305115,"domainLookupEnd":181.10000014305115,"domainLookupStart":181.10000014305115,"fetchStart":181.10000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":232,"responseEnd":351.80000019073486,"responseStart":351.2000000476837,"secureConnectionStart":181.10000014305115},{"duration":49.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":181.30000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.30000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":230.40000009536743,"responseStart":0,"secureConnectionStart":0},{"duration":130.09999990463257,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":181.60000014305115,"connectEnd":181.60000014305115,"connectStart":181.60000014305115,"domainLookupEnd":181.60000014305115,"domainLookupStart":181.60000014305115,"fetchStart":181.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":232,"responseEnd":311.7000000476837,"responseStart":311.10000014305115,"secureConnectionStart":181.60000014305115},{"duration":48.799999952316284,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":181.80000019073486,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":181.80000019073486,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":230.60000014305115,"responseStart":0,"secureConnectionStart":0},{"duration":169.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":182,"connectEnd":182,"connectStart":182,"domainLookupEnd":182,"domainLookupStart":182,"fetchStart":182,"redirectEnd":0,"redirectStart":0,"requestStart":232.20000004768372,"responseEnd":351.10000014305115,"responseStart":348.80000019073486,"secureConnectionStart":182},{"duration":312.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":209.60000014305115,"connectEnd":209.60000014305115,"connectStart":209.60000014305115,"domainLookupEnd":209.60000014305115,"domainLookupStart":209.60000014305115,"fetchStart":209.60000014305115,"redirectEnd":0,"redirectStart":0,"requestStart":320.60000014305115,"responseEnd":521.8000001907349,"responseStart":514.8000001907349,"secureConnectionStart":209.60000014305115},{"duration":312.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":209.70000004768372,"connectEnd":209.70000004768372,"connectStart":209.70000004768372,"domainLookupEnd":209.70000004768372,"domainLookupStart":209.70000004768372,"fetchStart":209.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":350.5,"responseEnd":522.3000001907349,"responseStart":516.5,"secureConnectionStart":209.70000004768372},{"duration":149,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":761.6000001430511,"connectEnd":761.6000001430511,"connectStart":761.6000001430511,"domainLookupEnd":761.6000001430511,"domainLookupStart":761.6000001430511,"fetchStart":761.6000001430511,"redirectEnd":0,"redirectStart":0,"requestStart":873.4000000953674,"responseEnd":910.6000001430511,"responseStart":908.1000001430511,"secureConnectionStart":761.6000001430511}],"fetchStart":1,"domainLookupStart":1,"domainLookupEnd":1,"connectStart":1,"connectEnd":1,"requestStart":55,"responseStart":171,"responseEnd":199,"domLoading":175,"domInteractive":1213,"domContentLoadedEventStart":1213,"domContentLoadedEventEnd":1257,"domComplete":1789,"loadEventStart":1789,"loadEventEnd":1790,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1189.2000000476837},{"name":"bigPipe.sidebar-id.end","time":1190.1000001430511},{"name":"bigPipe.activity-panel-pipe-id.start","time":1190.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":1192.2000000476837},{"name":"activityTabFullyLoaded","time":1275.2000000476837}],"measures":[],"correlationId":"b97307a3e3e25","effectiveType":"4g","downlink":9.1,"rtt":0,"serverDuration":68,"dbReadsTimeInMs":9,"dbConnsTimeInMs":15,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
This is intentional. We recommend that if you don't need concurrent execution, you use user-level locks, for example
...
On the other hand, if MariaDB would automatically skip events because of concurrent execution, there would've been no way for a user to implement concurrent execution if needed.