{"id":15599130,"url":"https://github.com/fluffynuts/cleanup-xa-transactions","last_synced_at":"2025-02-24T11:16:22.922Z","repository":{"id":237445365,"uuid":"683017804","full_name":"fluffynuts/cleanup-xa-transactions","owner":"fluffynuts","description":"Clean up orphaned XA transactions on a MySql database.","archived":false,"fork":false,"pushed_at":"2023-08-25T12:00:25.000Z","size":144,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-17T05:24:53.863Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fluffynuts.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-25T12:00:10.000Z","updated_at":"2023-08-25T12:00:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"39e68f3e-62f8-4fd5-8640-da3d8cf5db0b","html_url":"https://github.com/fluffynuts/cleanup-xa-transactions","commit_stats":null,"previous_names":["fluffynuts/cleanup-xa-transactions"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fcleanup-xa-transactions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fcleanup-xa-transactions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fcleanup-xa-transactions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fluffynuts%2Fcleanup-xa-transactions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fluffynuts","download_url":"https://codeload.github.com/fluffynuts/cleanup-xa-transactions/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232754627,"owners_count":18571670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T01:44:29.881Z","updated_at":"2025-01-06T16:47:33.270Z","avatar_url":"https://github.com/fluffynuts.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cleanup-xa-transactions\n\n## Purpose:\nTo \"do something\" about MySQL XA transactions which have been left in limbo,\nparticularly for when attempting to upgrade a MySql database to a later version\nof MySql, when you receive blocking errors like:\n```\nUpgrade cannot proceed due to an existing prepared XA transaction\n```\n\n## Why\nXA transactions are a mission to work with. See https://www.percona.com/blog/how-to-deal-with-xa-transactions-recovery/ for an idea of the shenannigans\nthat are required to work with them. Better yet, that article doesn't mention\nthat the data field from `xa recover convert xid` may be larger than suggested\nby the `gtrid_length` and `bqual_length` fields from that result - in particular,\nI find mine are exactly 2x larger than the values provided there.\n\nSplitting out these strings and manually rolling back or committing xa transactions\nis tedious. Let's make the computer do it for us.\n\n## Usage\n\nRequirements:\n- dotnet 7\n- (optional) node (recommended v16+)\n\nEither:\n1. Build with your IDE of choice or \n2. Build with `npm run build` and use the output .exe, or\n3. `npm start -- {options}` to run directly.\n\n- run with `--help` for all options\n- you probably only need `--password {password}` if you're intending to connect as `root` to a mysql server running on localhost on the default port\n    - this will default to roll back outstanding XA transactions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fcleanup-xa-transactions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluffynuts%2Fcleanup-xa-transactions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluffynuts%2Fcleanup-xa-transactions/lists"}