Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Fixed
-
22.08.13, 23.02.10, 23.08.6, 24.02.2
-
maxscale:
debian linux vms on hypervm.
mariadb apt package installation.
galera cluster
readwritesplit
Application:
.net 8.0 application with Ms EntityFrameworkCore version 8
windows and linux vms on hypervm or proxmox
lines of code generating example query: https://github.com/tgstation/tgstation-server/blob/dev/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs#L342-L348maxscale: debian linux vms on hypervm. mariadb apt package installation. galera cluster readwritesplit Application: .net 8.0 application with Ms EntityFrameworkCore version 8 windows and linux vms on hypervm or proxmox lines of code generating example query: https://github.com/tgstation/tgstation-server/blob/dev/src/Tgstation.Server.Host/Components/Deployment/DreamMaker.cs#L342-L348
Description
(Reproduction Notes: Just doing the query in the mariadb commandline client will not repo.
it has to be sent over as a single multiple statement query, where as the mariadb-client cli seems to sends them over as separate statements.)
Maxscale reads this insert query as a session query and sends it to all nodes.
SET AUTOCOMMIT = 1; |
INSERT INTO `CompileJobs` ( |
`DMApiMajorVersion`, `DMApiMinorVersion`, `DMApiPatchVersion`, `DirectoryName`, `DmeName`, `EngineVersion`, `GitHubDeploymentId`, `GitHubRepoId`, `JobId`, `MinimumSecurityLevel`, `Output`, `RepositoryOrigin`, `RevisionInformationId` |
) VALUES ( |
5, 9, 0, '5066f759-730a-42c4-bff7-da06c1359fb2', 'tgmc', '515.1633', 1699326356, 158907057, 3831, 0, '-SNIPPED FOR READABILITY-', 'https://github.com/tgstation/TerraGov-Marine-Corps.git', 5445) |
RETURNING `Id`;
|
This leads to either duplicated inserts or all but one of the nodes generating an error if it has a unique column:
2024-08-05 11:07:00 info : (1) [readwritesplit] (MainCluster); Reply complete from 'us-dos', discarding it: Error: 1062, 23000 Duplicate entry '3831' for key 'IX_CompileJobs_JobId' |
(jobid is a 1:1 relationship FK to the job's table, not this table's primary key.)
Sending `SET AUTOCOMMIT = 1` as a separate query seems to keep it from repoing (see repo notes above)
Attachments
Issue Links
- relates to
-
MXS-5193 Multi-statement commands may end up being stored in the session command history
- Closed