@fluidframework/container-runtime 2.0.0-dev-rc.3.0.0.253463 → 2.0.0-dev-rc.3.0.0.254513
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/api-report/container-runtime.api.md +1 -1
- package/dist/channelCollection.d.ts +1 -0
- package/dist/channelCollection.d.ts.map +1 -1
- package/dist/channelCollection.js +4 -1
- package/dist/channelCollection.js.map +1 -1
- package/dist/container-runtime-untrimmed.d.ts +2 -1
- package/dist/containerRuntime.d.ts.map +1 -1
- package/dist/containerRuntime.js +20 -12
- package/dist/containerRuntime.js.map +1 -1
- package/dist/dataStoreContext.d.ts +2 -2
- package/dist/dataStoreContext.d.ts.map +1 -1
- package/dist/dataStoreContext.js +12 -2
- package/dist/dataStoreContext.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/summary/documentSchema.d.ts.map +1 -1
- package/dist/summary/documentSchema.js +21 -13
- package/dist/summary/documentSchema.js.map +1 -1
- package/lib/channelCollection.d.ts +1 -0
- package/lib/channelCollection.d.ts.map +1 -1
- package/lib/channelCollection.js +4 -1
- package/lib/channelCollection.js.map +1 -1
- package/lib/container-runtime-untrimmed.d.ts +2 -1
- package/lib/containerRuntime.d.ts.map +1 -1
- package/lib/containerRuntime.js +20 -12
- package/lib/containerRuntime.js.map +1 -1
- package/lib/dataStoreContext.d.ts +2 -2
- package/lib/dataStoreContext.d.ts.map +1 -1
- package/lib/dataStoreContext.js +12 -2
- package/lib/dataStoreContext.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/summary/documentSchema.d.ts.map +1 -1
- package/lib/summary/documentSchema.js +21 -13
- package/lib/summary/documentSchema.js.map +1 -1
- package/package.json +26 -26
- package/src/channelCollection.ts +5 -1
- package/src/containerRuntime.ts +25 -12
- package/src/dataStoreContext.ts +15 -3
- package/src/packageVersion.ts +1 -1
- package/src/summary/documentSchema.ts +30 -20
package/dist/containerRuntime.js
CHANGED
|
@@ -297,6 +297,18 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
|
+
let desiredIdCompressorMode;
|
|
301
|
+
switch (mc.config.getBoolean("Fluid.ContainerRuntime.IdCompressorEnabled")) {
|
|
302
|
+
case true:
|
|
303
|
+
desiredIdCompressorMode = "on";
|
|
304
|
+
break;
|
|
305
|
+
case false:
|
|
306
|
+
desiredIdCompressorMode = undefined;
|
|
307
|
+
break;
|
|
308
|
+
default:
|
|
309
|
+
desiredIdCompressorMode = enableRuntimeIdCompressor;
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
300
312
|
// Enabling the IdCompressor is a one-way operation and we only want to
|
|
301
313
|
// allow new containers to turn it on.
|
|
302
314
|
let idCompressorMode;
|
|
@@ -308,24 +320,19 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
308
320
|
// 3) Same logic applies for "delayed" mode
|
|
309
321
|
// Maybe in the future we will need to enabled (and figure how to do it safely) "delayed" -> "on" change.
|
|
310
322
|
// We could do "off" -> "on" transition too, if all clients start loading compressor (but not using it initially) and
|
|
311
|
-
// do so for a while - this will allow clients to eventually
|
|
323
|
+
// do so for a while - this will allow clients to eventually disregard "off" setting (when it's safe so) and start
|
|
312
324
|
// using compressor in future sessions.
|
|
313
325
|
// Everyting is possible, but it needs to be designed and executed carefully, when such need arises.
|
|
314
326
|
idCompressorMode = metadata?.documentSchema?.runtime
|
|
315
327
|
?.idCompressorMode;
|
|
328
|
+
// This is the only exception to the rule above - we have proper plumbing to load ID compressor on schema change
|
|
329
|
+
// event. It is loaded async (relative to op processing), so this conversion is only safe for off -> delayed conversion!
|
|
330
|
+
if (idCompressorMode === undefined && desiredIdCompressorMode === "delayed") {
|
|
331
|
+
idCompressorMode = desiredIdCompressorMode;
|
|
332
|
+
}
|
|
316
333
|
}
|
|
317
334
|
else {
|
|
318
|
-
|
|
319
|
-
case true:
|
|
320
|
-
idCompressorMode = "on";
|
|
321
|
-
break;
|
|
322
|
-
case false:
|
|
323
|
-
idCompressorMode = undefined;
|
|
324
|
-
break;
|
|
325
|
-
default:
|
|
326
|
-
idCompressorMode = enableRuntimeIdCompressor;
|
|
327
|
-
break;
|
|
328
|
-
}
|
|
335
|
+
idCompressorMode = desiredIdCompressorMode;
|
|
329
336
|
}
|
|
330
337
|
const createIdCompressorFn = async () => {
|
|
331
338
|
const { createIdCompressor, deserializeIdCompressor, createSessionId } = await import("@fluidframework/id-compressor/internal");
|
|
@@ -1485,6 +1492,7 @@ class ContainerRuntime extends client_utils_1.TypedEventEmitter {
|
|
|
1485
1492
|
// Some other client turned on the id compressor. If we have not turned it on,
|
|
1486
1493
|
// put it in a pending queue and delay finalization.
|
|
1487
1494
|
if (this._idCompressor === undefined) {
|
|
1495
|
+
(0, internal_2.assert)(this.idCompressorMode !== undefined, "id compressor should be enabled");
|
|
1488
1496
|
this.pendingIdCompressorOps.push(range);
|
|
1489
1497
|
}
|
|
1490
1498
|
else {
|