Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ui: Transactions page shows TXN TYPE as explicit even for implicit transactions #59210

Closed
sheaffej opened this issue Jan 20, 2021 · 5 comments · Fixed by cockroachdb/ui#294
Closed
Assignees
Labels
A-webui-general Issues on the DB Console that span multiple areas or don't have another clear category. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.

Comments

@sheaffej
Copy link
Collaborator

The Transactions page in the 20.2 DB console shows implicit transactions as explicit in the Transaction Details page.

This is an example of a transaction that was issued as an implicit transaction. Rollback statements used just to illustrate that an explicit transaction was not in progress.

root@snow:26257/defaultdb> rollback;
ERROR: there is no transaction in progress

root@snow:26257/defaultdb> insert into foo values (5);
INSERT 1
Time: 5ms total (execution 5ms / network 1ms)

root@snow:26257/defaultdb> rollback;
ERROR: there is no transaction in progress

root@snow:26257/defaultdb>

image

Repro:

  1. Start a single node
  2. Issue a simple implicit statement
  3. View the Transactions page in the DB Console
  4. View the Transaction Details page for the transaction
  5. Notice the statement is listed as Explicit
@sheaffej sheaffej added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-webui-general Issues on the DB Console that span multiple areas or don't have another clear category. labels Jan 20, 2021
@awoods187
Copy link
Contributor

Nice find. This looks like a bug. cc @solongordon @asubiotto

@jordanlewis
Copy link
Member

Interestingly, this works fine on the statements page.

@jordanlewis
Copy link
Member

Seems like we just hardcode explicit for all statements inside of the txns page:

export const aggregateStatements = (
  statements: Statement[],
): AggregateStatistics[] =>
  statements.map((s: Statement) => ({
    label: s.key.key_data.query,
    implicitTxn: false,
    stats: s.stats,
  }));

@solongordon is this fixable or should we just remove the explicit/implicit column from the txns page?

@rafiss rafiss added the S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption. label Feb 4, 2021
@solongordon solongordon self-assigned this Feb 8, 2021
@solongordon
Copy link
Contributor

Yeah, the column should just be removed since we do not distinguish between implicit and explicit transactions for the purpose of transaction statistics. Looks like @asubiotto already did this in cockroachdb/ui#222.

@rafiss
Copy link
Collaborator

rafiss commented Apr 22, 2021

Re-opening and moving to SQL Observability since it it seems like implicit is still hardcoded here (on master): https://github.com/cockroachdb/ui/blob/3e168d09d9a6c2515ae6a9fb5f7635ca6ee17974/packages/cluster-ui/src/transactionsPage/utils.ts#L41-L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-webui-general Issues on the DB Console that span multiple areas or don't have another clear category. C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. S-3-ux-surprise Issue leaves users wondering whether CRDB is behaving properly. Likely to hurt reputation/adoption.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants