@itwin/core-backend 5.15.0-dev.14 → 5.15.0-dev.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +4 -0
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +1 -0
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +4 -1
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +1 -0
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +9 -3
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/SchemaSync.d.ts.map +1 -1
- package/lib/cjs/SchemaSync.js +1 -0
- package/lib/cjs/SchemaSync.js.map +1 -1
- package/lib/cjs/TxnManager.d.ts +111 -88
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +95 -75
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/internal/QueryMetadataCache.d.ts +44 -0
- package/lib/cjs/internal/QueryMetadataCache.d.ts.map +1 -0
- package/lib/cjs/internal/QueryMetadataCache.js +107 -0
- package/lib/cjs/internal/QueryMetadataCache.js.map +1 -0
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +4 -0
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/ECDb.d.ts +1 -0
- package/lib/esm/ECDb.d.ts.map +1 -1
- package/lib/esm/ECDb.js +4 -1
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +1 -0
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +9 -3
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/SchemaSync.d.ts.map +1 -1
- package/lib/esm/SchemaSync.js +1 -0
- package/lib/esm/SchemaSync.js.map +1 -1
- package/lib/esm/TxnManager.d.ts +111 -88
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js +95 -75
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/internal/QueryMetadataCache.d.ts +44 -0
- package/lib/esm/internal/QueryMetadataCache.d.ts.map +1 -0
- package/lib/esm/internal/QueryMetadataCache.js +103 -0
- package/lib/esm/internal/QueryMetadataCache.js.map +1 -0
- package/lib/esm/test/ecdb/QueryMetadataCache.test.d.ts +2 -0
- package/lib/esm/test/ecdb/QueryMetadataCache.test.d.ts.map +1 -0
- package/lib/esm/test/ecdb/QueryMetadataCache.test.js +630 -0
- package/lib/esm/test/ecdb/QueryMetadataCache.test.js.map +1 -0
- package/package.json +15 -15
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module ECDb
|
|
3
|
+
*/
|
|
4
|
+
import { DbQueryRequest, DbQueryResponse } from "@itwin/core-common";
|
|
5
|
+
/**
|
|
6
|
+
* Caches the column metadata returned by concurrent query requests so that new [ECSqlReader]($common) instances for an
|
|
7
|
+
* already-seen ECSQL can skip asking native to build and marshal it again.
|
|
8
|
+
*
|
|
9
|
+
* Column metadata only depends on the prepared statement (i.e. the schema) and the options that influence property naming.
|
|
10
|
+
* The owning database clears it only in a full `clearCaches()`, together with its statement cache, so it stays exactly as
|
|
11
|
+
* fresh as the metadata [ECSqlStatement]($backend) caches for `withPreparedStatement` and `withQueryReader`. Every path that
|
|
12
|
+
* changes the schema must therefore do a full `clearCaches()`. Undo and redo never need to, because saving a schema txn
|
|
13
|
+
* starts a new undo session, so undo/redo cannot cross a schema change.
|
|
14
|
+
* A schema change made by another process to a file opened without change watching is not detected; the statement
|
|
15
|
+
* cache has the same limitation.
|
|
16
|
+
* @internal
|
|
17
|
+
*/
|
|
18
|
+
export declare class QueryMetadataCache {
|
|
19
|
+
private readonly _capacity;
|
|
20
|
+
static readonly defaultCapacity = 200;
|
|
21
|
+
private readonly _entries;
|
|
22
|
+
private _generation;
|
|
23
|
+
constructor(_capacity?: number);
|
|
24
|
+
/** Number of cached entries. */
|
|
25
|
+
get size(): number;
|
|
26
|
+
/** Drop all cached metadata. Requests already in flight will not populate the cache. */
|
|
27
|
+
clear(): void;
|
|
28
|
+
private static makeKey;
|
|
29
|
+
private static copy;
|
|
30
|
+
private get;
|
|
31
|
+
private set;
|
|
32
|
+
/**
|
|
33
|
+
* The cached counterpart of `executeQueryRequest`, serving column metadata from the cache when possible.
|
|
34
|
+
* On a cache hit, `executeQueryRequest` is called with `includeMetaData: false` and the cached metadata is attached to the response.
|
|
35
|
+
* On a miss, `executeQueryRequest` is called with the request unchanged and the returned metadata is cached.
|
|
36
|
+
* @param request The request to execute. It is not modified.
|
|
37
|
+
* @param executeQueryRequest Sends a request to native without consulting this cache, typically
|
|
38
|
+
* `ConcurrentQuery.executeQueryRequest` with the database already bound. Called once, or twice if the cache is cleared
|
|
39
|
+
* while a successful cache hit is in flight. The second call has no `restartToken`.
|
|
40
|
+
*/
|
|
41
|
+
executeCachedQueryRequest(request: DbQueryRequest, executeQueryRequest: (request: DbQueryRequest) => Promise<DbQueryResponse>): Promise<DbQueryResponse>;
|
|
42
|
+
private static hasResult;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=QueryMetadataCache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryMetadataCache.d.ts","sourceRoot":"","sources":["../../../src/internal/QueryMetadataCache.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,cAAc,EAAE,eAAe,EAA2C,MAAM,oBAAoB,CAAC;AAE9G;;;;;;;;;;;;GAYG;AACH,qBAAa,kBAAkB;IAKV,OAAO,CAAC,QAAQ,CAAC,SAAS;IAJ7C,gBAAuB,eAAe,OAAO;IAC7C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA8C;IACvE,OAAO,CAAC,WAAW,CAAK;gBAEY,SAAS,SAAqC;IAElF,gCAAgC;IAChC,IAAW,IAAI,IAAI,MAAM,CAA+B;IAExD,wFAAwF;IACjF,KAAK,IAAI,IAAI;IAKpB,OAAO,CAAC,MAAM,CAAC,OAAO;IAKtB,OAAO,CAAC,MAAM,CAAC,IAAI;IAInB,OAAO,CAAC,GAAG;IAUX,OAAO,CAAC,GAAG;IASX;;;;;;;;OAQG;IACU,yBAAyB,CAAC,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC;IAkCrK,OAAO,CAAC,MAAM,CAAC,SAAS;CAGzB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*---------------------------------------------------------------------------------------------
|
|
3
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
4
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
5
|
+
*--------------------------------------------------------------------------------------------*/
|
|
6
|
+
/** @packageDocumentation
|
|
7
|
+
* @module ECDb
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
exports.QueryMetadataCache = void 0;
|
|
11
|
+
const core_common_1 = require("@itwin/core-common");
|
|
12
|
+
/**
|
|
13
|
+
* Caches the column metadata returned by concurrent query requests so that new [ECSqlReader]($common) instances for an
|
|
14
|
+
* already-seen ECSQL can skip asking native to build and marshal it again.
|
|
15
|
+
*
|
|
16
|
+
* Column metadata only depends on the prepared statement (i.e. the schema) and the options that influence property naming.
|
|
17
|
+
* The owning database clears it only in a full `clearCaches()`, together with its statement cache, so it stays exactly as
|
|
18
|
+
* fresh as the metadata [ECSqlStatement]($backend) caches for `withPreparedStatement` and `withQueryReader`. Every path that
|
|
19
|
+
* changes the schema must therefore do a full `clearCaches()`. Undo and redo never need to, because saving a schema txn
|
|
20
|
+
* starts a new undo session, so undo/redo cannot cross a schema change.
|
|
21
|
+
* A schema change made by another process to a file opened without change watching is not detected; the statement
|
|
22
|
+
* cache has the same limitation.
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
class QueryMetadataCache {
|
|
26
|
+
_capacity;
|
|
27
|
+
static defaultCapacity = 200;
|
|
28
|
+
_entries = new Map();
|
|
29
|
+
_generation = 0;
|
|
30
|
+
constructor(_capacity = QueryMetadataCache.defaultCapacity) {
|
|
31
|
+
this._capacity = _capacity;
|
|
32
|
+
}
|
|
33
|
+
/** Number of cached entries. */
|
|
34
|
+
get size() { return this._entries.size; }
|
|
35
|
+
/** Drop all cached metadata. Requests already in flight will not populate the cache. */
|
|
36
|
+
clear() {
|
|
37
|
+
this._entries.clear();
|
|
38
|
+
++this._generation;
|
|
39
|
+
}
|
|
40
|
+
static makeKey(request) {
|
|
41
|
+
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
42
|
+
return `${request.usePrimaryConn ? 1 : 0}|${request.valueFormat ?? 0}|${request.abbreviateBlobs ? 1 : 0}|${request.convertClassIdsToClassNames ? 1 : 0}|${request.query}`;
|
|
43
|
+
}
|
|
44
|
+
static copy(properties) {
|
|
45
|
+
return properties.map((property) => ({ ...property }));
|
|
46
|
+
}
|
|
47
|
+
get(key) {
|
|
48
|
+
const properties = this._entries.get(key);
|
|
49
|
+
if (properties && this._entries.size > 1) {
|
|
50
|
+
// Move to the most-recently-used position.
|
|
51
|
+
this._entries.delete(key);
|
|
52
|
+
this._entries.set(key, properties);
|
|
53
|
+
}
|
|
54
|
+
return properties;
|
|
55
|
+
}
|
|
56
|
+
set(key, properties) {
|
|
57
|
+
this._entries.delete(key);
|
|
58
|
+
this._entries.set(key, properties);
|
|
59
|
+
while (this._entries.size > this._capacity) {
|
|
60
|
+
const oldest = this._entries.keys().next().value;
|
|
61
|
+
this._entries.delete(oldest);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The cached counterpart of `executeQueryRequest`, serving column metadata from the cache when possible.
|
|
66
|
+
* On a cache hit, `executeQueryRequest` is called with `includeMetaData: false` and the cached metadata is attached to the response.
|
|
67
|
+
* On a miss, `executeQueryRequest` is called with the request unchanged and the returned metadata is cached.
|
|
68
|
+
* @param request The request to execute. It is not modified.
|
|
69
|
+
* @param executeQueryRequest Sends a request to native without consulting this cache, typically
|
|
70
|
+
* `ConcurrentQuery.executeQueryRequest` with the database already bound. Called once, or twice if the cache is cleared
|
|
71
|
+
* while a successful cache hit is in flight. The second call has no `restartToken`.
|
|
72
|
+
*/
|
|
73
|
+
async executeCachedQueryRequest(request, executeQueryRequest) {
|
|
74
|
+
if (!request.includeMetaData)
|
|
75
|
+
return executeQueryRequest(request);
|
|
76
|
+
const key = QueryMetadataCache.makeKey(request);
|
|
77
|
+
const cached = this.get(key);
|
|
78
|
+
let missRequest = request;
|
|
79
|
+
if (cached) {
|
|
80
|
+
const hitGeneration = this._generation;
|
|
81
|
+
const hitResponse = await executeQueryRequest({ ...request, includeMetaData: false });
|
|
82
|
+
// Cancelled, failed or busy: there are no rows to describe, so hand the status back to the caller as is.
|
|
83
|
+
if (!QueryMetadataCache.hasResult(hitResponse))
|
|
84
|
+
return hitResponse;
|
|
85
|
+
if (hitGeneration === this._generation) {
|
|
86
|
+
if (hitResponse.meta === undefined || hitResponse.meta.length === 0)
|
|
87
|
+
hitResponse.meta = QueryMetadataCache.copy(cached);
|
|
88
|
+
return hitResponse;
|
|
89
|
+
}
|
|
90
|
+
// Invalidated while in flight: the cached metadata may not match the statement that produced the rows, so run
|
|
91
|
+
// the request again with metadata. Drop the restart token: a newer request may already be using it, and
|
|
92
|
+
// resubmitting with it would cancel that request.
|
|
93
|
+
missRequest = { ...request };
|
|
94
|
+
delete missRequest.restartToken;
|
|
95
|
+
}
|
|
96
|
+
const generation = this._generation;
|
|
97
|
+
const response = await executeQueryRequest(missRequest);
|
|
98
|
+
if (generation === this._generation && QueryMetadataCache.hasResult(response) && response.meta !== undefined && response.meta.length > 0)
|
|
99
|
+
this.set(key, QueryMetadataCache.copy(response.meta));
|
|
100
|
+
return response;
|
|
101
|
+
}
|
|
102
|
+
static hasResult(response) {
|
|
103
|
+
return response.status === core_common_1.DbResponseStatus.Done || response.status === core_common_1.DbResponseStatus.Partial;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.QueryMetadataCache = QueryMetadataCache;
|
|
107
|
+
//# sourceMappingURL=QueryMetadataCache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"QueryMetadataCache.js","sourceRoot":"","sources":["../../../src/internal/QueryMetadataCache.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,oDAA8G;AAE9G;;;;;;;;;;;;GAYG;AACH,MAAa,kBAAkB;IAKO;IAJ7B,MAAM,CAAU,eAAe,GAAG,GAAG,CAAC;IAC5B,QAAQ,GAAG,IAAI,GAAG,EAAmC,CAAC;IAC/D,WAAW,GAAG,CAAC,CAAC;IAExB,YAAoC,YAAY,kBAAkB,CAAC,eAAe;QAA9C,cAAS,GAAT,SAAS,CAAqC;IAAI,CAAC;IAEvF,gCAAgC;IAChC,IAAW,IAAI,KAAa,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAExD,wFAAwF;IACjF,KAAK;QACV,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QACtB,EAAE,IAAI,CAAC,WAAW,CAAC;IACrB,CAAC;IAEO,MAAM,CAAC,OAAO,CAAC,OAAuB;QAC5C,4DAA4D;QAC5D,OAAO,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,WAAW,IAAI,CAAC,IAAI,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,2BAA2B,CAAC,CAAC,CAAC,C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QACxD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEO,MAAM,CAAC,SAAS,CAAC,QAAyB;QAChD,OAAO,QAAQ,CAAC,MAAM,KAAK,8BAAgB,CAAC,IAAI,IAAI,QAAQ,CAAC,MAAM,KAAK,8BAAgB,CAAC,OAAO,CAAC;IACnG,CAAC;;AAzFH,gDA0FC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ECDb\r\n */\r\n\r\nimport { DbQueryRequest, DbQueryResponse, DbResponseStatus, QueryPropertyMetaData } from \"@itwin/core-common\";\r\n\r\n/**\r\n * Caches the column metadata returned by concurrent query requests so that new [ECSqlReader]($common) instances for an\r\n * already-seen ECSQL can skip asking native to build and marshal it again.\r\n *\r\n * Column metadata only depends on the prepared statement (i.e. the schema) and the options that influence property naming.\r\n * The owning database clears it only in a full `clearCaches()`, together with its statement cache, so it stays exactly as\r\n * fresh as the metadata [ECSqlStatement]($backend) caches for `withPreparedStatement` and `withQueryReader`. Every path that\r\n * changes the schema must therefore do a full `clearCaches()`. Undo and redo never need to, because saving a schema txn\r\n * starts a new undo session, so undo/redo cannot cross a schema change.\r\n * A schema change made by another process to a file opened without change watching is not detected; the statement\r\n * cache has the same limitation.\r\n * @internal\r\n */\r\nexport class QueryMetadataCache {\r\n public static readonly defaultCapacity = 200;\r\n private readonly _entries = new Map<string, QueryPropertyMetaData[]>();\r\n private _generation = 0;\r\n\r\n public constructor(private readonly _capacity = QueryMetadataCache.defaultCapacity) { }\r\n\r\n /** Number of cached entries. */\r\n public get size(): number { return this._entries.size; }\r\n\r\n /** Drop all cached metadata. Requests already in flight will not populate the cache. */\r\n public clear(): void {\r\n this._entries.clear();\r\n ++this._generation;\r\n }\r\n\r\n private static makeKey(request: DbQueryRequest): string {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return `${request.usePrimaryConn ? 1 : 0}|${request.valueFormat ?? 0}|${request.abbreviateBlobs ? 1 : 0}|${request.convertClassIdsToClassNames ? 1 : 0}|${request.query}`;\r\n }\r\n\r\n private static copy(properties: QueryPropertyMetaData[]): QueryPropertyMetaData[] {\r\n return properties.map((property) => ({ ...property }));\r\n }\r\n\r\n private get(key: string): QueryPropertyMetaData[] | undefined {\r\n const properties = this._entries.get(key);\r\n if (properties && this._entries.size > 1) {\r\n // Move to the most-recently-used position.\r\n this._entries.delete(key);\r\n this._entries.set(key, properties);\r\n }\r\n return properties;\r\n }\r\n\r\n private set(key: string, properties: QueryPropertyMetaData[]): void {\r\n this._entries.delete(key);\r\n this._entries.set(key, properties);\r\n while (this._entries.size > this._capacity) {\r\n const oldest = this._entries.keys().next().value as string;\r\n this._entries.delete(oldest);\r\n }\r\n }\r\n\r\n /**\r\n * The cached counterpart of `executeQueryRequest`, serving column metadata from the cache when possible.\r\n * On a cache hit, `executeQueryRequest` is called with `includeMetaData: false` and the cached metadata is attached to the response.\r\n * On a miss, `executeQueryRequest` is called with the request unchanged and the returned metadata is cached.\r\n * @param request The request to execute. It is not modified.\r\n * @param executeQueryRequest Sends a request to native without consulting this cache, typically\r\n * `ConcurrentQuery.executeQueryRequest` with the database already bound. Called once, or twice if the cache is cleared\r\n * while a successful cache hit is in flight. The second call has no `restartToken`.\r\n */\r\n public async executeCachedQueryRequest(request: DbQueryRequest, executeQueryRequest: (request: DbQueryRequest) => Promise<DbQueryResponse>): Promise<DbQueryResponse> {\r\n if (!request.includeMetaData)\r\n return executeQueryRequest(request);\r\n\r\n const key = QueryMetadataCache.makeKey(request);\r\n const cached = this.get(key);\r\n let missRequest = request;\r\n if (cached) {\r\n const hitGeneration = this._generation;\r\n const hitResponse = await executeQueryRequest({ ...request, includeMetaData: false });\r\n // Cancelled, failed or busy: there are no rows to describe, so hand the status back to the caller as is.\r\n if (!QueryMetadataCache.hasResult(hitResponse))\r\n return hitResponse;\r\n\r\n if (hitGeneration === this._generation) {\r\n if (hitResponse.meta === undefined || hitResponse.meta.length === 0)\r\n hitResponse.meta = QueryMetadataCache.copy(cached);\r\n return hitResponse;\r\n }\r\n\r\n // Invalidated while in flight: the cached metadata may not match the statement that produced the rows, so run\r\n // the request again with metadata. Drop the restart token: a newer request may already be using it, and\r\n // resubmitting with it would cancel that request.\r\n missRequest = { ...request };\r\n delete missRequest.restartToken;\r\n }\r\n\r\n const generation = this._generation;\r\n const response = await executeQueryRequest(missRequest);\r\n if (generation === this._generation && QueryMetadataCache.hasResult(response) && response.meta !== undefined && response.meta.length > 0)\r\n this.set(key, QueryMetadataCache.copy(response.meta));\r\n return response;\r\n }\r\n\r\n private static hasResult(response: DbQueryResponse): boolean {\r\n return response.status === DbResponseStatus.Done || response.status === DbResponseStatus.Partial;\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BriefcaseManager.d.ts","sourceRoot":"","sources":["../../src/BriefcaseManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAMH,OAAO,EACL,WAAW,EAAE,UAAU,EAA6B,UAAU,EAAmD,QAAQ,EAC1H,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAEL,WAAW,EAAoB,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAA6C,mBAAmB,EACrM,YAAY,EAAE,aAAa,EAAE,wBAAwB,EAEtD,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,yBAAyB,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAE9H,OAAO,EAAsC,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAO7D,OAAO,EAAgB,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,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AAE,GAAG,MAAM,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,GAAG,IAAI;IAwB3I;;;;;;OAMG;WACW,gBAAgB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE;IAMxE;;;;;;OAMG;WACkB,6BAA6B,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,aAAa,CAAC;IAWjH;;;;;;OAMG;WACW,gCAAgC,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAMvF;;;;;;OAMG;WACW,8BAA8B,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAMrF;;;;;OAKG;WACW,qBAAqB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAazE;;;;;MAKE;WACY,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;IAavE;;;;;OAKG;WACW,mBAAmB,CAAC,EAAE,EAAE,WAAW,EAAE,YAAY,GAAE,OAAe,GAAG,IAAI;IAiBvF;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,oBAAoB;CAapC"}
|
|
@@ -552,6 +552,10 @@ export class BriefcaseManager {
|
|
|
552
552
|
Logger.logInfo(loggerCategory, `Dropping restore point ${this.PULL_MERGE_RESTORE_POINT_NAME}`);
|
|
553
553
|
this.dropRestorePoint(briefcaseDb, this.PULL_MERGE_RESTORE_POINT_NAME);
|
|
554
554
|
}
|
|
555
|
+
// Local schema txns were reversed and reinstated without a full clear (semantic rebase clears per schema txn,
|
|
556
|
+
// but the regular rebase does not), so caches filled during the merge may describe the schema without them.
|
|
557
|
+
if (hasLocalSchemaTxn)
|
|
558
|
+
db.clearCaches();
|
|
555
559
|
}
|
|
556
560
|
// notify listeners
|
|
557
561
|
db.notifyChangesetApplied();
|