@fluidframework/container-runtime 2.0.0-internal.3.0.4 → 2.0.0-internal.3.0.6

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.
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.3.0.4\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,mCAAmC,CAAC;AAC3D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/container-runtime\";\nexport const pkgVersion = \"2.0.0-internal.3.0.6\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.0.0-internal.3.0.4",
3
+ "version": "2.0.0-internal.3.0.6",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -65,19 +65,19 @@
65
65
  "dependencies": {
66
66
  "@fluidframework/common-definitions": "^0.20.1",
67
67
  "@fluidframework/common-utils": "^1.0.0",
68
- "@fluidframework/container-definitions": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
69
- "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
70
- "@fluidframework/container-utils": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
71
- "@fluidframework/core-interfaces": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
72
- "@fluidframework/datastore": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
73
- "@fluidframework/driver-definitions": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
74
- "@fluidframework/driver-utils": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
75
- "@fluidframework/garbage-collector": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
68
+ "@fluidframework/container-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
69
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
70
+ "@fluidframework/container-utils": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
71
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
72
+ "@fluidframework/datastore": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
73
+ "@fluidframework/driver-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
74
+ "@fluidframework/driver-utils": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
75
+ "@fluidframework/garbage-collector": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
76
76
  "@fluidframework/protocol-base": "^0.1038.2000",
77
77
  "@fluidframework/protocol-definitions": "^1.1.0",
78
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
79
- "@fluidframework/runtime-utils": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
80
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
78
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
79
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
80
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
81
81
  "double-ended-queue": "^2.1.0-0",
82
82
  "events": "^3.1.0",
83
83
  "lz4js": "^0.2.0",
@@ -89,8 +89,8 @@
89
89
  "@fluidframework/build-tools": "^0.8.0",
90
90
  "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.3.0.0",
91
91
  "@fluidframework/eslint-config-fluid": "^2.0.0",
92
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
93
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.3.0.4 <2.0.0-internal.4.0.0",
92
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
93
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.3.0.6 <2.0.0-internal.4.0.0",
94
94
  "@microsoft/api-extractor": "^7.22.2",
95
95
  "@rushstack/eslint-config": "^2.5.1",
96
96
  "@types/double-ended-queue": "^2.1.0",
@@ -2198,7 +2198,7 @@ export class ContainerRuntime extends TypedEventEmitter<IContainerRuntimeEvents>
2198
2198
 
2199
2199
  const telemetryContext = new TelemetryContext();
2200
2200
  // Add the options that are used to generate this summary to the telemetry context.
2201
- telemetryContext.setAll("fluid_Summarize", "Options", {
2201
+ telemetryContext.setMultiple("fluid_Summarize", "Options", {
2202
2202
  fullTree,
2203
2203
  trackState,
2204
2204
  runGC,
@@ -28,7 +28,6 @@ import {
28
28
  ISummarizeResult,
29
29
  ITelemetryContext,
30
30
  IGarbageCollectionNodeData,
31
- IGarbageCollectionSummaryDetailsLegacy,
32
31
  ISummaryTreeWithStats,
33
32
  gcDeletedBlobKey,
34
33
  } from "@fluidframework/runtime-definitions";
@@ -49,7 +48,6 @@ import {
49
48
  } from "@fluidframework/telemetry-utils";
50
49
 
51
50
  import { IGCRuntimeOptions, RuntimeHeaders } from "./containerRuntime";
52
- import { getSummaryForDatastores } from "./dataStores";
53
51
  import {
54
52
  currentGCVersion,
55
53
  defaultInactiveTimeoutMs,
@@ -67,14 +65,11 @@ import {
67
65
  gcTombstoneGenerationOptionName
68
66
  } from "./garbageCollectionConstants";
69
67
  import { sendGCTombstoneEvent } from "./garbageCollectionTombstoneUtils";
70
- import { SweepReadyUsageDetectionHandler } from "./gcSweepReadyUsageDetection";
71
68
  import {
72
69
  getGCVersion,
73
70
  GCVersion,
74
71
  IContainerRuntimeMetadata,
75
72
  metadataBlobName,
76
- ReadFluidDataStoreAttributes,
77
- dataStoreAttributesBlobName,
78
73
  IGCMetadata,
79
74
  ICreateContainerMetadata,
80
75
  GCFeatureMatrix,
@@ -498,9 +493,6 @@ export class GarbageCollector implements IGarbageCollector {
498
493
  };
499
494
  }
500
495
 
501
- /** Handler to respond to when a SweepReady object is used */
502
- private readonly sweepReadyUsageHandler: SweepReadyUsageDetectionHandler;
503
-
504
496
  protected constructor(createParams: IGarbageCollectorCreateParams) {
505
497
  this.runtime = createParams.runtime;
506
498
  this.isSummarizerClient = createParams.isSummarizerClient;
@@ -522,11 +514,6 @@ export class GarbageCollector implements IGarbageCollector {
522
514
  this.currentGCVersion =
523
515
  this.mc.config.getBoolean(gcVersionUpgradeToV2Key) === true ? currentGCVersion : stableGCVersion;
524
516
 
525
- this.sweepReadyUsageHandler = new SweepReadyUsageDetectionHandler(
526
- createParams.getContainerDiagnosticId(),
527
- this.mc,
528
- this.runtime.closeFn,
529
- );
530
517
 
531
518
  let prevSummaryGCVersion: number | undefined;
532
519
 
@@ -681,50 +668,9 @@ export class GarbageCollector implements IGarbageCollector {
681
668
  );
682
669
  }
683
670
 
684
- // back-compat - Older documents will have the GC blobs in each data store's summary tree. Get them and
685
- // consolidate into IGarbageCollectionState format.
686
- // Add a node for the root node that is not present in older snapshot format.
687
- const gcState: IGarbageCollectionState = { gcNodes: { "/": { outboundRoutes: [] } } };
688
- const dataStoreSnapshotTree = getSummaryForDatastores(baseSnapshot, metadata);
689
- assert(dataStoreSnapshotTree !== undefined,
690
- 0x2a8 /* "Expected data store snapshot tree in base snapshot" */);
691
- for (const [dsId, dsSnapshotTree] of Object.entries(dataStoreSnapshotTree.trees)) {
692
- const blobId = dsSnapshotTree.blobs[gcTreeKey];
693
- if (blobId === undefined) {
694
- continue;
695
- }
696
-
697
- const gcSummaryDetails = await readAndParseBlob<IGarbageCollectionSummaryDetailsLegacy>(blobId);
698
- // If there are no nodes for this data store, skip it.
699
- if (gcSummaryDetails.gcData?.gcNodes === undefined) {
700
- continue;
701
- }
702
-
703
- const dsRootId = `/${dsId}`;
704
- // Since we used to write GC data at data store level, we won't have an entry for the root ("/").
705
- // Construct that entry by adding root data store ids to its outbound routes.
706
- const initialSnapshotDetails = await readAndParseBlob<ReadFluidDataStoreAttributes>(
707
- dsSnapshotTree.blobs[dataStoreAttributesBlobName],
708
- );
709
- if (initialSnapshotDetails.isRootDataStore) {
710
- gcState.gcNodes["/"].outboundRoutes.push(dsRootId);
711
- }
712
-
713
- for (const [id, outboundRoutes] of Object.entries(gcSummaryDetails.gcData.gcNodes)) {
714
- // Prefix the data store id to the GC node ids to make them relative to the root from being
715
- // relative to the data store. Similar to how its done in DataStore::getGCData.
716
- const rootId = id === "/" ? dsRootId : `${dsRootId}${id}`;
717
- gcState.gcNodes[rootId] = { outboundRoutes: Array.from(outboundRoutes) };
718
- }
719
- assert(gcState.gcNodes[dsRootId] !== undefined,
720
- 0x2a9 /* GC nodes for data store not in GC blob */);
721
- gcState.gcNodes[dsRootId].unreferencedTimestampMs = gcSummaryDetails.unrefTimestamp;
722
- }
723
- // If there is only one node (root node just added above), either GC is disabled or we are loading from
724
- // the first summary generated by detached container. In both cases, GC was not run - return undefined.
725
- return Object.keys(gcState.gcNodes).length === 1
726
- ? undefined
727
- : { gcState, tombstones: undefined, deletedNodes: undefined };
671
+ // back-compat - Older documents get their gc data reset for simplicity as there are few of them
672
+ // incremental gc summary will not work with older gc data as well
673
+ return undefined;
728
674
  } catch (error) {
729
675
  const dpe = DataProcessingError.wrapIfUnrecognized(
730
676
  error,
@@ -987,7 +933,7 @@ export class GarbageCollector implements IGarbageCollector {
987
933
  }
988
934
 
989
935
  // Add the options that are used to run GC to the telemetry context.
990
- telemetryContext?.setAll("fluid_GC", "Options", { fullGC, runSweep: options.runSweep });
936
+ telemetryContext?.setMultiple("fluid_GC", "Options", { fullGC, runSweep: options.runSweep });
991
937
 
992
938
  return PerformanceEvent.timedExecAsync(logger, { eventName: "GarbageCollection" }, async (event) => {
993
939
  await this.runPreGCSteps();
@@ -1723,13 +1669,6 @@ export class GarbageCollector implements IGarbageCollector {
1723
1669
  this.mc.logger.sendErrorEvent(event);
1724
1670
  }
1725
1671
  }
1726
-
1727
- // If SweepReady Usage Detection is enabled, the handler may close the interactive container.
1728
- // Once Sweep is fully implemented, this will be removed since the objects will be gone
1729
- // and errors will arise elsewhere in the runtime
1730
- if (state === UnreferencedState.SweepReady) {
1731
- this.sweepReadyUsageHandler.usageDetectedInInteractiveClient({ ...propsToLog, usageType });
1732
- }
1733
1672
  }
1734
1673
  }
1735
1674
 
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-internal.3.0.4";
9
+ export const pkgVersion = "2.0.0-internal.3.0.6";