@fluidframework/container-runtime 2.32.0 → 2.33.0
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/CHANGELOG.md +4 -0
- package/api-report/container-runtime.legacy.alpha.api.md +71 -67
- package/container-runtime.test-files.tar +0 -0
- package/dist/blobManager/blobManager.d.ts +7 -4
- package/dist/blobManager/blobManager.d.ts.map +1 -1
- package/dist/blobManager/blobManager.js +38 -12
- package/dist/blobManager/blobManager.js.map +1 -1
- package/dist/channelCollection.d.ts +4 -0
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +24 -0
- package/dist/channelCollection.js.map +1 -1
- package/dist/compatUtils.d.ts +74 -0
- package/dist/compatUtils.d.ts.map +1 -0
- package/dist/compatUtils.js +151 -0
- package/dist/compatUtils.js.map +1 -0
- package/dist/compressionDefinitions.d.ts +39 -0
- package/dist/compressionDefinitions.d.ts.map +1 -0
- package/dist/compressionDefinitions.js +30 -0
- package/dist/compressionDefinitions.js.map +1 -0
- package/dist/containerRuntime.d.ts +78 -52
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +141 -54
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +3 -0
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +122 -66
- package/dist/dataStoreContext.js.map +1 -1
- package/dist/deltaManagerProxies.d.ts +55 -12
- package/dist/deltaManagerProxies.d.ts.map +1 -1
- package/dist/deltaManagerProxies.js +63 -55
- package/dist/deltaManagerProxies.js.map +1 -1
- package/dist/gc/gcDefinitions.d.ts +2 -0
- package/dist/gc/gcDefinitions.d.ts.map +1 -1
- package/dist/gc/gcDefinitions.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +1 -0
- package/dist/opLifecycle/batchManager.d.ts +3 -15
- package/dist/opLifecycle/batchManager.d.ts.map +1 -1
- package/dist/opLifecycle/batchManager.js +5 -39
- package/dist/opLifecycle/batchManager.js.map +1 -1
- package/dist/opLifecycle/definitions.d.ts +44 -11
- package/dist/opLifecycle/definitions.d.ts.map +1 -1
- package/dist/opLifecycle/definitions.js.map +1 -1
- package/dist/opLifecycle/index.d.ts +3 -3
- package/dist/opLifecycle/index.d.ts.map +1 -1
- package/dist/opLifecycle/index.js +3 -2
- package/dist/opLifecycle/index.js.map +1 -1
- package/dist/opLifecycle/opCompressor.d.ts.map +1 -1
- package/dist/opLifecycle/opCompressor.js +4 -4
- package/dist/opLifecycle/opCompressor.js.map +1 -1
- package/dist/opLifecycle/opDecompressor.js +3 -3
- package/dist/opLifecycle/opDecompressor.js.map +1 -1
- package/dist/opLifecycle/opGroupingManager.d.ts +2 -2
- package/dist/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/dist/opLifecycle/opGroupingManager.js +1 -2
- package/dist/opLifecycle/opGroupingManager.js.map +1 -1
- package/dist/opLifecycle/opSerialization.d.ts +3 -1
- package/dist/opLifecycle/opSerialization.d.ts.map +1 -1
- package/dist/opLifecycle/opSerialization.js +4 -2
- package/dist/opLifecycle/opSerialization.js.map +1 -1
- package/dist/opLifecycle/opSplitter.d.ts.map +1 -1
- package/dist/opLifecycle/opSplitter.js +2 -2
- package/dist/opLifecycle/opSplitter.js.map +1 -1
- package/dist/opLifecycle/outbox.d.ts +25 -3
- package/dist/opLifecycle/outbox.d.ts.map +1 -1
- package/dist/opLifecycle/outbox.js +112 -61
- package/dist/opLifecycle/outbox.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/pendingStateManager.d.ts +36 -7
- package/dist/pendingStateManager.d.ts.map +1 -1
- package/dist/pendingStateManager.js +83 -16
- package/dist/pendingStateManager.js.map +1 -1
- package/dist/runtimeLayerCompatState.d.ts.map +1 -1
- package/dist/runtimeLayerCompatState.js +1 -1
- package/dist/runtimeLayerCompatState.js.map +1 -1
- package/dist/summary/documentSchema.d.ts +1 -0
- package/dist/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +2 -0
- package/dist/summary/documentSchema.js.map +1 -1
- package/lib/blobManager/blobManager.d.ts +7 -4
- package/lib/blobManager/blobManager.d.ts.map +1 -1
- package/lib/blobManager/blobManager.js +38 -12
- package/lib/blobManager/blobManager.js.map +1 -1
- package/lib/channelCollection.d.ts +4 -0
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +24 -0
- package/lib/channelCollection.js.map +1 -1
- package/lib/compatUtils.d.ts +74 -0
- package/lib/compatUtils.d.ts.map +1 -0
- package/lib/compatUtils.js +142 -0
- package/lib/compatUtils.js.map +1 -0
- package/lib/compressionDefinitions.d.ts +39 -0
- package/lib/compressionDefinitions.d.ts.map +1 -0
- package/lib/compressionDefinitions.js +27 -0
- package/lib/compressionDefinitions.js.map +1 -0
- package/lib/containerRuntime.d.ts +78 -52
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +143 -56
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +3 -0
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +57 -1
- package/lib/dataStoreContext.js.map +1 -1
- package/lib/deltaManagerProxies.d.ts +55 -12
- package/lib/deltaManagerProxies.d.ts.map +1 -1
- package/lib/deltaManagerProxies.js +63 -55
- package/lib/deltaManagerProxies.js.map +1 -1
- package/lib/gc/gcDefinitions.d.ts +2 -0
- package/lib/gc/gcDefinitions.d.ts.map +1 -1
- package/lib/gc/gcDefinitions.js.map +1 -1
- package/lib/index.d.ts +4 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +1 -0
- package/lib/opLifecycle/batchManager.d.ts +3 -15
- package/lib/opLifecycle/batchManager.d.ts.map +1 -1
- package/lib/opLifecycle/batchManager.js +4 -37
- package/lib/opLifecycle/batchManager.js.map +1 -1
- package/lib/opLifecycle/definitions.d.ts +44 -11
- package/lib/opLifecycle/definitions.d.ts.map +1 -1
- package/lib/opLifecycle/definitions.js.map +1 -1
- package/lib/opLifecycle/index.d.ts +3 -3
- package/lib/opLifecycle/index.d.ts.map +1 -1
- package/lib/opLifecycle/index.js +2 -2
- package/lib/opLifecycle/index.js.map +1 -1
- package/lib/opLifecycle/opCompressor.d.ts.map +1 -1
- package/lib/opLifecycle/opCompressor.js +2 -2
- package/lib/opLifecycle/opCompressor.js.map +1 -1
- package/lib/opLifecycle/opDecompressor.js +1 -1
- package/lib/opLifecycle/opDecompressor.js.map +1 -1
- package/lib/opLifecycle/opGroupingManager.d.ts +2 -2
- package/lib/opLifecycle/opGroupingManager.d.ts.map +1 -1
- package/lib/opLifecycle/opGroupingManager.js +1 -2
- package/lib/opLifecycle/opGroupingManager.js.map +1 -1
- package/lib/opLifecycle/opSerialization.d.ts +3 -1
- package/lib/opLifecycle/opSerialization.d.ts.map +1 -1
- package/lib/opLifecycle/opSerialization.js +4 -2
- package/lib/opLifecycle/opSerialization.js.map +1 -1
- package/lib/opLifecycle/opSplitter.d.ts.map +1 -1
- package/lib/opLifecycle/opSplitter.js +1 -1
- package/lib/opLifecycle/opSplitter.js.map +1 -1
- package/lib/opLifecycle/outbox.d.ts +25 -3
- package/lib/opLifecycle/outbox.d.ts.map +1 -1
- package/lib/opLifecycle/outbox.js +110 -61
- package/lib/opLifecycle/outbox.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/pendingStateManager.d.ts +36 -7
- package/lib/pendingStateManager.d.ts.map +1 -1
- package/lib/pendingStateManager.js +84 -17
- package/lib/pendingStateManager.js.map +1 -1
- package/lib/runtimeLayerCompatState.d.ts.map +1 -1
- package/lib/runtimeLayerCompatState.js +2 -2
- package/lib/runtimeLayerCompatState.js.map +1 -1
- package/lib/summary/documentSchema.d.ts +1 -0
- package/lib/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +2 -0
- package/lib/summary/documentSchema.js.map +1 -1
- package/lib/tsdoc-metadata.json +1 -1
- package/package.json +21 -20
- package/src/blobManager/blobManager.ts +48 -15
- package/src/channelCollection.ts +27 -0
- package/src/compatUtils.ts +211 -0
- package/src/compressionDefinitions.ts +47 -0
- package/src/containerRuntime.ts +259 -108
- package/src/dataStoreContext.ts +82 -2
- package/src/deltaManagerProxies.ts +132 -70
- package/src/gc/gcDefinitions.ts +2 -0
- package/src/index.ts +5 -3
- package/src/opLifecycle/batchManager.ts +7 -52
- package/src/opLifecycle/definitions.ts +45 -11
- package/src/opLifecycle/index.ts +7 -2
- package/src/opLifecycle/opCompressor.ts +2 -2
- package/src/opLifecycle/opDecompressor.ts +1 -1
- package/src/opLifecycle/opGroupingManager.ts +7 -5
- package/src/opLifecycle/opSerialization.ts +6 -2
- package/src/opLifecycle/opSplitter.ts +1 -1
- package/src/opLifecycle/outbox.ts +154 -85
- package/src/packageVersion.ts +1 -1
- package/src/pendingStateManager.ts +135 -21
- package/src/runtimeLayerCompatState.ts +5 -2
- package/src/summary/documentSchema.ts +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
|
-
// @alpha
|
|
7
|
+
// @alpha @legacy
|
|
8
8
|
export const AllowTombstoneRequestHeaderKey = "allowTombstone";
|
|
9
9
|
|
|
10
|
-
// @alpha
|
|
10
|
+
// @alpha @legacy
|
|
11
11
|
export enum CompressionAlgorithms {
|
|
12
12
|
// (undocumented)
|
|
13
13
|
lz4 = "lz4"
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
// @alpha (undocumented)
|
|
16
|
+
// @alpha @legacy (undocumented)
|
|
17
17
|
export enum ContainerMessageType {
|
|
18
18
|
// (undocumented)
|
|
19
19
|
Alias = "alias",
|
|
@@ -32,13 +32,30 @@ export enum ContainerMessageType {
|
|
|
32
32
|
Rejoin = "rejoin"
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
// @alpha
|
|
35
|
+
// @alpha @legacy
|
|
36
|
+
export interface ContainerRuntimeOptions {
|
|
37
|
+
readonly chunkSizeInBytes: number;
|
|
38
|
+
readonly compressionOptions: ICompressionRuntimeOptions;
|
|
39
|
+
readonly createBlobPayloadPending: true | undefined;
|
|
40
|
+
// @deprecated
|
|
41
|
+
readonly enableGroupedBatching: boolean;
|
|
42
|
+
readonly enableRuntimeIdCompressor: IdCompressorMode;
|
|
43
|
+
readonly explicitSchemaControl: boolean;
|
|
44
|
+
// (undocumented)
|
|
45
|
+
readonly gcOptions: IGCRuntimeOptions;
|
|
46
|
+
readonly loadSequenceNumberVerification: "close" | "log" | "bypass";
|
|
47
|
+
readonly maxBatchSizeInBytes: number;
|
|
48
|
+
// (undocumented)
|
|
49
|
+
readonly summaryOptions: ISummaryRuntimeOptions;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// @alpha @legacy (undocumented)
|
|
36
53
|
export const DefaultSummaryConfiguration: ISummaryConfiguration;
|
|
37
54
|
|
|
38
|
-
// @alpha (undocumented)
|
|
55
|
+
// @alpha @legacy (undocumented)
|
|
39
56
|
export const disabledCompressionConfig: ICompressionRuntimeOptions;
|
|
40
57
|
|
|
41
|
-
// @alpha (undocumented)
|
|
58
|
+
// @alpha @legacy (undocumented)
|
|
42
59
|
export type EnqueueSummarizeResult = (ISummarizeResults & {
|
|
43
60
|
readonly alreadyEnqueued?: undefined;
|
|
44
61
|
}) | (ISummarizeResults & {
|
|
@@ -49,7 +66,7 @@ export type EnqueueSummarizeResult = (ISummarizeResults & {
|
|
|
49
66
|
readonly overridden?: undefined;
|
|
50
67
|
};
|
|
51
68
|
|
|
52
|
-
// @alpha
|
|
69
|
+
// @alpha @legacy
|
|
53
70
|
export interface IAckedSummary {
|
|
54
71
|
// (undocumented)
|
|
55
72
|
readonly summaryAck: ISummaryAckMessage;
|
|
@@ -57,7 +74,7 @@ export interface IAckedSummary {
|
|
|
57
74
|
readonly summaryOp: ISummaryOpMessage;
|
|
58
75
|
}
|
|
59
76
|
|
|
60
|
-
// @alpha (undocumented)
|
|
77
|
+
// @alpha @legacy (undocumented)
|
|
61
78
|
export interface IAckSummaryResult {
|
|
62
79
|
// (undocumented)
|
|
63
80
|
readonly ackNackDuration: number;
|
|
@@ -65,7 +82,7 @@ export interface IAckSummaryResult {
|
|
|
65
82
|
readonly summaryAckOp: ISummaryAckMessage;
|
|
66
83
|
}
|
|
67
84
|
|
|
68
|
-
// @alpha
|
|
85
|
+
// @alpha @legacy
|
|
69
86
|
export interface IBaseSummarizeResult {
|
|
70
87
|
readonly error: IRetriableFailureError | undefined;
|
|
71
88
|
// (undocumented)
|
|
@@ -75,7 +92,7 @@ export interface IBaseSummarizeResult {
|
|
|
75
92
|
readonly stage: "base";
|
|
76
93
|
}
|
|
77
94
|
|
|
78
|
-
// @alpha (undocumented)
|
|
95
|
+
// @alpha @legacy (undocumented)
|
|
79
96
|
export interface IBroadcastSummaryResult {
|
|
80
97
|
// (undocumented)
|
|
81
98
|
readonly broadcastDuration: number;
|
|
@@ -83,7 +100,7 @@ export interface IBroadcastSummaryResult {
|
|
|
83
100
|
readonly summarizeOp: ISummaryOpMessage;
|
|
84
101
|
}
|
|
85
102
|
|
|
86
|
-
// @alpha
|
|
103
|
+
// @alpha @legacy
|
|
87
104
|
export interface IClientSummaryWatcher extends IDisposable {
|
|
88
105
|
// (undocumented)
|
|
89
106
|
waitFlushed(): Promise<IAckedSummary | undefined>;
|
|
@@ -91,38 +108,25 @@ export interface IClientSummaryWatcher extends IDisposable {
|
|
|
91
108
|
watchSummary(clientSequenceNumber: number): ISummary;
|
|
92
109
|
}
|
|
93
110
|
|
|
94
|
-
// @alpha
|
|
111
|
+
// @alpha @legacy
|
|
95
112
|
export interface ICompressionRuntimeOptions {
|
|
96
113
|
readonly compressionAlgorithm: CompressionAlgorithms;
|
|
97
114
|
readonly minimumBatchSizeInBytes: number;
|
|
98
115
|
}
|
|
99
116
|
|
|
100
|
-
// @alpha
|
|
101
|
-
export
|
|
102
|
-
readonly chunkSizeInBytes?: number;
|
|
103
|
-
readonly compressionOptions?: ICompressionRuntimeOptions;
|
|
104
|
-
// @deprecated
|
|
105
|
-
readonly enableGroupedBatching?: boolean;
|
|
106
|
-
readonly enableRuntimeIdCompressor?: IdCompressorMode;
|
|
107
|
-
readonly explicitSchemaControl?: boolean;
|
|
108
|
-
// (undocumented)
|
|
109
|
-
readonly gcOptions?: IGCRuntimeOptions;
|
|
110
|
-
readonly loadSequenceNumberVerification?: "close" | "log" | "bypass";
|
|
111
|
-
readonly maxBatchSizeInBytes?: number;
|
|
112
|
-
// (undocumented)
|
|
113
|
-
readonly summaryOptions?: ISummaryRuntimeOptions;
|
|
114
|
-
}
|
|
117
|
+
// @alpha @legacy
|
|
118
|
+
export type IContainerRuntimeOptions = Partial<ContainerRuntimeOptions>;
|
|
115
119
|
|
|
116
|
-
// @alpha
|
|
120
|
+
// @alpha @legacy
|
|
117
121
|
export type IdCompressorMode = "on" | "delayed" | undefined;
|
|
118
122
|
|
|
119
|
-
// @alpha
|
|
123
|
+
// @alpha @legacy
|
|
120
124
|
export interface IEnqueueSummarizeOptions extends IOnDemandSummarizeOptions {
|
|
121
125
|
readonly afterSequenceNumber?: number;
|
|
122
126
|
readonly override?: boolean;
|
|
123
127
|
}
|
|
124
128
|
|
|
125
|
-
// @alpha @deprecated (undocumented)
|
|
129
|
+
// @alpha @deprecated @legacy (undocumented)
|
|
126
130
|
export interface IFluidDataStoreAttributes0 {
|
|
127
131
|
readonly isRootDataStore?: boolean;
|
|
128
132
|
// (undocumented)
|
|
@@ -133,7 +137,7 @@ export interface IFluidDataStoreAttributes0 {
|
|
|
133
137
|
readonly summaryFormatVersion?: undefined;
|
|
134
138
|
}
|
|
135
139
|
|
|
136
|
-
// @alpha @deprecated (undocumented)
|
|
140
|
+
// @alpha @deprecated @legacy (undocumented)
|
|
137
141
|
export interface IFluidDataStoreAttributes1 extends OmitAttributesVersions<IFluidDataStoreAttributes0> {
|
|
138
142
|
// (undocumented)
|
|
139
143
|
readonly snapshotFormatVersion: "0.1";
|
|
@@ -141,7 +145,7 @@ export interface IFluidDataStoreAttributes1 extends OmitAttributesVersions<IFlui
|
|
|
141
145
|
readonly summaryFormatVersion?: undefined;
|
|
142
146
|
}
|
|
143
147
|
|
|
144
|
-
// @alpha @deprecated (undocumented)
|
|
148
|
+
// @alpha @deprecated @legacy (undocumented)
|
|
145
149
|
export interface IFluidDataStoreAttributes2 extends OmitAttributesVersions<IFluidDataStoreAttributes1> {
|
|
146
150
|
readonly disableIsolatedChannels?: true;
|
|
147
151
|
readonly snapshotFormatVersion?: undefined;
|
|
@@ -149,7 +153,7 @@ export interface IFluidDataStoreAttributes2 extends OmitAttributesVersions<IFlui
|
|
|
149
153
|
readonly summaryFormatVersion: 2;
|
|
150
154
|
}
|
|
151
155
|
|
|
152
|
-
// @alpha (undocumented)
|
|
156
|
+
// @alpha @legacy (undocumented)
|
|
153
157
|
export interface IGCRuntimeOptions {
|
|
154
158
|
[key: string]: any;
|
|
155
159
|
enableGCSweep?: true;
|
|
@@ -158,7 +162,7 @@ export interface IGCRuntimeOptions {
|
|
|
158
162
|
sweepGracePeriodMs?: number;
|
|
159
163
|
}
|
|
160
164
|
|
|
161
|
-
// @alpha
|
|
165
|
+
// @alpha @legacy
|
|
162
166
|
export interface IGeneratedSummaryStats extends ISummaryStats {
|
|
163
167
|
readonly dataStoreCount: number;
|
|
164
168
|
readonly gcBlobNodeCount?: number;
|
|
@@ -168,7 +172,7 @@ export interface IGeneratedSummaryStats extends ISummaryStats {
|
|
|
168
172
|
readonly summaryNumber: number;
|
|
169
173
|
}
|
|
170
174
|
|
|
171
|
-
// @alpha
|
|
175
|
+
// @alpha @legacy
|
|
172
176
|
export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "stage"> {
|
|
173
177
|
readonly generateDuration: number;
|
|
174
178
|
// (undocumented)
|
|
@@ -177,7 +181,7 @@ export interface IGenerateSummaryTreeResult extends Omit<IBaseSummarizeResult, "
|
|
|
177
181
|
readonly summaryTree: ISummaryTree;
|
|
178
182
|
}
|
|
179
183
|
|
|
180
|
-
// @alpha (undocumented)
|
|
184
|
+
// @alpha @legacy (undocumented)
|
|
181
185
|
export interface INackSummaryResult {
|
|
182
186
|
// (undocumented)
|
|
183
187
|
readonly ackNackDuration: number;
|
|
@@ -185,22 +189,22 @@ export interface INackSummaryResult {
|
|
|
185
189
|
readonly summaryNackOp: ISummaryNackMessage;
|
|
186
190
|
}
|
|
187
191
|
|
|
188
|
-
// @alpha @deprecated
|
|
192
|
+
// @alpha @deprecated @legacy
|
|
189
193
|
export const InactiveResponseHeaderKey = "isInactive";
|
|
190
194
|
|
|
191
|
-
// @alpha (undocumented)
|
|
195
|
+
// @alpha @legacy (undocumented)
|
|
192
196
|
export interface IOnDemandSummarizeOptions extends ISummarizeOptions {
|
|
193
197
|
readonly reason: string;
|
|
194
198
|
readonly retryOnFailure?: boolean;
|
|
195
199
|
}
|
|
196
200
|
|
|
197
|
-
// @alpha
|
|
201
|
+
// @alpha @legacy
|
|
198
202
|
export interface IRetriableFailureError extends Error {
|
|
199
203
|
// (undocumented)
|
|
200
204
|
readonly retryAfterSeconds?: number;
|
|
201
205
|
}
|
|
202
206
|
|
|
203
|
-
// @alpha
|
|
207
|
+
// @alpha @legacy
|
|
204
208
|
export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stage" | "error"> {
|
|
205
209
|
readonly clientSequenceNumber: number;
|
|
206
210
|
// (undocumented)
|
|
@@ -208,12 +212,12 @@ export interface ISubmitSummaryOpResult extends Omit<IUploadSummaryResult, "stag
|
|
|
208
212
|
readonly submitOpDuration: number;
|
|
209
213
|
}
|
|
210
214
|
|
|
211
|
-
// @alpha
|
|
215
|
+
// @alpha @legacy
|
|
212
216
|
export interface ISummarizeOptions {
|
|
213
217
|
readonly fullTree?: boolean;
|
|
214
218
|
}
|
|
215
219
|
|
|
216
|
-
// @alpha (undocumented)
|
|
220
|
+
// @alpha @legacy (undocumented)
|
|
217
221
|
export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
|
|
218
222
|
// (undocumented)
|
|
219
223
|
close(): void;
|
|
@@ -226,14 +230,14 @@ export interface ISummarizer extends IEventProvider<ISummarizerEvents> {
|
|
|
226
230
|
summarizeOnDemand(options: IOnDemandSummarizeOptions): ISummarizeResults;
|
|
227
231
|
}
|
|
228
232
|
|
|
229
|
-
// @alpha (undocumented)
|
|
233
|
+
// @alpha @legacy (undocumented)
|
|
230
234
|
export interface ISummarizeResults {
|
|
231
235
|
readonly receivedSummaryAckOrNack: Promise<SummarizeResultPart<IAckSummaryResult, INackSummaryResult>>;
|
|
232
236
|
readonly summaryOpBroadcasted: Promise<SummarizeResultPart<IBroadcastSummaryResult>>;
|
|
233
237
|
readonly summarySubmitted: Promise<SummarizeResultPart<SubmitSummaryResult, SubmitSummaryFailureData>>;
|
|
234
238
|
}
|
|
235
239
|
|
|
236
|
-
// @alpha
|
|
240
|
+
// @alpha @legacy
|
|
237
241
|
export interface ISummary {
|
|
238
242
|
// (undocumented)
|
|
239
243
|
readonly clientId: string;
|
|
@@ -245,7 +249,7 @@ export interface ISummary {
|
|
|
245
249
|
waitBroadcast(): Promise<ISummaryOpMessage>;
|
|
246
250
|
}
|
|
247
251
|
|
|
248
|
-
// @alpha
|
|
252
|
+
// @alpha @legacy
|
|
249
253
|
export interface ISummaryAckMessage extends ISequencedDocumentMessage {
|
|
250
254
|
// (undocumented)
|
|
251
255
|
contents: ISummaryAck;
|
|
@@ -253,35 +257,35 @@ export interface ISummaryAckMessage extends ISequencedDocumentMessage {
|
|
|
253
257
|
type: MessageType.SummaryAck;
|
|
254
258
|
}
|
|
255
259
|
|
|
256
|
-
// @alpha (undocumented)
|
|
260
|
+
// @alpha @legacy (undocumented)
|
|
257
261
|
export interface ISummaryBaseConfiguration {
|
|
258
262
|
initialSummarizerDelayMs: number;
|
|
259
263
|
maxAckWaitTime: number;
|
|
260
264
|
maxOpsSinceLastSummary: number;
|
|
261
265
|
}
|
|
262
266
|
|
|
263
|
-
// @alpha (undocumented)
|
|
267
|
+
// @alpha @legacy (undocumented)
|
|
264
268
|
export interface ISummaryCollectionOpEvents extends IEvent {
|
|
265
269
|
// (undocumented)
|
|
266
270
|
(event: OpActionEventName, listener: OpActionEventListener): any;
|
|
267
271
|
}
|
|
268
272
|
|
|
269
|
-
// @alpha (undocumented)
|
|
273
|
+
// @alpha @legacy (undocumented)
|
|
270
274
|
export type ISummaryConfiguration = ISummaryConfigurationDisableSummarizer | ISummaryConfigurationDisableHeuristics | ISummaryConfigurationHeuristics;
|
|
271
275
|
|
|
272
|
-
// @alpha (undocumented)
|
|
276
|
+
// @alpha @legacy (undocumented)
|
|
273
277
|
export interface ISummaryConfigurationDisableHeuristics extends ISummaryBaseConfiguration {
|
|
274
278
|
// (undocumented)
|
|
275
279
|
state: "disableHeuristics";
|
|
276
280
|
}
|
|
277
281
|
|
|
278
|
-
// @alpha (undocumented)
|
|
282
|
+
// @alpha @legacy (undocumented)
|
|
279
283
|
export interface ISummaryConfigurationDisableSummarizer {
|
|
280
284
|
// (undocumented)
|
|
281
285
|
state: "disabled";
|
|
282
286
|
}
|
|
283
287
|
|
|
284
|
-
// @alpha (undocumented)
|
|
288
|
+
// @alpha @legacy (undocumented)
|
|
285
289
|
export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfiguration {
|
|
286
290
|
maxIdleTime: number;
|
|
287
291
|
maxOps: number;
|
|
@@ -295,7 +299,7 @@ export interface ISummaryConfigurationHeuristics extends ISummaryBaseConfigurati
|
|
|
295
299
|
state: "enabled";
|
|
296
300
|
}
|
|
297
301
|
|
|
298
|
-
// @alpha
|
|
302
|
+
// @alpha @legacy
|
|
299
303
|
export interface ISummaryNackMessage extends ISequencedDocumentMessage {
|
|
300
304
|
// (undocumented)
|
|
301
305
|
contents: ISummaryNack;
|
|
@@ -303,7 +307,7 @@ export interface ISummaryNackMessage extends ISequencedDocumentMessage {
|
|
|
303
307
|
type: MessageType.SummaryNack;
|
|
304
308
|
}
|
|
305
309
|
|
|
306
|
-
// @alpha
|
|
310
|
+
// @alpha @legacy
|
|
307
311
|
export interface ISummaryOpMessage extends ISequencedDocumentMessage {
|
|
308
312
|
// (undocumented)
|
|
309
313
|
contents: ISummaryContent;
|
|
@@ -311,14 +315,14 @@ export interface ISummaryOpMessage extends ISequencedDocumentMessage {
|
|
|
311
315
|
type: MessageType.Summarize;
|
|
312
316
|
}
|
|
313
317
|
|
|
314
|
-
// @alpha (undocumented)
|
|
318
|
+
// @alpha @legacy (undocumented)
|
|
315
319
|
export interface ISummaryRuntimeOptions {
|
|
316
320
|
// @deprecated
|
|
317
321
|
initialSummarizerDelayMs?: number;
|
|
318
322
|
summaryConfigOverrides?: ISummaryConfiguration;
|
|
319
323
|
}
|
|
320
324
|
|
|
321
|
-
// @alpha
|
|
325
|
+
// @alpha @legacy
|
|
322
326
|
export interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "stage"> {
|
|
323
327
|
readonly handle: string;
|
|
324
328
|
// (undocumented)
|
|
@@ -326,10 +330,10 @@ export interface IUploadSummaryResult extends Omit<IGenerateSummaryTreeResult, "
|
|
|
326
330
|
readonly uploadDuration: number;
|
|
327
331
|
}
|
|
328
332
|
|
|
329
|
-
// @alpha
|
|
333
|
+
// @alpha @legacy
|
|
330
334
|
export function loadContainerRuntime(params: LoadContainerRuntimeParams): Promise<IContainerRuntime & IRuntime>;
|
|
331
335
|
|
|
332
|
-
// @alpha
|
|
336
|
+
// @alpha @legacy
|
|
333
337
|
export interface LoadContainerRuntimeParams {
|
|
334
338
|
containerScope?: FluidObject;
|
|
335
339
|
context: IContainerContext;
|
|
@@ -341,28 +345,28 @@ export interface LoadContainerRuntimeParams {
|
|
|
341
345
|
runtimeOptions?: IContainerRuntimeOptions;
|
|
342
346
|
}
|
|
343
347
|
|
|
344
|
-
// @alpha @deprecated (undocumented)
|
|
348
|
+
// @alpha @deprecated @legacy (undocumented)
|
|
345
349
|
export type OmitAttributesVersions<T> = Omit<T, "snapshotFormatVersion" | "summaryFormatVersion">;
|
|
346
350
|
|
|
347
|
-
// @alpha (undocumented)
|
|
351
|
+
// @alpha @legacy (undocumented)
|
|
348
352
|
export type OpActionEventListener = (op: ISequencedDocumentMessage) => void;
|
|
349
353
|
|
|
350
|
-
// @alpha (undocumented)
|
|
354
|
+
// @alpha @legacy (undocumented)
|
|
351
355
|
export type OpActionEventName = MessageType.Summarize | MessageType.SummaryAck | MessageType.SummaryNack | "default";
|
|
352
356
|
|
|
353
|
-
// @alpha @deprecated
|
|
357
|
+
// @alpha @deprecated @legacy
|
|
354
358
|
export type ReadFluidDataStoreAttributes = IFluidDataStoreAttributes0 | IFluidDataStoreAttributes1 | IFluidDataStoreAttributes2;
|
|
355
359
|
|
|
356
|
-
// @alpha
|
|
360
|
+
// @alpha @legacy
|
|
357
361
|
export interface SubmitSummaryFailureData {
|
|
358
362
|
// (undocumented)
|
|
359
363
|
stage: SummaryStage;
|
|
360
364
|
}
|
|
361
365
|
|
|
362
|
-
// @alpha
|
|
366
|
+
// @alpha @legacy
|
|
363
367
|
export type SubmitSummaryResult = IBaseSummarizeResult | IGenerateSummaryTreeResult | IUploadSummaryResult | ISubmitSummaryOpResult;
|
|
364
368
|
|
|
365
|
-
// @alpha (undocumented)
|
|
369
|
+
// @alpha @legacy (undocumented)
|
|
366
370
|
export type SummarizeResultPart<TSuccess, TFailure = undefined> = {
|
|
367
371
|
success: true;
|
|
368
372
|
data: TSuccess;
|
|
@@ -373,7 +377,7 @@ export type SummarizeResultPart<TSuccess, TFailure = undefined> = {
|
|
|
373
377
|
error: IRetriableFailureError;
|
|
374
378
|
};
|
|
375
379
|
|
|
376
|
-
// @alpha
|
|
380
|
+
// @alpha @legacy
|
|
377
381
|
export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEvents> {
|
|
378
382
|
constructor(deltaManager: IDeltaManager<ISequencedDocumentMessage, IDocumentMessage>, logger: ITelemetryBaseLogger);
|
|
379
383
|
// (undocumented)
|
|
@@ -397,10 +401,10 @@ export class SummaryCollection extends TypedEventEmitter<ISummaryCollectionOpEve
|
|
|
397
401
|
waitSummaryAck(referenceSequenceNumber: number): Promise<IAckedSummary>;
|
|
398
402
|
}
|
|
399
403
|
|
|
400
|
-
// @alpha
|
|
404
|
+
// @alpha @legacy
|
|
401
405
|
export type SummaryStage = SubmitSummaryResult["stage"] | "unknown";
|
|
402
406
|
|
|
403
|
-
// @alpha
|
|
407
|
+
// @alpha @legacy
|
|
404
408
|
export const TombstoneResponseHeaderKey = "isTombstoned";
|
|
405
409
|
|
|
406
410
|
// (No @packageDocumentation comment for this package)
|
|
Binary file
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { TypedEventEmitter } from "@fluid-internal/client-utils";
|
|
6
6
|
import { IContainerRuntime, IContainerRuntimeEvents } from "@fluidframework/container-runtime-definitions/internal";
|
|
7
|
-
import type { IEvent, IEventProvider, IFluidHandleContext, IFluidHandleInternal } from "@fluidframework/core-interfaces/internal";
|
|
7
|
+
import type { IEvent, IEventProvider, IFluidHandleContext, IFluidHandleInternal, IFluidHandleInternalPayloadPending } from "@fluidframework/core-interfaces/internal";
|
|
8
8
|
import { IDocumentStorageService, ICreateBlobResponse } from "@fluidframework/driver-definitions/internal";
|
|
9
9
|
import { IGarbageCollectionData, ISummaryTreeWithStats, ITelemetryContext, type ISequencedMessageEnvelope } from "@fluidframework/runtime-definitions/internal";
|
|
10
10
|
import { FluidHandleBase } from "@fluidframework/runtime-utils/internal";
|
|
@@ -16,15 +16,16 @@ import { type IBlobManagerLoadInfo } from "./blobManagerSnapSum.js";
|
|
|
16
16
|
* DataObject.request() recognizes requests in the form of `/blobs/<id>`
|
|
17
17
|
* and loads blob.
|
|
18
18
|
*/
|
|
19
|
-
export declare class BlobHandle extends FluidHandleBase<ArrayBufferLike> {
|
|
19
|
+
export declare class BlobHandle extends FluidHandleBase<ArrayBufferLike> implements IFluidHandleInternalPayloadPending<ArrayBufferLike> {
|
|
20
20
|
readonly path: string;
|
|
21
21
|
readonly routeContext: IFluidHandleContext;
|
|
22
22
|
get: () => Promise<ArrayBufferLike>;
|
|
23
|
+
readonly payloadPending: boolean;
|
|
23
24
|
private readonly onAttachGraph?;
|
|
24
25
|
private attached;
|
|
25
26
|
get isAttached(): boolean;
|
|
26
27
|
readonly absolutePath: string;
|
|
27
|
-
constructor(path: string, routeContext: IFluidHandleContext, get: () => Promise<ArrayBufferLike>, onAttachGraph?: (() => void) | undefined);
|
|
28
|
+
constructor(path: string, routeContext: IFluidHandleContext, get: () => Promise<ArrayBufferLike>, payloadPending: boolean, onAttachGraph?: (() => void) | undefined);
|
|
28
29
|
attachGraph(): void;
|
|
29
30
|
bind(handle: IFluidHandleInternal): void;
|
|
30
31
|
}
|
|
@@ -95,12 +96,14 @@ export declare class BlobManager {
|
|
|
95
96
|
readonly runtime: IBlobManagerRuntime;
|
|
96
97
|
stashedBlobs: IPendingBlobs | undefined;
|
|
97
98
|
readonly localBlobIdGenerator?: (() => string) | undefined;
|
|
99
|
+
readonly createBlobPayloadPending: boolean;
|
|
98
100
|
});
|
|
99
101
|
get allBlobsAttached(): boolean;
|
|
100
102
|
get hasPendingBlobs(): boolean;
|
|
101
103
|
private createAbortError;
|
|
102
104
|
hasPendingStashedUploads(): boolean;
|
|
103
|
-
|
|
105
|
+
hasBlob(blobId: string): boolean;
|
|
106
|
+
getBlob(blobId: string, payloadPending: boolean): Promise<ArrayBufferLike>;
|
|
104
107
|
private getBlobHandle;
|
|
105
108
|
private createBlobDetached;
|
|
106
109
|
createBlob(blob: ArrayBufferLike, signal?: AbortSignal): Promise<IFluidHandleInternal<ArrayBufferLike>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../../src/blobManager/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EAGjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EACX,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,eAAe,EAIf,MAAM,wCAAwC,CAAC;AAYhD,OAAO,EAIN,KAAK,oBAAoB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;GAMG;AACH,qBAAa,
|
|
1
|
+
{"version":3,"file":"blobManager.d.ts","sourceRoot":"","sources":["../../src/blobManager/blobManager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,iBAAiB,EAGjB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EACN,iBAAiB,EACjB,uBAAuB,EACvB,MAAM,wDAAwD,CAAC;AAChE,OAAO,KAAK,EACX,MAAM,EACN,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,kCAAkC,EAClC,MAAM,0CAA0C,CAAC;AAElD,OAAO,EACN,uBAAuB,EACvB,mBAAmB,EACnB,MAAM,6CAA6C,CAAC;AAErD,OAAO,EACN,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,KAAK,yBAAyB,EAC9B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACN,eAAe,EAIf,MAAM,wCAAwC,CAAC;AAYhD,OAAO,EAIN,KAAK,oBAAoB,EACzB,MAAM,yBAAyB,CAAC;AAEjC;;;;;;GAMG;AAC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ACH,OAAO,CAAC,4BAA4B;IA8CpC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAqBrB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI;IAiBzD;;;;;;;;;OASG;IACU,wBAAwB,CACpC,uBAAuB,CAAC,EAAE,WAAW,GACnC,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;CA+ErC;AAmBD;;GAEG;AACH,eAAO,MAAM,UAAU,SAAU,MAAM,gCACL,CAAC"}
|
|
@@ -24,11 +24,12 @@ class BlobHandle extends internal_3.FluidHandleBase {
|
|
|
24
24
|
get isAttached() {
|
|
25
25
|
return this.routeContext.isAttached && this.attached;
|
|
26
26
|
}
|
|
27
|
-
constructor(path, routeContext, get, onAttachGraph) {
|
|
27
|
+
constructor(path, routeContext, get, payloadPending, onAttachGraph) {
|
|
28
28
|
super();
|
|
29
29
|
this.path = path;
|
|
30
30
|
this.routeContext = routeContext;
|
|
31
31
|
this.get = get;
|
|
32
|
+
this.payloadPending = payloadPending;
|
|
32
33
|
this.onAttachGraph = onAttachGraph;
|
|
33
34
|
this.attached = false;
|
|
34
35
|
this.absolutePath = (0, internal_3.generateHandleContextPath)(path, this.routeContext);
|
|
@@ -165,7 +166,10 @@ class BlobManager {
|
|
|
165
166
|
hasPendingStashedUploads() {
|
|
166
167
|
return [...this.pendingBlobs.values()].some((e) => e.stashedUpload === true);
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
+
hasBlob(blobId) {
|
|
170
|
+
return this.redirectTable.get(blobId) !== undefined;
|
|
171
|
+
}
|
|
172
|
+
async getBlob(blobId, payloadPending) {
|
|
169
173
|
// Verify that the blob is not deleted, i.e., it has not been garbage collected. If it is, this will throw
|
|
170
174
|
// an error, failing the call.
|
|
171
175
|
this.verifyBlobNotDeleted(blobId);
|
|
@@ -186,8 +190,24 @@ class BlobManager {
|
|
|
186
190
|
}
|
|
187
191
|
else {
|
|
188
192
|
const attachedStorageId = this.redirectTable.get(blobId);
|
|
189
|
-
(
|
|
190
|
-
|
|
193
|
+
if (!payloadPending) {
|
|
194
|
+
(0, internal_1.assert)(!!attachedStorageId, 0x11f /* "requesting unknown blobs" */);
|
|
195
|
+
}
|
|
196
|
+
// If we didn't find it in the redirectTable, assume the attach op is coming eventually and wait.
|
|
197
|
+
// We do this even if the local client doesn't have the blob payloadPending flag enabled, in case a
|
|
198
|
+
// remote client does have it enabled. This wait may be infinite if the uploading client failed
|
|
199
|
+
// the upload and doesn't exist anymore.
|
|
200
|
+
storageId =
|
|
201
|
+
attachedStorageId ??
|
|
202
|
+
(await new Promise((resolve) => {
|
|
203
|
+
const onProcessBlobAttach = (localId, _storageId) => {
|
|
204
|
+
if (localId === blobId) {
|
|
205
|
+
this.internalEvents.off("processedBlobAttach", onProcessBlobAttach);
|
|
206
|
+
resolve(_storageId);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
this.internalEvents.on("processedBlobAttach", onProcessBlobAttach);
|
|
210
|
+
}));
|
|
191
211
|
}
|
|
192
212
|
return internal_4.PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: "AttachmentReadBlob", id: storageId }, async (event) => {
|
|
193
213
|
return this.storage.readBlob(storageId).catch((error) => {
|
|
@@ -207,11 +227,12 @@ class BlobManager {
|
|
|
207
227
|
? () => {
|
|
208
228
|
pending.attached = true;
|
|
209
229
|
// Notify listeners (e.g. serialization process) that blob has been attached
|
|
210
|
-
this.internalEvents.emit("
|
|
230
|
+
this.internalEvents.emit("handleAttached", pending);
|
|
211
231
|
this.deletePendingBlobMaybe(localId);
|
|
212
232
|
}
|
|
213
233
|
: undefined;
|
|
214
|
-
return new BlobHandle(getGCNodePathFromBlobId(localId), this.routeContext, async () => this.getBlob(localId),
|
|
234
|
+
return new BlobHandle(getGCNodePathFromBlobId(localId), this.routeContext, async () => this.getBlob(localId, false), false, // payloadPending
|
|
235
|
+
callback);
|
|
215
236
|
}
|
|
216
237
|
async createBlobDetached(blob) {
|
|
217
238
|
// Blobs created while the container is detached are stored in IDetachedBlobStorage.
|
|
@@ -352,10 +373,14 @@ class BlobManager {
|
|
|
352
373
|
// If there is already an op for this storage ID, append the local ID to the list. Once any op for
|
|
353
374
|
// this storage ID is ack'd, all pending blobs for it can be resolved since the op will keep the
|
|
354
375
|
// blob alive in storage.
|
|
355
|
-
this.opsInFlight.
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
376
|
+
let setForRemoteId = this.opsInFlight.get(response.id);
|
|
377
|
+
if (setForRemoteId === undefined) {
|
|
378
|
+
setForRemoteId = new Set();
|
|
379
|
+
this.opsInFlight.set(response.id, setForRemoteId);
|
|
380
|
+
}
|
|
381
|
+
// seeing the same localId twice can happen if a blob is being reuploaded and stashed.
|
|
382
|
+
// TODO: review stashing logic and see if we can avoid this, as well in tests.
|
|
383
|
+
setForRemoteId.add(localId);
|
|
359
384
|
}
|
|
360
385
|
return response;
|
|
361
386
|
}
|
|
@@ -420,6 +445,7 @@ class BlobManager {
|
|
|
420
445
|
this.deletePendingBlobMaybe(localId);
|
|
421
446
|
}
|
|
422
447
|
}
|
|
448
|
+
this.internalEvents.emit("processedBlobAttach", localId, blobId);
|
|
423
449
|
}
|
|
424
450
|
summarize(telemetryContext) {
|
|
425
451
|
return (0, blobManagerSnapSum_js_1.summarizeBlobManagerState)(this.redirectTable, this.runtime.attachState);
|
|
@@ -580,7 +606,7 @@ class BlobManager {
|
|
|
580
606
|
}, { once: true });
|
|
581
607
|
const onBlobAttached = (attachedEntry) => {
|
|
582
608
|
if (attachedEntry === entry) {
|
|
583
|
-
this.internalEvents.off("
|
|
609
|
+
this.internalEvents.off("handleAttached", onBlobAttached);
|
|
584
610
|
resolve();
|
|
585
611
|
}
|
|
586
612
|
};
|
|
@@ -588,7 +614,7 @@ class BlobManager {
|
|
|
588
614
|
resolve();
|
|
589
615
|
}
|
|
590
616
|
else {
|
|
591
|
-
this.internalEvents.on("
|
|
617
|
+
this.internalEvents.on("handleAttached", onBlobAttached);
|
|
592
618
|
}
|
|
593
619
|
}));
|
|
594
620
|
}
|