# US 2021/0064503 A1 · Decoupling internal and external tasks in a database environment

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

- Number: US 2021/0064503 A1
- Document ID: US20210064503A1
- Status: Published application
- Kind: A1
- Application number: 17/007,589
- Filed: 2020-08-31
- Published: 2021-03-04
- Earliest claimed: 2019-08-29
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Benoit Dageville; Johan Harjono; Simon Holm Jensen; Kunal Prafulla Nabar; Steven James Pelley
- Web page: https://patentgrep.com/patent/US20210064503A1

## CPC

- G06F 11/1482: using middleware or operating system [OS] functionalities
- G06F 11/3082: {the data filtering being achieved by aggregating or compressing the monitored data}
- G06F 11/3409: {for performance assessment}
- G06F 11/3438: {monitoring of user actions (tracking the activity of the user H04L67/535)}
- G06F 16/2425: {Iterative querying; Query formulation based on the results of a preceding query}
- G06F 16/2465: {Query processing support for facilitating data mining operations in structured databases}
- G06F 16/2474: {Sequence data queries, e.g. querying versioned data}
- G06F 2201/80: Database-specific techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Systems, methods, and devices for retrying a query. A method includes receiving, by a first database query manager, a query directed to database data from a client account. The method includes assigning an original execution of the query to one or more execution nodes of an execution platform. The method includes determining the original execution of the query was unsuccessful. The method includes transferring the query to a second database query manager configured to manage internal tasks for improving operation of a database platform that are not received from client accounts. The method includes assigning, by the second database query manager, a retry execution of the query to one or more execution nodes of an execution platform.

## Claims

### Claim 1

A method comprising:
receiving a query directed to database data;
assigning, by a first database query manager, execution of the query to one or more execution nodes of an execution platform;
determining that execution of the query was unsuccessful;
reassigning, by the first database query manager, the query to a second database query manager to be retried;
assigning, by the second database query manager, a retry of the execution of the query to one or more execution nodes of an execution platform.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining whether the query was originally executed on a new version of the database platform, and wherein reassigning the query to the second database query manager is performed in response to determining the query was originally executed on a new version of the database platform.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining whether a potential regression exists in the new version of the database platform based at least in part on the results of the retry of the execution of the query.

### Claim 4 (depends on 3)

The method of claim 3, wherein the reassigning the query to the second database query manager is performed in response to determining that execution of the query was unsuccessful due to an internal error.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
determining whether the execution of the query was unsuccessful due to an internal error;
in response to determining the execution of the query was unsuccessful due to an internal error, generating an error message for an account that requested the query indicating the query failed due to an internal error; and recording a service incident indicating the query failed due to an internal error.

### Claim 6 (depends on 5)

The method of claim 5, wherein the reassigning the query to the second database query manager is performed in response to the recording the service incident indicating the query failed due to an internal error.

### Claim 7 (depends on 6)

The method of claim 6, wherein the first database query manager is running a first version of a database platform and the second database query manager is running a second version of the database platform, wherein the first version and the second version of the database platform were released at different times and comprise different software.

### Claim 8 (depends on 7)

The method of claim 7, wherein the database platform comprises multiple database query managers collectively running two or more versions of the database platform at one time.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
analyzing results of the retry of the execution of the query to determine whether the execution of the query was unsuccessful due to an intermittent fault or a regression in the first version of the database platform.

### Claim 10 (depends on 9)

The method of claim 9, wherein assigning the retry of the execution of the query comprises assigning execution of the query to different execution nodes that did not attempt the execution of the query.

### Claim 11

A system comprising:
a multiple tenant cloud-based database platform comprising a plurality of shared storage devices collectively storing database data and an execution platform independent from the plurality of shared storage device; and
one or more processors for managing database tasks, the one or more processors are configured to:
receive a query directed to database data;
assign, by a first database query manager, execution of the query to one or more execution nodes of an execution platform,
determine that execution of the query was unsuccessful;
reassign, by the first database query manager, the query to a second database query manager to be retried;
assign, by the second database query manager, a retry of the execution of the query to one or more execution nodes of an execution platform.

### Claim 12 (depends on 11)

The system of claim 11, wherein the one or more processors are further configured to:
determine whether the query was originally executed on a new version of the database platform, and wherein to reassign the query to the second database query manager is performed in response to determining the query was originally executed on a new version of the database platform.

### Claim 13 (depends on 12)

The system of claim 12, wherein the one or more processors are further configured to:
determine whether a potential regression exists in the new version of the database platform based at least in part on the results of the retry of the execution of the query.

### Claim 14 (depends on 13)

The system of claim 13, wherein to reassign the query to the second database query manager is performed in response to determining that execution of the query was unsuccessful due to an internal error.

### Claim 15 (depends on 14)

The system of claim 14, wherein the one or more processors are further configured to:
determine whether the execution of the query was unsuccessful due to an internal error;
in response to determining the execution of the query was unsuccessful due to an internal error, generate an error message for an account that requested the query indicating the query failed due to an internal error; and
record a service incident indicating the query failed due to an internal error.

### Claim 16 (depends on 15)

The system of claim 15, wherein to reassign the query to the second database query manager is performed in response to the recording the service incident indicating the query failed due to an internal error.

### Claim 17 (depends on 16)

The system of claim 16, wherein the first database query manager is running a first version of a database platform and the second database query manager is running a second version of the database platform, wherein the first version and the second version of the database platform were released at different times and comprise different software.

### Claim 18 (depends on 17)

The system of claim 17, wherein the database platform comprises multiple database query managers collectively running two or more versions of the database platform at one time.

### Claim 19 (depends on 18)

The system of claim 18, wherein the one or more processors are further configured to:
analyze results of the retry of the execution of the query to determine whether the execution of the query was unsuccessful due to an intermittent fault or a regression in the first version of the database platform.

### Claim 20 (depends on 19)

The system of claim 19, wherein to assign the retry of the execution of the query comprises assigning execution of the query to different execution nodes that did not attempt the execution of the query.

### Claim 21

A non-transitory computer-readable storage medium, having instructions stored thereon, when executed by one or more processors, cause the one or more processors to:
receive a query directed to database data;
assign, by a first database query manager, execution of the query to one or more execution nodes of an execution platform;
determine that execution of the query was unsuccessful;
reassign, by the first database query manager, the query to a second database query manager to be retried;
assign, by the second database query manager, a retry of the execution of the query to one or more execution nodes of an execution platform.

### Claim 22 (depends on 21)

The non-transitory computer-readable storage medium of claim 21, wherein the one or more processors are further configured to:
determine whether the query was originally executed on a new version of the database platform, and wherein to reassign the query to the second database query manager is performed in response to determining the query was originally executed on a new version of the database platform.

### Claim 23 (depends on 22)

The non-transitory computer-readable storage medium of claim 22, wherein the one or more processors are further configured to:
determine whether a potential regression exists in the new version of the database platform based at least in part on the results of the retry of the execution of the query.

### Claim 24 (depends on 23)

The non-transitory computer-readable storage medium of claim 23, wherein to reassign the query to the second database query manager is performed in response to determining that execution of the query was unsuccessful due to an internal error.

### Claim 25 (depends on 24)

The non-transitory computer-readable storage medium of claim 24, wherein the one or more processors are further configured to:
determine whether the execution of the query was unsuccessful due to an internal error;
in response to determining the execution of the query was unsuccessful due to an internal error, generate an error message for an account that requested the query indicating the query failed due to an internal error; and
record a service incident indicating the query failed due to an internal error.

### Claim 26 (depends on 25)

The non-transitory computer-readable storage medium of claim 25, wherein to reassign the query to the second database query manager is performed in response to the recording the service incident indicating the query failed due to an internal error.

### Claim 27 (depends on 26)

The non-transitory computer-readable storage medium of claim 26, wherein the first database query manager is running a first version of a database platform and the second database query manager is running a second version of the database platform, wherein the first version and the second version of the database platform were released at different times and comprise different software.

### Claim 28 (depends on 27)

The non-transitory computer-readable storage medium of claim 27, wherein the database platform comprises multiple database query managers collectively running two or more versions of the database platform at one time.

### Claim 29 (depends on 28)

The non-transitory computer-readable storage medium of claim 28, wherein the one or more processors are further configured to:
analyze results of the retry of the execution of the query to determine whether the execution of the query was unsuccessful due to an intermittent fault or a regression in the first version of the database platform.

### Claim 30 (depends on 29)

The non-transitory computer-readable storage medium of claim 29, wherein to assign the retry of the execution of the query comprises assigning execution of the query to different execution nodes that did not attempt the execution of the query.
