luizotavio32 opened a new pull request, #45102: URL: https://github.com/apache/superset/pull/45102
### SUMMARY After #45059, bursts of 3 or more identical permalink requests for the same dashboard can still return 500 on MySQL. Each request that loses the race already holds a shared lock on the duplicate row, then asks for an exclusive lock to re-read it. The losers end up waiting on each other and MySQL aborts one of them with a deadlock (`1213 Deadlock found when trying to get lock`). Two concurrent requests don't trigger it. This change makes that re-read take a shared lock instead. Shared locks don't conflict with each other, so the deadlock goes away, and the re-read still sees the row the winning request just committed. The exclusive lock used by the distributed-lock release is unchanged. ### TESTING INSTRUCTIONS Unit tests added and updated. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
