Skip to content

Commit a652252

Browse files
committed
[PLAT-18481]: Change datatype of query_id in live query response
Summary: `query_id` can have values in the range uint64, which cannot fit in the Java long datatype, so we need to change its datatype to Java bigint. https://phorge.dev.yugabyte.com/D41129 Test Plan: Tested manually by verifying that live queries are reported in UI. Reviewers: anijhawan, jmak Reviewed By: jmak Subscribers: yugaware Differential Revision: https://phorge.dev.yugabyte.com/D46524
1 parent 3e924b7 commit a652252

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

managed/src/main/java/com/yugabyte/yw/forms/LiveQueriesParams.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import com.fasterxml.jackson.annotation.JsonIgnore;
66
import com.fasterxml.jackson.databind.JsonNode;
7+
import java.math.BigInteger;
78
import java.util.List;
89

910
/** This class will be used by the API to generate entries on Queries tab */
@@ -17,7 +18,7 @@ public static class YSQLQueryParams {
1718
public String query;
1819

1920
// query_id and leader pid are only present on pg15 and above.
20-
public long query_id = -1L;
21+
public BigInteger query_id = null;
2122

2223
public long leader_pid = -1L;
2324

managed/src/main/java/com/yugabyte/yw/queries/LiveQueryExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ private JsonNode processYSQLRowData(JsonNode response) {
9494
if (params.leader_pid != -1) {
9595
rowData.put("leader_pid", params.leader_pid);
9696
}
97-
if (params.query_id != -1) {
97+
if (params.query_id != null) {
9898
rowData.put("query_id", params.query_id);
9999
}
100100

managed/ui/src/components/queries/helpers/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export interface YsqlLiveQuery {
4242
queryStartTime: string;
4343
sessionStatus: string;
4444
leader_pid: number;
45-
query_id: number;
45+
query_id: string;
4646
}
4747

4848
export interface YcqlLiveQuery {

0 commit comments

Comments
 (0)