Transaction in use error when creating role
Preliminary Checks
-
[X] I have reviewed the documentation: https://unkey.com/docs
-
[X] I have searched for existing issues: https://github.com/unkeyed/unkey/issues
-
[X] This issue is not a question, general help request, or anything other than a bug report directly related to Unkey. Please ask questions in our Discord community: https://unkey.com/discord.
Reproduction / Replay Link (Optional)
No response
Issue Summary
I randomly got this error when creating a role
{"error":{"code":"INTERNAL_SERVER_ERROR","docs":"https://unkey.dev/docs/api-reference/errors/code/INTERNAL_SERVER_ERROR","message":"target: unkey.-.primary: vttablet: rpc error: code = Aborted desc = transaction 1727848515790095014: in use: for query (CallerID: kzr01kdt6cz27x485f8p)","requestId":"req_2xEK1qBBAYjecN8sMJr7fHbKuajZ"}
Steps to Reproduce
- Try to create a role via API Example code of what I did when creating the role:
roles := []string{"admin", "account"}
for _, role := range roles {
_, err := s.unkey.Permissions.CreateRole(ctx, operations.CreateRoleRequestBody{
Name: role,
})
if err != nil {
log.Printf("Error creating role %s", err)
}
}
Expected behavior
To not get an error
Other information
No response
Screenshots
No response
Version info
-
This is flaky, right? Not consistently reproducible?
/award 150 points
Awarding Flo4604: 150 points đšī¸ Well done! Check out your new contribution on oss.gg/Flo4604
/assign
Assigned to @RajuGangitla! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
This is flaky, right? Not consistently reproducible?
yup, its randomly happening, ill try to find something how its 100% repro
That'd be great, we can award more points if you can reliably reproduce it, or at least get us closer to the root cause
/assign
Assigned to @KekmaTime! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
@RajuGangitla, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
Assigned to @Flo4604! Please open a draft PR linking this issue within 48h â ī¸ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically đšī¸ Excited to have you ship this đ
@KekmaTime, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
@RajuGangitla, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
@KekmaTime, Just a little reminder: Please open a draft PR linking this issue within 12 hours. If we can't detect a PR in 12h, you will be unassigned automatically.
/assign
This issue is already assigned to another person. Please find more issues here.
/assign
there is already a pr open for this