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":1392.4000000953674,"ttfb":349.90000009536743,"pageVisibility":"visible","entityId":65793,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"63c27320-2f83-46db-bc64-bac4e2d9b6da","navigationType":0,"readyForUser":1502.7000000476837,"redirectCount":0,"resourceLoadedEnd":1295.7999999523163,"resourceLoadedStart":375.59999990463257,"resourceTiming":[{"duration":167.70000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":375.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":375.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":543.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":168,"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":375.7999999523163,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":375.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":543.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":471,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":376,"connectEnd":376,"connectStart":376,"domainLookupEnd":376,"domainLookupStart":376,"fetchStart":376,"redirectEnd":0,"redirectStart":0,"requestStart":549.5,"responseEnd":847,"responseStart":587.2000000476837,"secureConnectionStart":376},{"duration":719.7999999523163,"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":376.2999999523163,"connectEnd":376.2999999523163,"connectStart":376.2999999523163,"domainLookupEnd":376.2999999523163,"domainLookupStart":376.2999999523163,"fetchStart":376.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":549.5999999046326,"responseEnd":1096.0999999046326,"responseStart":588,"secureConnectionStart":376.2999999523163},{"duration":219.69999980926514,"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":376.40000009536743,"connectEnd":376.40000009536743,"connectStart":376.40000009536743,"domainLookupEnd":376.40000009536743,"domainLookupStart":376.40000009536743,"fetchStart":376.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":552.7000000476837,"responseEnd":596.0999999046326,"responseStart":591.5999999046326,"secureConnectionStart":376.40000009536743},{"duration":214.20000004768372,"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":376.5,"connectEnd":376.5,"connectStart":376.5,"domainLookupEnd":376.5,"domainLookupStart":376.5,"fetchStart":376.5,"redirectEnd":0,"redirectStart":0,"requestStart":549.7999999523163,"responseEnd":590.7000000476837,"responseStart":589.4000000953674,"secureConnectionStart":376.5},{"duration":219.5,"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":376.7999999523163,"connectEnd":376.7999999523163,"connectStart":376.7999999523163,"domainLookupEnd":376.7999999523163,"domainLookupStart":376.7999999523163,"fetchStart":376.7999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":553.0999999046326,"responseEnd":596.2999999523163,"responseStart":592.4000000953674,"secureConnectionStart":376.7999999523163},{"duration":172,"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":377,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":377,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":549,"responseStart":0,"secureConnectionStart":0},{"duration":219.5,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":377.09999990463257,"connectEnd":377.09999990463257,"connectStart":377.09999990463257,"domainLookupEnd":377.09999990463257,"domainLookupStart":377.09999990463257,"fetchStart":377.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":554,"responseEnd":596.5999999046326,"responseStart":593,"secureConnectionStart":377.09999990463257},{"duration":172.20000004768372,"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":377.2000000476837,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":377.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":549.4000000953674,"responseStart":0,"secureConnectionStart":0},{"duration":220.5,"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":377.40000009536743,"connectEnd":377.40000009536743,"connectStart":377.40000009536743,"domainLookupEnd":377.40000009536743,"domainLookupStart":377.40000009536743,"fetchStart":377.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":554.5999999046326,"responseEnd":597.9000000953674,"responseStart":596.7000000476837,"secureConnectionStart":377.40000009536743},{"duration":916.2000000476837,"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":379.2000000476837,"connectEnd":379.2000000476837,"connectStart":379.2000000476837,"domainLookupEnd":379.2000000476837,"domainLookupStart":379.2000000476837,"fetchStart":379.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1276.4000000953674,"responseEnd":1295.4000000953674,"responseStart":1291.7999999523163,"secureConnectionStart":379.2000000476837},{"duration":916.5999999046326,"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":379.2000000476837,"connectEnd":379.2000000476837,"connectStart":379.2000000476837,"domainLookupEnd":379.2000000476837,"domainLookupStart":379.2000000476837,"fetchStart":379.2000000476837,"redirectEnd":0,"redirectStart":0,"requestStart":1277.5,"responseEnd":1295.7999999523163,"responseStart":1294.4000000953674,"secureConnectionStart":379.2000000476837},{"duration":313.2000000476837,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":982,"connectEnd":982,"connectStart":982,"domainLookupEnd":982,"domainLookupStart":982,"fetchStart":982,"redirectEnd":0,"redirectStart":0,"requestStart":1251.4000000953674,"responseEnd":1295.2000000476837,"responseStart":1290.2999999523163,"secureConnectionStart":982}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":144,"responseStart":350,"responseEnd":353,"domLoading":373,"domInteractive":1569,"domContentLoadedEventStart":1569,"domContentLoadedEventEnd":1627,"domComplete":2671,"loadEventStart":2671,"loadEventEnd":2671,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1544.9000000953674},{"name":"bigPipe.sidebar-id.end","time":1545.7000000476837},{"name":"bigPipe.activity-panel-pipe-id.start","time":1545.9000000953674},{"name":"bigPipe.activity-panel-pipe-id.end","time":1547.5},{"name":"activityTabFullyLoaded","time":1644.2000000476837}],"measures":[],"correlationId":"b84ab57ed8e980","effectiveType":"4g","downlink":9.5,"rtt":0,"serverDuration":119,"dbReadsTimeInMs":30,"dbConnsTimeInMs":41,"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).