{"record":{"id":"7d6bd7e21d04ee08","repo":"windmill-labs/windmill","slug":"a-data-table-called-name-was-created-while-this","errorCode":null,"errorMessage":"A data table called ${name} was created while this setup was running. Choose another name and try again.","messagePattern":"A data table called (.+?) was created while this setup was running\\. Choose another name and try again\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src/lib/components/workspaceSettings/addDataTableModel.ts","lineNumber":431,"sourceCode":" * Adds the data table to the workspace config, once everything it points at exists.\n * `edit_datatable_config` replaces the whole map, so the rest is read back and sent with\n * it. Re-runnable: a second attempt overwrites the entry it wrote.\n */\nasync function writeRow(\n\tdeps: RunDeps,\n\tclaims: Claims,\n\tname: string,\n\tdatabase: { resource_type: 'postgresql' | 'instance'; resource_path: string }\n): Promise<Claims> {\n\tconst settings = await WorkspaceService.getSettings({ workspace: deps.workspace })\n\tconst datatables: Record<string, any> = { ...(settings.datatable?.datatables ?? {}) }\n\t// Free when the pre-flight looked, taken by the time we write: repointing it here would\n\t// silently hand another admin's data table a database they never chose.\n\tif (\n\t\tdatatables[name] &&\n\t\t!stillOurs(claims, 'row', name, datatables[name]?.database?.resource_path)\n\t) {\n\t\tthrow new Error(\n\t\t\t`A data table called ${name} was created while this setup was running. Choose another name and try again.`\n\t\t)\n\t}\n\tdatatables[name] = { ...(datatables[name] ?? {}), database }\n\tawait WorkspaceService.editDataTableConfig({\n\t\tworkspace: deps.workspace,\n\t\trequestBody: { settings: { datatables }, renames: [], deleted_datatables: [] }\n\t})\n\treturn claim(claims, 'row', name, database.resource_path)\n}\n\n/**\n * `removed` — the row this run wrote is gone. `kept` — the undo could not reach the server, so\n * it is still there and the caller has to keep saying so. `foreign` — the name now points\n * somewhere this run never wrote, so there is nothing of ours to take back.\n */\ntype Rollback = 'removed' | 'kept' | 'foreign'\n","sourceCodeStart":413,"sourceCodeEnd":449,"githubUrl":"https://github.com/windmill-labs/windmill/blob/e474e8803ce2ff5c2df09a58dab51d45f5c922ca/frontend/src/lib/components/workspaceSettings/addDataTableModel.ts#L413-L449","documentation":"During the data-table setup wizard, writeRow claims a data table name and then writes the database config. If between the pre-flight check and the write another admin created a data table with the same name (the claim no longer verifies as ours), the setup aborts with this error instead of silently repointing someone else's table at a database they never chose.","triggerScenarios":"Two admins run the add-data-table setup concurrently with the same table name; the first completes and creates the table, the second's stillOurs() claim check fails right before WorkspaceService.editDataTableConfig runs.","commonSituations":"Concurrent workspace configuration by multiple admins; rerunning a stale setup wizard tab after someone else already finished the same setup.","solutions":["Choose a different data table name and rerun the setup, as the message instructs","Coordinate with the other admin so only one setup runs at a time","Refresh the workspace settings page to pick up the newly created table — it may already be configured as intended"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// before writing, confirm the name is still free/ours\nconst tables = await WorkspaceService.getDataTableConfig({ workspace })\nif (tables[name] && !isOurClaim) console.warn(`Data table '${name}' already exists — pick another name`)","typeGuard":null,"tryCatchPattern":"try {\n  await runSetup(...)\n} catch (e) {\n  if (String(e.message).startsWith('A data table called')) {\n    // surface UI prompt to choose a new table name, then retry setup\n  }\n}","preventionTips":["Run workspace setup wizards one admin at a time","Use table names prefixed with your project/team to reduce collisions","Re-open a stale setup tab freshly before resuming an interrupted setup"],"tags":["race-condition","data-table","setup-wizard"],"backgroundTag":"concurrent-setup-name-conflict","analyzedSha":"e474e8803ce2ff5c2df09a58dab51d45f5c922ca","analyzedAt":"2026-09-03T12:38:19.024Z","contentChangedAt":"2026-09-03T12:38:19.024Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}