Skip to content

Commit

Permalink
ui: fix transaction contention details query where clause
Browse files Browse the repository at this point in the history
Change a `>=` to `=` in a where clause creation for txn details.
The query where clause creation contained a bug where when filtering
for a particular `waiting_txn_id`, we specify `>=` the id rather than
strictly equals. This can lead to surfacing contention events for not
just the txn id specified.

Epic: none

Release note (bug fix): In txn insight details, we will only surface
contention details for the current txn and no others. Previously it
was possible to see the contention details of other txns due to a bug.
  • Loading branch information
xinhaoz committed Oct 5, 2023
1 parent 1268ef1 commit 6d7ed12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/ui/workspaces/cluster-ui/src/api/contentionApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ function getContentionWhereClause(filters?: ContentionFilters): string {
if (whereClause !== defaultWhereClause) {
whereClause += " and ";
}
whereClause = whereClause + ` waiting_txn_id >= '${filters.waitingTxnID}' `;
whereClause = whereClause + ` waiting_txn_id = '${filters.waitingTxnID}' `;
}

if (filters?.start) {
Expand Down

0 comments on commit 6d7ed12

Please sign in to comment.