I have a master that very frequently executes INSERT ON DUPLICATE KEY UPDATE. On a slave I executed ALTER TABLE xx row_format=COMPRESSED;, however this resulted in an error (the specific key is a UNIQUE) from the ALTER statement, which did not succeed:
ERROR 1062 (23000): Duplicate entry 'xxx-xxx' for key 'xxx'
I assume this is because it received an UPSERT while it was altering the table. I think this shouldn't happen as the alter-table should have a lock on the table.
Attachments
Issue Links
blocks
MDEV-26294Duplicate entries in unique index not detected when changing collation with INPLACE / NOCOPY algoritm
Closed
MDEV-27747Assertion `log->blobs' failed in row_log_table_apply_update upon ALTER TABLE
Closed
MDEV-29519InnoDB: Failing assertion: rec in storage/innobase/lock/lock0lock.cc line 5052
thiru, I hope that you can complete my prototype. I believe that fixing this may simplify the MDEV-26294 fix in the case that row_log_apply() completed but the ALTER TABLE operation was not committed yet (because the SQL layer is waiting for MDL_EXCLUSIVE, which is blocked by concurrent DML transactions).
Marko Mäkelä
added a comment - thiru , I hope that you can complete my prototype. I believe that fixing this may simplify the MDEV-26294 fix in the case that row_log_apply() completed but the ALTER TABLE operation was not committed yet (because the SQL layer is waiting for MDL_EXCLUSIVE , which is blocked by concurrent DML transactions).
I posted the first batch of review comments. I did not yet thoroughly check all the new code in trx_t::apply_log(), especially the trx_undo_rec_info. Some source code comments would be very helpful in that area.
Marko Mäkelä
added a comment - I posted the first batch of review comments . I did not yet thoroughly check all the new code in trx_t::apply_log() , especially the trx_undo_rec_info . Some source code comments would be very helpful in that area.
origin/bb-10.6-MDEV-15250 f9c152c9f6b770961cdd8467ce05548347812ed8 2022-04-22T18:15:48+05:30
behaved well in RQG testing. The bad effects observed are known and in the main trees too.
Matthias Leich
added a comment - origin/bb-10.6- MDEV-15250 f9c152c9f6b770961cdd8467ce05548347812ed8 2022-04-22T18:15:48+05:30
behaved well in RQG testing. The bad effects observed are known and in the main trees too.
People
Thirunarayanan Balathandayuthapani
sjon
Votes:
1Vote for this issue
Watchers:
8Start watching this issue
Dates
Created:
Updated:
Resolved:
Git Integration
Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.
{"report":{"fcp":1484.2000000476837,"ttfb":280.59999990463257,"pageVisibility":"visible","entityId":65793,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"6c577b71-d745-4e40-bf16-7d2b48963ba7","navigationType":0,"readyForUser":1587.5,"redirectCount":0,"resourceLoadedEnd":1159.5,"resourceLoadedStart":296.7999999523163,"resourceTiming":[{"duration":309.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":296.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":296.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":606.5999999046326,"responseStart":0,"secureConnectionStart":0},{"duration":334.7999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":297.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":297.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":631.8999998569489,"responseStart":0,"secureConnectionStart":0},{"duration":634.0999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":297.2000000476837,"connectEnd":297.2000000476837,"connectStart":297.2000000476837,"domainLookupEnd":297.2000000476837,"domainLookupStart":297.2000000476837,"fetchStart":297.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":634.3999998569489,"responseEnd":931.2999999523163,"responseStart":653.0999999046326,"secureConnectionStart":297.2000000476837},{"duration":862.1000001430511,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":297.39999985694885,"connectEnd":297.39999985694885,"connectStart":297.39999985694885,"domainLookupEnd":297.39999985694885,"domainLookupStart":297.39999985694885,"fetchStart":297.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":633,"responseEnd":1159.5,"responseStart":663.3999998569489,"secureConnectionStart":297.39999985694885},{"duration":362.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":297.7000000476837,"connectEnd":297.7000000476837,"connectStart":297.7000000476837,"domainLookupEnd":297.7000000476837,"domainLookupStart":297.7000000476837,"fetchStart":297.7000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":634.7000000476837,"responseEnd":660.2000000476837,"responseStart":658.0999999046326,"secureConnectionStart":297.7000000476837},{"duration":364.2999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":297.7999999523163,"connectEnd":297.7999999523163,"connectStart":297.7999999523163,"domainLookupEnd":297.7999999523163,"domainLookupStart":297.7999999523163,"fetchStart":297.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":639.2000000476837,"responseEnd":662.0999999046326,"responseStart":660.3999998569489,"secureConnectionStart":297.7999999523163},{"duration":364.10000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":298.09999990463257,"connectEnd":298.09999990463257,"connectStart":298.09999990463257,"domainLookupEnd":298.09999990463257,"domainLookupStart":298.09999990463257,"fetchStart":298.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":639.2999999523163,"responseEnd":662.2000000476837,"responseStart":660.8999998569489,"secureConnectionStart":298.09999990463257},{"duration":340.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":298.2999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":298.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":638.5,"responseStart":0,"secureConnectionStart":0},{"duration":365.7999999523163,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":298.5,"connectEnd":298.5,"connectStart":298.5,"domainLookupEnd":298.5,"domainLookupStart":298.5,"fetchStart":298.5,"redirectEnd":0,"redirectStart":0,"requestStart":640.2999999523163,"responseEnd":664.2999999523163,"responseStart":662.5,"secureConnectionStart":298.5},{"duration":340.2000000476837,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":298.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":298.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":638.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":367.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":298.89999985694885,"connectEnd":298.89999985694885,"connectStart":298.89999985694885,"domainLookupEnd":298.89999985694885,"domainLookupStart":298.89999985694885,"fetchStart":298.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":645.2999999523163,"responseEnd":666.2999999523163,"responseStart":664.5,"secureConnectionStart":298.89999985694885},{"duration":852.5999999046326,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":300.7999999523163,"connectEnd":300.7999999523163,"connectStart":300.7999999523163,"domainLookupEnd":300.7999999523163,"domainLookupStart":300.7999999523163,"fetchStart":300.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":946.7000000476837,"responseEnd":1153.3999998569489,"responseStart":1148.0999999046326,"secureConnectionStart":300.7999999523163},{"duration":853.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":300.7999999523163,"connectEnd":300.7999999523163,"connectStart":300.7999999523163,"domainLookupEnd":300.7999999523163,"domainLookupStart":300.7999999523163,"fetchStart":300.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":947.7999999523163,"responseEnd":1154.5,"responseStart":1150.2000000476837,"secureConnectionStart":300.7999999523163},{"duration":203.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1072.5999999046326,"connectEnd":1072.5999999046326,"connectStart":1072.5999999046326,"domainLookupEnd":1072.5999999046326,"domainLookupStart":1072.5999999046326,"fetchStart":1072.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":1244.0999999046326,"responseEnd":1275.7999999523163,"responseStart":1275.0999999046326,"secureConnectionStart":1072.5999999046326},{"duration":218.40000009536743,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1423.2999999523163,"connectEnd":1423.2999999523163,"connectStart":1423.2999999523163,"domainLookupEnd":1423.2999999523163,"domainLookupStart":1423.2999999523163,"fetchStart":1423.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1609.7000000476837,"responseEnd":1641.7000000476837,"responseStart":1640.7999999523163,"secureConnectionStart":1423.2999999523163},{"duration":243.5,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1477,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1477,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1720.5,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":37,"domainLookupEnd":60,"connectStart":60,"connectEnd":79,"secureConnectionStart":68,"requestStart":81,"responseStart":281,"responseEnd":292,"domLoading":285,"domInteractive":1724,"domContentLoadedEventStart":1725,"domContentLoadedEventEnd":1800,"domComplete":2151,"loadEventStart":2151,"loadEventEnd":2151,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1691.5},{"name":"bigPipe.sidebar-id.end","time":1692.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1692.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1694.2999999523163},{"name":"activityTabFullyLoaded","time":1820.7999999523163}],"measures":[],"correlationId":"3df95c3400653f","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":117,"dbReadsTimeInMs":26,"dbConnsTimeInMs":37,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
thiru, I hope that you can complete my prototype. I believe that fixing this may simplify the
MDEV-26294fix in the case that row_log_apply() completed but the ALTER TABLE operation was not committed yet (because the SQL layer is waiting for MDL_EXCLUSIVE, which is blocked by concurrent DML transactions).