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

Fix issue where query get interrupted during prepare. #7592

Merged
merged 18 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 30 additions & 9 deletions common/api/core-common.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,8 @@ export interface BaseReaderOptions {
priority?: number;
quota?: QueryQuota;
restartToken?: string;
// @internal (undocumented)
testingArgs?: TestingArgs;
usePrimaryConn?: boolean;
}

Expand Down Expand Up @@ -1987,15 +1989,19 @@ export interface DbBlobResponse extends DbResponse {

// @internal (undocumented)
export interface DbQueryConfig {
allowTestingArgs?: boolean;
autoShutdowWhenIdlelForSeconds?: number;
// (undocumented)
globalQuota?: QueryQuota;
doNotUsePrimaryConnToPrepare?: boolean;
// (undocumented)
globalQuota?: QueryQuota;
ignoreDelay?: boolean;
// (undocumented)
ignorePriority?: boolean;
memoryMapFileSize?: number;
// (undocumented)
monitorPollInterval?: number;
requestQueueSize?: number;
// (undocumented)
statementCacheSizePerWorker?: number;
workerThreads?: number;
}

Expand Down Expand Up @@ -2034,6 +2040,8 @@ export interface DbQueryResponse extends DbResponse {
export interface DbRequest extends BaseReaderOptions {
// (undocumented)
kind?: DbRequestKind;
// (undocumented)
testingArgs?: TestingArgs;
}

// @internal (undocumented)
Expand Down Expand Up @@ -2085,17 +2093,19 @@ export enum DbResponseStatus {
// (undocumented)
Error_BlobIO_OutOfRange = 106,/* could not submit the query as queue was full.*/
// (undocumented)
Error_ECSql_BindingFailed = 104,/* generic error*/
Error_ECSql_BindingFailed = 104,/* Shutdown is in progress. */
// (undocumented)
Error_ECSql_PreparedFailed = 101,/* generic error*/
// (undocumented)
Error_ECSql_PreparedFailed = 101,/* ecsql prepared failed*/
Error_ECSql_RowToJsonFailed = 103,/* ecsql prepared failed*/
// (undocumented)
Error_ECSql_RowToJsonFailed = 103,/* ecsql step failed*/
Error_ECSql_StepFailed = 102,/* ecsql step failed*/
// (undocumented)
Error_ECSql_StepFailed = 102,/* ecsql failed to serialized row to json.*/
Partial = 3,/* ecsql failed to serialized row to json.*/
// (undocumented)
Partial = 3,/* ecsql binding failed.*/
QueueFull = 5,/* ecsql binding failed.*/
// (undocumented)
QueueFull = 5,/* class or property or instance specified was not found or property as not of type blob.*/
ShuttingDown = 6,/* class or property or instance specified was not found or property as not of type blob.*/
// (undocumented)
Timeout = 4
}
Expand All @@ -2109,6 +2119,8 @@ export interface DbRuntimeStats {
// (undocumented)
memUsed: number;
// (undocumented)
prepareTime: number;
// (undocumented)
timeLimit: number;
// (undocumented)
totalTime: number;
Expand Down Expand Up @@ -7412,6 +7424,8 @@ export class QueryOptionsBuilder {
setRestartToken(val: string): this;
setRowFormat(val: QueryRowFormat): this;
setSuppressLogErrors(val: boolean): this;
// @internal
setTestingArgs(val: TestingArgs): this;
setUsePrimaryConnection(val: boolean): this;
}

Expand Down Expand Up @@ -7485,6 +7499,7 @@ export interface QueryStats {
backendMemUsed: number;
backendRowsReturned: number;
backendTotalTime: number;
prepareTime: number;
retryCount: number;
totalTime: number;
}
Expand Down Expand Up @@ -9662,6 +9677,12 @@ export class TerrainSettings {
toJSON(): TerrainProps;
}

// @internal (undocumented)
export interface TestingArgs {
// (undocumented)
interrupt?: boolean;
}

// @internal
export class TestRpcManager {
// (undocumented)
Expand Down
1 change: 1 addition & 0 deletions common/api/summary/core-common.exports.csv
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ public;interface;TerrainProps
public;type;TerrainProviderName
deprecated;type;TerrainProviderName
public;class;TerrainSettings
internal;interface;TestingArgs
internal;class;TestRpcManager
beta;class;TextAnnotation
public;interface;TextAnnotation2dProps
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-backend",
"comment": "Fix issue with concurrent query where it interrupt statement during prepare",
"type": "none"
}
],
"packageName": "@itwin/core-backend"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@itwin/core-common",
"comment": "Update ECSql reader api to support no stat and error code.",
"type": "none"
}
],
"packageName": "@itwin/core-common"
}
38 changes: 19 additions & 19 deletions common/config/rush/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading