# US 2025/0028711 A1 · Methods for performing full-link tracing on transaction and native distributed databases

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0028711 A1
- Document ID: US20250028711A1
- Status: Published application
- Kind: A1
- Application number: 18/906,399
- Filed: 2024-10-04
- Published: 2025-01-23
- Earliest claimed: 2022-04-21
- Assignees: Beijing OceanBase Technology Co., Ltd.
- Applicants: Beijing Oceanbase Technology Co., Ltd.
- Inventors: Zhifeng YANG
- Web page: https://patentgrep.com/patent/US20250028711A1

## CPC

- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

This disclosure provides methods for performing full-link tracing on a transaction and native distributed databases. In an implementation, a method comprises determining a current execution stage of a transaction to be traced, locally recording span information corresponding to a span comprising the current execution stage, collecting span information in the execution stages comprised in the transaction after execution of the transaction is completed, and determining a full-link execution process of the transaction based on the collected span information.

## Claims

### Claim 1

A computer-implemented method for performing full-link tracing on a transaction in a distributed database comprising:
determining a current execution stage of a transaction to be traced, wherein the current execution stage comprises a current execution action in an execution process, wherein information transferred in the execution process comprises a trace ID of the transaction and span IDs, and wherein the span IDs correspond to spans of execution stages comprised in the execution process;
locally recording span information corresponding to a span comprising the current execution stage, wherein the span has a semantic meaning determined based on a transaction execution logic in the distributed database, and each piece of span information determines a reference relationship between a corresponding span and another span in the same transaction comprising the corresponding span;
collecting span information in the execution stages comprised in the transaction after execution of the transaction is completed; and
determining a full-link execution process of the transaction based on the collected span information.

### Claim 2 (depends on 1)

The computer-implemented method according to claim 1, wherein the locally recording span information corresponding to a span comprising the current execution stage comprises:
locally recording the span information corresponding to the span comprising the current execution stage when an execution granularity corresponding to the current execution stage is greater than an execution granularity threshold, wherein execution granularities are divided based on the transaction execution logic, and the span comprising each execution stage corresponds to one execution granularity.

### Claim 3 (depends on 2)

The computer-implemented method according to claim 2, wherein the transaction comprises at least one structured query language (SQL), an execution plan of each SQL comprises at least one data flow object (DFO), and each DFO comprises at least one operation, and wherein execution granularities obtained through division comprise an SQL granularity, a DFO granularity, and an operator granularity.

### Claim 4 (depends on 1)

The computer-implemented method according to claim 1, further comprising:
sampling each transaction to be executed in the distributed database; and
determining the sampled transaction as the transaction to be traced.

### Claim 5 (depends on 1)

The computer-implemented method according to claim 1, wherein the determining a full-link execution process of the transaction based on the collected span information comprises:
arranging, in a time dimension based on a reference relationship between spans determined by the collected span information, execution stages corresponding to the span information to display the full-link execution process of the transaction.

### Claim 6 (depends on 1)

The computer-implemented method according to claim 1, wherein the distributed database is communicatively connected to a proxy server, the proxy server is configured to forward a transaction request initiated by a driver deployed in a client device to the distributed database, and an execution process of each transaction respectively passes through the driver, the proxy server, and the distributed database.

### Claim 7 (depends on 6)

The computer-implemented method according to claim 6, further comprising:
generating, at the driver, a corresponding trace ID for the transaction to be executed; and
sending, at the driver, locally generated span information comprising the trace ID to the proxy server, so that the proxy server records the span information in the proxy server.

### Claim 8 (depends on 7)

The computer-implemented method according to claim 7, wherein the sending, at the driver, locally generated span information comprising the trace ID to the proxy server comprises:
sending, at the driver, the locally generated span information comprising the trace ID to the proxy server in a piggyback way.

### Claim 9

A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations for performing full-link tracing on a transaction in a distributed database, the operations comprising:
determining a current execution stage of a transaction to be traced, wherein the current execution stage comprises a current execution action in an execution process, wherein information transferred in the execution process comprises a trace ID of the transaction and span IDs, and wherein the span IDs correspond to spans of execution stages comprised in the execution process;
locally recording span information corresponding to a span comprising the current execution stage, wherein the span has a semantic meaning determined based on a transaction execution logic in the distributed database, and each piece of span information determines a reference relationship between a corresponding span and another span in the same transaction comprising the corresponding span;
collecting span information in the execution stages comprised in the transaction after execution of the transaction is completed; and
determining a full-link execution process of the transaction based on the collected span information.

### Claim 10 (depends on 9)

The non-transitory, computer-readable medium according to claim 9, wherein the locally recording span information corresponding to a span comprising the current execution stage comprises:
locally recording the span information corresponding to the span comprising the current execution stage when an execution granularity corresponding to the current execution stage is greater than an execution granularity threshold, wherein execution granularities are divided based on the transaction execution logic, and the span comprising each execution stage corresponds to one execution granularity.

### Claim 11 (depends on 10)

The non-transitory, computer-readable medium according to claim 10, wherein the transaction comprises at least one structured query language (SQL), an execution plan of each SQL comprises at least one data flow object (DFO), and each DFO comprises at least one operation, and wherein execution granularities obtained through division comprise an SQL granularity, a DFO granularity, and an operator granularity.

### Claim 12 (depends on 9)

The non-transitory, computer-readable medium according to claim 9, further comprising:
sampling each transaction to be executed in the distributed database; and
determining the sampled transaction as the transaction to be traced.

### Claim 13 (depends on 9)

The non-transitory, computer-readable medium according to claim 9, wherein the determining a full-link execution process of the transaction based on the collected span information comprises:
arranging, in a time dimension based on a reference relationship between spans determined by the collected span information, execution stages corresponding to the span information to display the full-link execution process of the transaction.

### Claim 14 (depends on 9)

The non-transitory, computer-readable medium according to claim 9, wherein the distributed database is communicatively connected to a proxy server, the proxy server is configured to forward a transaction request initiated by a driver deployed in a client device to the distributed database, and an execution process of each transaction respectively passes through the driver, the proxy server, and the distributed database.

### Claim 15 (depends on 14)

The non-transitory, computer-readable medium according to claim 14, further comprising:
generating, at the driver, a corresponding trace ID for the transaction to be executed; and
sending, at the driver, locally generated span information comprising the trace ID to the proxy server, so that the proxy server records the span information in the proxy server.

### Claim 16 (depends on 15)

The non-transitory, computer-readable medium according to claim 15, wherein the sending, at the driver, locally generated span information comprising the trace ID to the proxy server comprises:
sending, at the driver, the locally generated span information comprising the trace ID to the proxy server in a piggyback way.

### Claim 17

A computer-implemented system for performing full-link tracing on a transaction in a distributed database, comprising:
one or more computers; and
one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
determining a current execution stage of a transaction to be traced, wherein the current execution stage comprises a current execution action in an execution process, wherein information transferred in the execution process comprises a trace ID of the transaction and span IDs, and wherein the span IDs correspond to spans of execution stages comprised in the execution process;
locally recording span information corresponding to a span comprising the current execution stage, wherein the span has a semantic meaning determined based on a transaction execution logic in the distributed database, and each piece of span information determines a reference relationship between a corresponding span and another span in the same transaction comprising the corresponding span;
collecting span information in the execution stages comprised in the transaction after execution of the transaction is completed; and
determining a full-link execution process of the transaction based on the collected span information.

### Claim 18 (depends on 17)

The computer-implemented system according to claim 17, wherein the locally recording span information corresponding to a span comprising the current execution stage comprises:
locally recording the span information corresponding to the span comprising the current execution stage when an execution granularity corresponding to the current execution stage is greater than an execution granularity threshold, wherein execution granularities are divided based on the transaction execution logic, and the span comprising each execution stage corresponds to one execution granularity.
