@fluidframework/container-runtime 2.0.0-internal.6.3.1 → 2.0.0-internal.6.3.3

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.
Files changed (45) hide show
  1. package/dist/containerRuntime.d.ts +2 -6
  2. package/dist/containerRuntime.d.ts.map +1 -1
  3. package/dist/containerRuntime.js.map +1 -1
  4. package/dist/gc/garbageCollection.d.ts.map +1 -1
  5. package/dist/gc/garbageCollection.js +7 -9
  6. package/dist/gc/garbageCollection.js.map +1 -1
  7. package/dist/gc/gcConfigs.js +1 -1
  8. package/dist/gc/gcConfigs.js.map +1 -1
  9. package/dist/gc/gcDefinitions.d.ts +4 -4
  10. package/dist/gc/gcDefinitions.d.ts.map +1 -1
  11. package/dist/gc/gcDefinitions.js +6 -6
  12. package/dist/gc/gcDefinitions.js.map +1 -1
  13. package/dist/gc/index.d.ts +1 -1
  14. package/dist/gc/index.d.ts.map +1 -1
  15. package/dist/gc/index.js +3 -3
  16. package/dist/gc/index.js.map +1 -1
  17. package/dist/packageVersion.d.ts +1 -1
  18. package/dist/packageVersion.js +1 -1
  19. package/dist/packageVersion.js.map +1 -1
  20. package/lib/containerRuntime.d.ts +2 -6
  21. package/lib/containerRuntime.d.ts.map +1 -1
  22. package/lib/containerRuntime.js.map +1 -1
  23. package/lib/gc/garbageCollection.d.ts.map +1 -1
  24. package/lib/gc/garbageCollection.js +7 -9
  25. package/lib/gc/garbageCollection.js.map +1 -1
  26. package/lib/gc/gcConfigs.js +2 -2
  27. package/lib/gc/gcConfigs.js.map +1 -1
  28. package/lib/gc/gcDefinitions.d.ts +4 -4
  29. package/lib/gc/gcDefinitions.d.ts.map +1 -1
  30. package/lib/gc/gcDefinitions.js +5 -5
  31. package/lib/gc/gcDefinitions.js.map +1 -1
  32. package/lib/gc/index.d.ts +1 -1
  33. package/lib/gc/index.d.ts.map +1 -1
  34. package/lib/gc/index.js +1 -1
  35. package/lib/gc/index.js.map +1 -1
  36. package/lib/packageVersion.d.ts +1 -1
  37. package/lib/packageVersion.js +1 -1
  38. package/lib/packageVersion.js.map +1 -1
  39. package/package.json +17 -21
  40. package/src/containerRuntime.ts +10 -24
  41. package/src/gc/garbageCollection.ts +7 -9
  42. package/src/gc/gcConfigs.ts +3 -3
  43. package/src/gc/gcDefinitions.ts +5 -5
  44. package/src/gc/index.ts +2 -2
  45. package/src/packageVersion.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"gcDefinitions.js","sourceRoot":"","sources":["../../src/gc/gcDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAc,CAAC,CAAC;AAC5C,iDAAiD;AACjD,MAAM,CAAC,MAAM,gBAAgB,GAAc,CAAC,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,uBAAuB,CAAC;AACvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAE/D,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AACxD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAC9D,kDAAkD;AAClD,MAAM,CAAC,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAClE,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAC5E,qHAAqH;AACrH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,wFAAwF;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AACtF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,wBAAwB,GAAG,+CAA+C,CAAC;AACxF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AACtF,kDAAkD;AAClD,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,8CAA8C,CAAC;AACjF,wDAAwD;AACxD,MAAM,CAAC,MAAM,uBAAuB,GAAG,mDAAmD,CAAC;AAE3F,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,QAAQ,CAAC;AAErD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,SAAS;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,QAAQ,CAAC,CAAC,UAAU;AA4EvE,uDAAuD;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,kCAAkC;IAClC,SAAS,EAAE,WAAW;IACtB,8DAA8D;IAC9D,YAAY,EAAE,cAAc;IAC5B,6EAA6E;IAC7E,IAAI,EAAE,MAAM;IACZ,+DAA+D;IAC/D,KAAK,EAAE,OAAO;CACd,CAAC;AAuMF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,gEAAgE;IAChE,MAAM,EAAE,QAAQ;IAChB,mEAAmE;IACnE,QAAQ,EAAE,UAAU;IACpB,0DAA0D;IAC1D,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { IRequestHeader } from \"@fluidframework/core-interfaces\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n\tISummarizeResult,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { ReadAndParseBlob } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport {\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tIRefreshSummaryResult,\n} from \"../summary\";\n\nexport type GCVersion = number;\n\n/** The stable version of garbage collection in production. */\nexport const stableGCVersion: GCVersion = 2;\n/** The current version of garbage collection. */\nexport const currentGCVersion: GCVersion = 3;\n\n/**\n * This undocumented GC Option (on ContainerRuntime Options) allows an app to disable enforcing GC on old documents by incrementing this value\n *\n * If unset, GC Tombstone phase will operate as otherwise configured\n * Otherwise, only enforce GC Tombstone if the passed in value matches the persisted value\n */\nexport const gcTombstoneGenerationOptionName = \"gcTombstoneGeneration\";\n/**\n * This GC Option (on ContainerRuntime Options) allows an app to disable GC Sweep on old documents by incrementing this value.\n *\n * If unset altogether, Sweep will be disabled.\n * If 0 is passed in, Sweep will be enabled for any document with gcSweepGeneration OR gcTombstoneGeneration as 0.\n * If any other number is passed in, Sweep will be enabled only for documents with the same value persisted.\n */\nexport const gcSweepGenerationOptionName = \"gcSweepGeneration\";\n\n// Feature gate key to turn GC on / off.\nexport const runGCKey = \"Fluid.GarbageCollection.RunGC\";\n// Feature gate key to turn GC sweep on / off.\nexport const runSweepKey = \"Fluid.GarbageCollection.RunSweep\";\n// Feature gate key to turn GC test mode on / off.\nexport const gcTestModeKey = \"Fluid.GarbageCollection.GCTestMode\";\n// Feature gate key to expire a session after a set period of time.\nexport const runSessionExpiryKey = \"Fluid.GarbageCollection.RunSessionExpiry\";\n// Feature gate key to turn GC sweep log off.\nexport const disableSweepLogKey = \"Fluid.GarbageCollection.DisableSweepLog\";\n// Feature gate key to disable the tombstone feature, i.e., tombstone information is not read / written into summary.\nexport const disableTombstoneKey = \"Fluid.GarbageCollection.DisableTombstone\";\n// Feature gate to enable throwing an error when tombstone object is loaded (requested).\nexport const throwOnTombstoneLoadKey = \"Fluid.GarbageCollection.ThrowOnTombstoneLoad\";\n// Feature gate to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops).\nexport const throwOnTombstoneUsageKey = \"Fluid.GarbageCollection.ThrowOnTombstoneUsage\";\n// Feature gate to enable GC version upgrade.\nexport const gcVersionUpgradeToV3Key = \"Fluid.GarbageCollection.GCVersionUpgradeToV3\";\n// Feature gate to enable GC sweep for datastores.\n// TODO: Remove Test from the flag when we are confident to turn on sweep\nexport const sweepDatastoresKey = \"Fluid.GarbageCollection.Test.SweepDataStores\";\n// Feature gate to enable GC sweep for attachment blobs.\nexport const sweepAttachmentBlobsKey = \"Fluid.GarbageCollection.Test.SweepAttachmentBlobs\";\n\n// One day in milliseconds.\nexport const oneDayMs = 1 * 24 * 60 * 60 * 1000;\n\n/**\n * The maximum snapshot cache expiry in the driver. This is used to calculate the sweep timeout.\n * Sweep timeout = session expiry timeout + snapshot cache expiry timeout + a buffer.\n * The snapshot cache expiry timeout cannot be known precisely but the upper bound is 5 days, i.e., any snapshot\n * in cache will be invalidated before 5 days.\n */\nexport const maxSnapshotCacheExpiryMs = 5 * oneDayMs;\n\nexport const defaultInactiveTimeoutMs = 7 * oneDayMs; // 7 days\nexport const defaultSessionExpiryDurationMs = 30 * oneDayMs; // 30 days\n\n/** @see IGCMetadata.gcFeatureMatrix */\nexport interface GCFeatureMatrix {\n\t/**\n\t * The Tombstone Generation value in effect when this file was created.\n\t * Gives a way for an app to disqualify old files from GC Tombstone enforcement.\n\t * Provided via Container Runtime Options.\n\t */\n\ttombstoneGeneration?: number;\n\t/**\n\t * The Sweep Generation value in effect when this file was created.\n\t * Gives a way for an app to disqualify old files from GC Sweep.\n\t * Provided via Container Runtime Options.\n\t */\n\tsweepGeneration?: number;\n}\n\nexport interface IGCMetadata {\n\t/**\n\t * The version of the GC code that was run to generate the GC data that is written in the summary.\n\t * If the persisted value doesn't match the current value in the code, saved GC data will be discarded and regenerated from scratch.\n\t * Also, used to determine whether GC is enabled for this container or not:\n\t * - A value of 0 or undefined means GC is disabled.\n\t * - A value greater than 0 means GC is enabled.\n\t */\n\treadonly gcFeature?: GCVersion;\n\n\t/**\n\t * A collection of different numerical \"Generations\" for different features,\n\t * used to determine feature availability over time.\n\t * This info may come from multiple sources (FF code, config service, app via Container Runtime Options),\n\t * and pertains to aspects of the document that may be fixed for its lifetime.\n\t *\n\t * For each dimension, if the persisted value doesn't match the currently provided value,\n\t * then this file does not support the corresponding feature as currently implemented.\n\t *\n\t * Guidance is that if no value is provided at runtime, it should result in the current default behavior.\n\t */\n\treadonly gcFeatureMatrix?: GCFeatureMatrix;\n\t/**\n\t * @deprecated - @see GCFeatureMatrix.sweepGeneration\n\t *\n\t * Tells whether the GC sweep phase is enabled for this container.\n\t * - True means sweep phase is enabled.\n\t * - False means sweep phase is disabled. If GC is disabled as per gcFeature, sweep is also disabled.\n\t */\n\treadonly sweepEnabled?: boolean;\n\t/** If this is present, the session for this container will expire after this time and the container will close */\n\treadonly sessionExpiryTimeoutMs?: number;\n\t/** How long to wait after an object is unreferenced before deleting it via GC Sweep */\n\treadonly sweepTimeoutMs?: number;\n}\n\n/** The statistics of the system state after a garbage collection run. */\nexport interface IGCStats {\n\t/** The number of nodes in the container. */\n\tnodeCount: number;\n\t/** The number of data stores in the container. */\n\tdataStoreCount: number;\n\t/** The number of attachment blobs in the container. */\n\tattachmentBlobCount: number;\n\t/** The number of unreferenced nodes in the container. */\n\tunrefNodeCount: number;\n\t/** The number of unreferenced data stores in the container. */\n\tunrefDataStoreCount: number;\n\t/** The number of unreferenced attachment blobs in the container. */\n\tunrefAttachmentBlobCount: number;\n\t/** The number of nodes whose reference state updated since last GC run. */\n\tupdatedNodeCount: number;\n\t/** The number of data stores whose reference state updated since last GC run. */\n\tupdatedDataStoreCount: number;\n\t/** The number of attachment blobs whose reference state updated since last GC run. */\n\tupdatedAttachmentBlobCount: number;\n}\n\n/** The types of GC nodes in the GC reference graph. */\nexport const GCNodeType = {\n\t// Nodes that are for data stores.\n\tDataStore: \"DataStore\",\n\t// Nodes that are within a data store. For example, DDS nodes.\n\tSubDataStore: \"SubDataStore\",\n\t// Nodes that are for attachment blobs, i.e., blobs uploaded via BlobManager.\n\tBlob: \"Blob\",\n\t// Nodes that are neither of the above. For example, root node.\n\tOther: \"Other\",\n};\nexport type GCNodeType = typeof GCNodeType[keyof typeof GCNodeType];\n\n/**\n * Defines the APIs for the runtime object to be passed to the garbage collector.\n */\nexport interface IGarbageCollectionRuntime {\n\t/** Before GC runs, called to notify the runtime to update any pending GC state. */\n\tupdateStateBeforeGC(): Promise<void>;\n\t/** Returns the garbage collection data of the runtime. */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\t/** After GC has run, called to notify the runtime of routes that are used in it. */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\t/** After GC has run, called to notify the runtime of routes that are unused in it. */\n\tupdateUnusedRoutes(unusedRoutes: string[]): void;\n\t/**\n\t * After GC has run and identified nodes that are sweep ready, called to delete the sweep ready nodes. The runtime\n\t * should return the routes of nodes that were deleted.\n\t * @param sweepReadyRoutes - The routes of nodes that are sweep ready and should be deleted.\n\t */\n\tdeleteSweepReadyNodes(sweepReadyRoutes: string[]): string[];\n\t/** Called to notify the runtime of routes that are tombstones. */\n\tupdateTombstonedRoutes(tombstoneRoutes: string[]): void;\n\t/** Returns a referenced timestamp to be used to track unreferenced nodes. */\n\tgetCurrentReferenceTimestampMs(): number | undefined;\n\t/** Returns the type of the GC node. */\n\tgetNodeType(nodePath: string): GCNodeType;\n\t/** Called when the runtime should close because of an error. */\n\tcloseFn: (error?: ICriticalContainerError) => void;\n\t/** If false, loading or using a Tombstoned object should merely log, not fail */\n\tgcTombstoneEnforcementAllowed: boolean;\n}\n\n/** Defines the contract for the garbage collector. */\nexport interface IGarbageCollector {\n\t/** Tells whether GC should run or not. */\n\treadonly shouldRunGC: boolean;\n\t/** Tells whether the GC state in summary needs to be reset in the next summary. */\n\treadonly summaryStateNeedsReset: boolean;\n\t/** The count of data stores whose GC state updated since the last summary. */\n\treadonly updatedDSCountSinceLastSummary: number;\n\t/** Initialize the state from the base snapshot after its creation. */\n\tinitializeBaseState(): Promise<void>;\n\t/** Run garbage collection and update the reference / used state of the system. */\n\tcollectGarbage(\n\t\toptions: {\n\t\t\tlogger?: ITelemetryLoggerExt;\n\t\t\trunSweep?: boolean;\n\t\t\tfullGC?: boolean;\n\t\t},\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<IGCStats | undefined>;\n\t/** Summarizes the GC data and returns it as a summary tree. */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummarizeResult | undefined;\n\t/** Returns the garbage collector specific metadata to be written into the summary. */\n\tgetMetadata(): IGCMetadata;\n\t/** Returns the GC details generated from the base snapshot. */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\t/** Called when the latest summary of the system has been refreshed. */\n\trefreshLatestSummary(result: IRefreshSummaryResult): Promise<void>;\n\t/** Called when a node is updated. Used to detect and log when an inactive node is changed or loaded. */\n\tnodeUpdated(\n\t\tnodePath: string,\n\t\treason: \"Loaded\" | \"Changed\",\n\t\ttimestampMs?: number,\n\t\tpackagePath?: readonly string[],\n\t\trequestHeaders?: IRequestHeader,\n\t): void;\n\t/** Called when a reference is added to a node. Used to identify nodes that were referenced between summaries. */\n\taddedOutboundReference(fromNodePath: string, toNodePath: string): void;\n\t/** Returns true if this node has been deleted by GC during sweep phase. */\n\tisNodeDeleted(nodePath: string): boolean;\n\tsetConnectionState(connected: boolean, clientId?: string): void;\n\tdispose(): void;\n}\n\n/** Parameters necessary for creating a GarbageCollector. */\nexport interface IGarbageCollectorCreateParams {\n\treadonly runtime: IGarbageCollectionRuntime;\n\treadonly gcOptions: IGCRuntimeOptions;\n\treadonly baseLogger: ITelemetryLoggerExt;\n\treadonly existing: boolean;\n\treadonly metadata: IContainerRuntimeMetadata | undefined;\n\treadonly createContainerMetadata: ICreateContainerMetadata;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly isSummarizerClient: boolean;\n\treadonly getNodePackagePath: (nodePath: string) => Promise<readonly string[] | undefined>;\n\treadonly getLastSummaryTimestampMs: () => number | undefined;\n\treadonly readAndParseBlob: ReadAndParseBlob;\n\treadonly activeConnection: () => boolean;\n}\n\nexport interface IGCRuntimeOptions {\n\t/**\n\t * Flag that if true, will enable running garbage collection (GC) for a new container.\n\t *\n\t * GC has mark phase and sweep phase. In mark phase, unreferenced objects are identified\n\t * and marked as such in the summary. This option enables the mark phase.\n\t * In sweep phase, unreferenced objects are eventually deleted from the container if they meet certain conditions.\n\t * Sweep phase can be enabled via the \"sweepAllowed\" option.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tgcAllowed?: boolean;\n\n\t/**\n\t * @deprecated - @see gcSweepGenerationOptionName and @see GCFeatureMatrix.sweepGeneration\n\t *\n\t * Flag that if true, enables GC's sweep phase for a new container.\n\t *\n\t * This will allow GC to eventually delete unreferenced objects from the container.\n\t * This flag should only be set to true if \"gcAllowed\" is true.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tsweepAllowed?: boolean;\n\n\t/**\n\t * Flag that if true, will disable garbage collection for the session.\n\t * Can be used to disable running GC on containers where it is allowed via the gcAllowed option.\n\t */\n\tdisableGC?: boolean;\n\n\t/**\n\t * Flag that will bypass optimizations and generate GC data for all nodes irrespective of whether a node\n\t * changed or not.\n\t */\n\trunFullGC?: boolean;\n\n\t/**\n\t * Maximum session duration for a new container. If not present, a default value will be used.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tsessionExpiryTimeoutMs?: number;\n\n\t/**\n\t * Allows additional GC options to be passed.\n\t */\n\t[key: string]: any;\n}\n\n/**\n * The configurations for Garbage Collector that determines what runs and how.\n */\nexport interface IGarbageCollectorConfigs {\n\t/**\n\t * Tracks if GC is enabled for this document. This is specified during document creation and doesn't change\n\t * throughout its lifetime.\n\t */\n\treadonly gcEnabled: boolean;\n\t/**\n\t * Tracks if sweep phase is enabled for this document. This is specified during document creation and doesn't change\n\t * throughout its lifetime.\n\t */\n\treadonly sweepEnabled: boolean;\n\t/**\n\t * Tracks if GC should run or not. Even if GC is enabled for a document (see gcEnabled), it can be explicitly\n\t * disabled via runtime options or feature flags.\n\t */\n\treadonly shouldRunGC: boolean;\n\t/**\n\t * Tracks if sweep phase should run or not. Even if the sweep phase is enabled for a document (see sweepEnabled), it\n\t * can be explicitly disabled via feature flags. It also won't run if session expiry is not enabled.\n\t */\n\treadonly shouldRunSweep: boolean;\n\t/**\n\t * If true, bypass optimizations and generate GC data for all nodes irrespective of whether a node changed or not.\n\t */\n\treadonly runFullGC: boolean | undefined;\n\t/** The time in ms to expire a session for a client for gc. */\n\treadonly sessionExpiryTimeoutMs: number | undefined;\n\t/** The time after which an unreferenced node is ready to be swept. */\n\treadonly sweepTimeoutMs: number | undefined;\n\t/** The time after which an unreferenced node is inactive. */\n\treadonly inactiveTimeoutMs: number;\n\t/** It is easier for users to diagnose InactiveObject usage if we throw on load, which this option enables */\n\treadonly throwOnInactiveLoad: boolean | undefined;\n\t/** Tracks whether GC should run in test mode. In this mode, unreferenced objects are deleted immediately. */\n\treadonly testMode: boolean;\n\t/**\n\t * Tracks whether GC should run in tombstone mode. In this mode, sweep ready objects are marked as tombstones.\n\t * In interactive (non-summarizer) clients, tombstone objects behave as if they are deleted, i.e., access to them\n\t * is not allowed. However, these objects can be accessed after referencing them first. It is used as a staging\n\t * step for sweep where accidental sweep ready objects can be recovered.\n\t */\n\treadonly tombstoneMode: boolean;\n\t/** @see GCFeatureMatrix. */\n\treadonly persistedGcFeatureMatrix: GCFeatureMatrix | undefined;\n\t/** The version of GC in the base snapshot. */\n\treadonly gcVersionInBaseSnapshot: GCVersion | undefined;\n\t/** The current version of GC data in the running code */\n\treadonly gcVersionInEffect: GCVersion;\n}\n\n/** The state of node that is unreferenced. */\nexport const UnreferencedState = {\n\t/** The node is active, i.e., it can become referenced again. */\n\tActive: \"Active\",\n\t/** The node is inactive, i.e., it should not become referenced. */\n\tInactive: \"Inactive\",\n\t/** The node is ready to be deleted by the sweep phase. */\n\tSweepReady: \"SweepReady\",\n} as const;\nexport type UnreferencedState = typeof UnreferencedState[keyof typeof UnreferencedState];\n\n/**\n * Represents the result of a GC run.\n */\nexport interface IGCResult {\n\t/** The ids of nodes that are referenced in the referenced graph */\n\treferencedNodeIds: string[];\n\t/** The ids of nodes that are not-referenced or deleted in the referenced graph */\n\tdeletedNodeIds: string[];\n}\n"]}
1
+ {"version":3,"file":"gcDefinitions.js","sourceRoot":"","sources":["../../src/gc/gcDefinitions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqBH,4CAA4C;AAC5C,MAAM,CAAC,MAAM,eAAe,GAAc,CAAC,CAAC;AAC5C,0GAA0G;AAC1G,MAAM,CAAC,MAAM,aAAa,GAAc,CAAC,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,+BAA+B,GAAG,uBAAuB,CAAC;AACvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,mBAAmB,CAAC;AAE/D,wCAAwC;AACxC,MAAM,CAAC,MAAM,QAAQ,GAAG,+BAA+B,CAAC;AACxD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,WAAW,GAAG,kCAAkC,CAAC;AAC9D,kDAAkD;AAClD,MAAM,CAAC,MAAM,aAAa,GAAG,oCAAoC,CAAC;AAClE,mEAAmE;AACnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,6CAA6C;AAC7C,MAAM,CAAC,MAAM,kBAAkB,GAAG,yCAAyC,CAAC;AAC5E,qHAAqH;AACrH,MAAM,CAAC,MAAM,mBAAmB,GAAG,0CAA0C,CAAC;AAC9E,wFAAwF;AACxF,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AACtF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,wBAAwB,GAAG,+CAA+C,CAAC;AACxF,6CAA6C;AAC7C,MAAM,CAAC,MAAM,uBAAuB,GAAG,8CAA8C,CAAC;AACtF,kDAAkD;AAClD,yEAAyE;AACzE,MAAM,CAAC,MAAM,kBAAkB,GAAG,8CAA8C,CAAC;AACjF,wDAAwD;AACxD,MAAM,CAAC,MAAM,uBAAuB,GAAG,mDAAmD,CAAC;AAE3F,2BAA2B;AAC3B,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,QAAQ,CAAC;AAErD,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,GAAG,QAAQ,CAAC,CAAC,SAAS;AAC/D,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,GAAG,QAAQ,CAAC,CAAC,UAAU;AA4EvE,uDAAuD;AACvD,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,kCAAkC;IAClC,SAAS,EAAE,WAAW;IACtB,8DAA8D;IAC9D,YAAY,EAAE,cAAc;IAC5B,6EAA6E;IAC7E,IAAI,EAAE,MAAM;IACZ,+DAA+D;IAC/D,KAAK,EAAE,OAAO;CACd,CAAC;AAuMF,8CAA8C;AAC9C,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAChC,gEAAgE;IAChE,MAAM,EAAE,QAAQ;IAChB,mEAAmE;IACnE,QAAQ,EAAE,UAAU;IACpB,0DAA0D;IAC1D,UAAU,EAAE,YAAY;CACf,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { ICriticalContainerError } from \"@fluidframework/container-definitions\";\nimport { IRequestHeader } from \"@fluidframework/core-interfaces\";\nimport { ISnapshotTree } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIGarbageCollectionData,\n\tIGarbageCollectionDetailsBase,\n\tISummarizeResult,\n\tITelemetryContext,\n} from \"@fluidframework/runtime-definitions\";\nimport { ReadAndParseBlob } from \"@fluidframework/runtime-utils\";\nimport { ITelemetryLoggerExt } from \"@fluidframework/telemetry-utils\";\nimport {\n\tIContainerRuntimeMetadata,\n\tICreateContainerMetadata,\n\tIRefreshSummaryResult,\n} from \"../summary\";\n\nexport type GCVersion = number;\n\n/** The stable/default version of GC Data */\nexport const stableGCVersion: GCVersion = 3;\n/** The next version of GC Data, to bump to in case we need to regenerate all GC Data across all files. */\nexport const nextGCVersion: GCVersion = 4;\n\n/**\n * This undocumented GC Option (on ContainerRuntime Options) allows an app to disable enforcing GC on old documents by incrementing this value\n *\n * If unset, GC Tombstone phase will operate as otherwise configured\n * Otherwise, only enforce GC Tombstone if the passed in value matches the persisted value\n */\nexport const gcTombstoneGenerationOptionName = \"gcTombstoneGeneration\";\n/**\n * This GC Option (on ContainerRuntime Options) allows an app to disable GC Sweep on old documents by incrementing this value.\n *\n * If unset altogether, Sweep will be disabled.\n * If 0 is passed in, Sweep will be enabled for any document with gcSweepGeneration OR gcTombstoneGeneration as 0.\n * If any other number is passed in, Sweep will be enabled only for documents with the same value persisted.\n */\nexport const gcSweepGenerationOptionName = \"gcSweepGeneration\";\n\n// Feature gate key to turn GC on / off.\nexport const runGCKey = \"Fluid.GarbageCollection.RunGC\";\n// Feature gate key to turn GC sweep on / off.\nexport const runSweepKey = \"Fluid.GarbageCollection.RunSweep\";\n// Feature gate key to turn GC test mode on / off.\nexport const gcTestModeKey = \"Fluid.GarbageCollection.GCTestMode\";\n// Feature gate key to expire a session after a set period of time.\nexport const runSessionExpiryKey = \"Fluid.GarbageCollection.RunSessionExpiry\";\n// Feature gate key to turn GC sweep log off.\nexport const disableSweepLogKey = \"Fluid.GarbageCollection.DisableSweepLog\";\n// Feature gate key to disable the tombstone feature, i.e., tombstone information is not read / written into summary.\nexport const disableTombstoneKey = \"Fluid.GarbageCollection.DisableTombstone\";\n// Feature gate to enable throwing an error when tombstone object is loaded (requested).\nexport const throwOnTombstoneLoadKey = \"Fluid.GarbageCollection.ThrowOnTombstoneLoad\";\n// Feature gate to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops).\nexport const throwOnTombstoneUsageKey = \"Fluid.GarbageCollection.ThrowOnTombstoneUsage\";\n// Feature gate to enable GC version upgrade.\nexport const gcVersionUpgradeToV4Key = \"Fluid.GarbageCollection.GCVersionUpgradeToV4\";\n// Feature gate to enable GC sweep for datastores.\n// TODO: Remove Test from the flag when we are confident to turn on sweep\nexport const sweepDatastoresKey = \"Fluid.GarbageCollection.Test.SweepDataStores\";\n// Feature gate to enable GC sweep for attachment blobs.\nexport const sweepAttachmentBlobsKey = \"Fluid.GarbageCollection.Test.SweepAttachmentBlobs\";\n\n// One day in milliseconds.\nexport const oneDayMs = 1 * 24 * 60 * 60 * 1000;\n\n/**\n * The maximum snapshot cache expiry in the driver. This is used to calculate the sweep timeout.\n * Sweep timeout = session expiry timeout + snapshot cache expiry timeout + a buffer.\n * The snapshot cache expiry timeout cannot be known precisely but the upper bound is 5 days, i.e., any snapshot\n * in cache will be invalidated before 5 days.\n */\nexport const maxSnapshotCacheExpiryMs = 5 * oneDayMs;\n\nexport const defaultInactiveTimeoutMs = 7 * oneDayMs; // 7 days\nexport const defaultSessionExpiryDurationMs = 30 * oneDayMs; // 30 days\n\n/** @see IGCMetadata.gcFeatureMatrix */\nexport interface GCFeatureMatrix {\n\t/**\n\t * The Tombstone Generation value in effect when this file was created.\n\t * Gives a way for an app to disqualify old files from GC Tombstone enforcement.\n\t * Provided via Container Runtime Options.\n\t */\n\ttombstoneGeneration?: number;\n\t/**\n\t * The Sweep Generation value in effect when this file was created.\n\t * Gives a way for an app to disqualify old files from GC Sweep.\n\t * Provided via Container Runtime Options.\n\t */\n\tsweepGeneration?: number;\n}\n\nexport interface IGCMetadata {\n\t/**\n\t * The version of the GC code that was run to generate the GC data that is written in the summary.\n\t * If the persisted value doesn't match the current value in the code, saved GC data will be discarded and regenerated from scratch.\n\t * Also, used to determine whether GC is enabled for this container or not:\n\t * - A value of 0 or undefined means GC is disabled.\n\t * - A value greater than 0 means GC is enabled.\n\t */\n\treadonly gcFeature?: GCVersion;\n\n\t/**\n\t * A collection of different numerical \"Generations\" for different features,\n\t * used to determine feature availability over time.\n\t * This info may come from multiple sources (FF code, config service, app via Container Runtime Options),\n\t * and pertains to aspects of the document that may be fixed for its lifetime.\n\t *\n\t * For each dimension, if the persisted value doesn't match the currently provided value,\n\t * then this file does not support the corresponding feature as currently implemented.\n\t *\n\t * Guidance is that if no value is provided at runtime, it should result in the current default behavior.\n\t */\n\treadonly gcFeatureMatrix?: GCFeatureMatrix;\n\t/**\n\t * @deprecated - @see GCFeatureMatrix.sweepGeneration\n\t *\n\t * Tells whether the GC sweep phase is enabled for this container.\n\t * - True means sweep phase is enabled.\n\t * - False means sweep phase is disabled. If GC is disabled as per gcFeature, sweep is also disabled.\n\t */\n\treadonly sweepEnabled?: boolean;\n\t/** If this is present, the session for this container will expire after this time and the container will close */\n\treadonly sessionExpiryTimeoutMs?: number;\n\t/** How long to wait after an object is unreferenced before deleting it via GC Sweep */\n\treadonly sweepTimeoutMs?: number;\n}\n\n/** The statistics of the system state after a garbage collection run. */\nexport interface IGCStats {\n\t/** The number of nodes in the container. */\n\tnodeCount: number;\n\t/** The number of data stores in the container. */\n\tdataStoreCount: number;\n\t/** The number of attachment blobs in the container. */\n\tattachmentBlobCount: number;\n\t/** The number of unreferenced nodes in the container. */\n\tunrefNodeCount: number;\n\t/** The number of unreferenced data stores in the container. */\n\tunrefDataStoreCount: number;\n\t/** The number of unreferenced attachment blobs in the container. */\n\tunrefAttachmentBlobCount: number;\n\t/** The number of nodes whose reference state updated since last GC run. */\n\tupdatedNodeCount: number;\n\t/** The number of data stores whose reference state updated since last GC run. */\n\tupdatedDataStoreCount: number;\n\t/** The number of attachment blobs whose reference state updated since last GC run. */\n\tupdatedAttachmentBlobCount: number;\n}\n\n/** The types of GC nodes in the GC reference graph. */\nexport const GCNodeType = {\n\t// Nodes that are for data stores.\n\tDataStore: \"DataStore\",\n\t// Nodes that are within a data store. For example, DDS nodes.\n\tSubDataStore: \"SubDataStore\",\n\t// Nodes that are for attachment blobs, i.e., blobs uploaded via BlobManager.\n\tBlob: \"Blob\",\n\t// Nodes that are neither of the above. For example, root node.\n\tOther: \"Other\",\n};\nexport type GCNodeType = typeof GCNodeType[keyof typeof GCNodeType];\n\n/**\n * Defines the APIs for the runtime object to be passed to the garbage collector.\n */\nexport interface IGarbageCollectionRuntime {\n\t/** Before GC runs, called to notify the runtime to update any pending GC state. */\n\tupdateStateBeforeGC(): Promise<void>;\n\t/** Returns the garbage collection data of the runtime. */\n\tgetGCData(fullGC?: boolean): Promise<IGarbageCollectionData>;\n\t/** After GC has run, called to notify the runtime of routes that are used in it. */\n\tupdateUsedRoutes(usedRoutes: string[]): void;\n\t/** After GC has run, called to notify the runtime of routes that are unused in it. */\n\tupdateUnusedRoutes(unusedRoutes: string[]): void;\n\t/**\n\t * After GC has run and identified nodes that are sweep ready, called to delete the sweep ready nodes. The runtime\n\t * should return the routes of nodes that were deleted.\n\t * @param sweepReadyRoutes - The routes of nodes that are sweep ready and should be deleted.\n\t */\n\tdeleteSweepReadyNodes(sweepReadyRoutes: string[]): string[];\n\t/** Called to notify the runtime of routes that are tombstones. */\n\tupdateTombstonedRoutes(tombstoneRoutes: string[]): void;\n\t/** Returns a referenced timestamp to be used to track unreferenced nodes. */\n\tgetCurrentReferenceTimestampMs(): number | undefined;\n\t/** Returns the type of the GC node. */\n\tgetNodeType(nodePath: string): GCNodeType;\n\t/** Called when the runtime should close because of an error. */\n\tcloseFn: (error?: ICriticalContainerError) => void;\n\t/** If false, loading or using a Tombstoned object should merely log, not fail */\n\tgcTombstoneEnforcementAllowed: boolean;\n}\n\n/** Defines the contract for the garbage collector. */\nexport interface IGarbageCollector {\n\t/** Tells whether GC should run or not. */\n\treadonly shouldRunGC: boolean;\n\t/** Tells whether the GC state in summary needs to be reset in the next summary. */\n\treadonly summaryStateNeedsReset: boolean;\n\t/** The count of data stores whose GC state updated since the last summary. */\n\treadonly updatedDSCountSinceLastSummary: number;\n\t/** Initialize the state from the base snapshot after its creation. */\n\tinitializeBaseState(): Promise<void>;\n\t/** Run garbage collection and update the reference / used state of the system. */\n\tcollectGarbage(\n\t\toptions: {\n\t\t\tlogger?: ITelemetryLoggerExt;\n\t\t\trunSweep?: boolean;\n\t\t\tfullGC?: boolean;\n\t\t},\n\t\ttelemetryContext?: ITelemetryContext,\n\t): Promise<IGCStats | undefined>;\n\t/** Summarizes the GC data and returns it as a summary tree. */\n\tsummarize(\n\t\tfullTree: boolean,\n\t\ttrackState: boolean,\n\t\ttelemetryContext?: ITelemetryContext,\n\t): ISummarizeResult | undefined;\n\t/** Returns the garbage collector specific metadata to be written into the summary. */\n\tgetMetadata(): IGCMetadata;\n\t/** Returns the GC details generated from the base snapshot. */\n\tgetBaseGCDetails(): Promise<IGarbageCollectionDetailsBase>;\n\t/** Called when the latest summary of the system has been refreshed. */\n\trefreshLatestSummary(result: IRefreshSummaryResult): Promise<void>;\n\t/** Called when a node is updated. Used to detect and log when an inactive node is changed or loaded. */\n\tnodeUpdated(\n\t\tnodePath: string,\n\t\treason: \"Loaded\" | \"Changed\",\n\t\ttimestampMs?: number,\n\t\tpackagePath?: readonly string[],\n\t\trequestHeaders?: IRequestHeader,\n\t): void;\n\t/** Called when a reference is added to a node. Used to identify nodes that were referenced between summaries. */\n\taddedOutboundReference(fromNodePath: string, toNodePath: string): void;\n\t/** Returns true if this node has been deleted by GC during sweep phase. */\n\tisNodeDeleted(nodePath: string): boolean;\n\tsetConnectionState(connected: boolean, clientId?: string): void;\n\tdispose(): void;\n}\n\n/** Parameters necessary for creating a GarbageCollector. */\nexport interface IGarbageCollectorCreateParams {\n\treadonly runtime: IGarbageCollectionRuntime;\n\treadonly gcOptions: IGCRuntimeOptions;\n\treadonly baseLogger: ITelemetryLoggerExt;\n\treadonly existing: boolean;\n\treadonly metadata: IContainerRuntimeMetadata | undefined;\n\treadonly createContainerMetadata: ICreateContainerMetadata;\n\treadonly baseSnapshot: ISnapshotTree | undefined;\n\treadonly isSummarizerClient: boolean;\n\treadonly getNodePackagePath: (nodePath: string) => Promise<readonly string[] | undefined>;\n\treadonly getLastSummaryTimestampMs: () => number | undefined;\n\treadonly readAndParseBlob: ReadAndParseBlob;\n\treadonly activeConnection: () => boolean;\n}\n\nexport interface IGCRuntimeOptions {\n\t/**\n\t * Flag that if true, will enable running garbage collection (GC) for a new container.\n\t *\n\t * GC has mark phase and sweep phase. In mark phase, unreferenced objects are identified\n\t * and marked as such in the summary. This option enables the mark phase.\n\t * In sweep phase, unreferenced objects are eventually deleted from the container if they meet certain conditions.\n\t * Sweep phase can be enabled via the \"sweepAllowed\" option.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tgcAllowed?: boolean;\n\n\t/**\n\t * @deprecated - @see gcSweepGenerationOptionName and @see GCFeatureMatrix.sweepGeneration\n\t *\n\t * Flag that if true, enables GC's sweep phase for a new container.\n\t *\n\t * This will allow GC to eventually delete unreferenced objects from the container.\n\t * This flag should only be set to true if \"gcAllowed\" is true.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tsweepAllowed?: boolean;\n\n\t/**\n\t * Flag that if true, will disable garbage collection for the session.\n\t * Can be used to disable running GC on containers where it is allowed via the gcAllowed option.\n\t */\n\tdisableGC?: boolean;\n\n\t/**\n\t * Flag that will bypass optimizations and generate GC data for all nodes irrespective of whether a node\n\t * changed or not.\n\t */\n\trunFullGC?: boolean;\n\n\t/**\n\t * Maximum session duration for a new container. If not present, a default value will be used.\n\t *\n\t * Note: This setting is persisted in the container's summary and cannot be changed.\n\t */\n\tsessionExpiryTimeoutMs?: number;\n\n\t/**\n\t * Allows additional GC options to be passed.\n\t */\n\t[key: string]: any;\n}\n\n/**\n * The configurations for Garbage Collector that determines what runs and how.\n */\nexport interface IGarbageCollectorConfigs {\n\t/**\n\t * Tracks if GC is enabled for this document. This is specified during document creation and doesn't change\n\t * throughout its lifetime.\n\t */\n\treadonly gcEnabled: boolean;\n\t/**\n\t * Tracks if sweep phase is enabled for this document. This is specified during document creation and doesn't change\n\t * throughout its lifetime.\n\t */\n\treadonly sweepEnabled: boolean;\n\t/**\n\t * Tracks if GC should run or not. Even if GC is enabled for a document (see gcEnabled), it can be explicitly\n\t * disabled via runtime options or feature flags.\n\t */\n\treadonly shouldRunGC: boolean;\n\t/**\n\t * Tracks if sweep phase should run or not. Even if the sweep phase is enabled for a document (see sweepEnabled), it\n\t * can be explicitly disabled via feature flags. It also won't run if session expiry is not enabled.\n\t */\n\treadonly shouldRunSweep: boolean;\n\t/**\n\t * If true, bypass optimizations and generate GC data for all nodes irrespective of whether a node changed or not.\n\t */\n\treadonly runFullGC: boolean | undefined;\n\t/** The time in ms to expire a session for a client for gc. */\n\treadonly sessionExpiryTimeoutMs: number | undefined;\n\t/** The time after which an unreferenced node is ready to be swept. */\n\treadonly sweepTimeoutMs: number | undefined;\n\t/** The time after which an unreferenced node is inactive. */\n\treadonly inactiveTimeoutMs: number;\n\t/** It is easier for users to diagnose InactiveObject usage if we throw on load, which this option enables */\n\treadonly throwOnInactiveLoad: boolean | undefined;\n\t/** Tracks whether GC should run in test mode. In this mode, unreferenced objects are deleted immediately. */\n\treadonly testMode: boolean;\n\t/**\n\t * Tracks whether GC should run in tombstone mode. In this mode, sweep ready objects are marked as tombstones.\n\t * In interactive (non-summarizer) clients, tombstone objects behave as if they are deleted, i.e., access to them\n\t * is not allowed. However, these objects can be accessed after referencing them first. It is used as a staging\n\t * step for sweep where accidental sweep ready objects can be recovered.\n\t */\n\treadonly tombstoneMode: boolean;\n\t/** @see GCFeatureMatrix. */\n\treadonly persistedGcFeatureMatrix: GCFeatureMatrix | undefined;\n\t/** The version of GC in the base snapshot. */\n\treadonly gcVersionInBaseSnapshot: GCVersion | undefined;\n\t/** The current version of GC data in the running code */\n\treadonly gcVersionInEffect: GCVersion;\n}\n\n/** The state of node that is unreferenced. */\nexport const UnreferencedState = {\n\t/** The node is active, i.e., it can become referenced again. */\n\tActive: \"Active\",\n\t/** The node is inactive, i.e., it should not become referenced. */\n\tInactive: \"Inactive\",\n\t/** The node is ready to be deleted by the sweep phase. */\n\tSweepReady: \"SweepReady\",\n} as const;\nexport type UnreferencedState = typeof UnreferencedState[keyof typeof UnreferencedState];\n\n/**\n * Represents the result of a GC run.\n */\nexport interface IGCResult {\n\t/** The ids of nodes that are referenced in the referenced graph */\n\treferencedNodeIds: string[];\n\t/** The ids of nodes that are not-referenced or deleted in the referenced graph */\n\tdeletedNodeIds: string[];\n}\n"]}
package/lib/gc/index.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { GarbageCollector } from "./garbageCollection";
6
- export { currentGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, GCFeatureMatrix, GCVersion, gcVersionUpgradeToV3Key, IGarbageCollectionRuntime, IGarbageCollector, IGarbageCollectorConfigs, IGarbageCollectorCreateParams, IGCMetadata, IGCResult, IGCRuntimeOptions, IGCStats, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
6
+ export { nextGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, GCFeatureMatrix, GCVersion, gcVersionUpgradeToV4Key, IGarbageCollectionRuntime, IGarbageCollector, IGarbageCollectorConfigs, IGarbageCollectorCreateParams, IGCMetadata, IGCResult, IGCRuntimeOptions, IGCStats, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
7
7
  export { cloneGCData, concatGarbageCollectionStates, shouldAllowGcTombstoneEnforcement, shouldAllowGcSweep, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, tagAsCodeArtifact, } from "./gcHelpers";
8
8
  export { runGarbageCollection } from "./gcReferenceGraphAlgorithm";
9
9
  export { IGarbageCollectionNodeData, IGarbageCollectionSnapshotData, IGarbageCollectionState, IGarbageCollectionSummaryDetailsLegacy, } from "./gcSummaryDefinitions";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,WAAW,EACX,6BAA6B,EAC7B,iCAAiC,EACjC,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACN,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,sCAAsC,GACtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,cAAc,EACd,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,aAAa,EACb,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAC3B,eAAe,EACf,SAAS,EACT,uBAAuB,EACvB,yBAAyB,EACzB,iBAAiB,EACjB,wBAAwB,EACxB,6BAA6B,EAC7B,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,WAAW,EACX,6BAA6B,EAC7B,iCAAiC,EACjC,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EACN,0BAA0B,EAC1B,8BAA8B,EAC9B,uBAAuB,EACvB,sCAAsC,GACtC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,cAAc,EACd,qBAAqB,EACrB,sBAAsB,GACtB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC"}
package/lib/gc/index.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export { GarbageCollector } from "./garbageCollection";
6
- export { currentGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, gcVersionUpgradeToV3Key, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
6
+ export { nextGCVersion, defaultInactiveTimeoutMs, defaultSessionExpiryDurationMs, disableSweepLogKey, GCNodeType, gcTestModeKey, gcTombstoneGenerationOptionName, gcSweepGenerationOptionName, gcVersionUpgradeToV4Key, oneDayMs, runGCKey, runSessionExpiryKey, runSweepKey, stableGCVersion, sweepAttachmentBlobsKey, sweepDatastoresKey, throwOnTombstoneLoadKey, throwOnTombstoneUsageKey, UnreferencedState, } from "./gcDefinitions";
7
7
  export { cloneGCData, concatGarbageCollectionStates, shouldAllowGcTombstoneEnforcement, shouldAllowGcSweep, trimLeadingAndTrailingSlashes, unpackChildNodesGCDetails, tagAsCodeArtifact, } from "./gcHelpers";
8
8
  export { runGarbageCollection } from "./gcReferenceGraphAlgorithm";
9
9
  export { gcStateBlobKey, GCSummaryStateTracker, } from "./gcSummaryStateTracker";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAG3B,uBAAuB,EASvB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,WAAW,EACX,6BAA6B,EAC7B,iCAAiC,EACjC,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAOnE,OAAO,EACN,cAAc,EACd,qBAAqB,GAErB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection\";\nexport {\n\tcurrentGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSessionExpiryDurationMs,\n\tdisableSweepLogKey,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcTombstoneGenerationOptionName,\n\tgcSweepGenerationOptionName,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tgcVersionUpgradeToV3Key,\n\tIGarbageCollectionRuntime,\n\tIGarbageCollector,\n\tIGarbageCollectorConfigs,\n\tIGarbageCollectorCreateParams,\n\tIGCMetadata,\n\tIGCResult,\n\tIGCRuntimeOptions,\n\tIGCStats,\n\toneDayMs,\n\trunGCKey,\n\trunSessionExpiryKey,\n\trunSweepKey,\n\tstableGCVersion,\n\tsweepAttachmentBlobsKey,\n\tsweepDatastoresKey,\n\tthrowOnTombstoneLoadKey,\n\tthrowOnTombstoneUsageKey,\n\tUnreferencedState,\n} from \"./gcDefinitions\";\nexport {\n\tcloneGCData,\n\tconcatGarbageCollectionStates,\n\tshouldAllowGcTombstoneEnforcement,\n\tshouldAllowGcSweep,\n\ttrimLeadingAndTrailingSlashes,\n\tunpackChildNodesGCDetails,\n\ttagAsCodeArtifact,\n} from \"./gcHelpers\";\nexport { runGarbageCollection } from \"./gcReferenceGraphAlgorithm\";\nexport {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n\tIGarbageCollectionSummaryDetailsLegacy,\n} from \"./gcSummaryDefinitions\";\nexport {\n\tgcStateBlobKey,\n\tGCSummaryStateTracker,\n\tIGCSummaryTrackingData,\n} from \"./gcSummaryStateTracker\";\nexport { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from \"./gcTelemetry\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gc/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EACN,aAAa,EACb,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,UAAU,EACV,aAAa,EACb,+BAA+B,EAC/B,2BAA2B,EAG3B,uBAAuB,EASvB,QAAQ,EACR,QAAQ,EACR,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,uBAAuB,EACvB,kBAAkB,EAClB,uBAAuB,EACvB,wBAAwB,EACxB,iBAAiB,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACN,WAAW,EACX,6BAA6B,EAC7B,iCAAiC,EACjC,kBAAkB,EAClB,6BAA6B,EAC7B,yBAAyB,EACzB,iBAAiB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAOnE,OAAO,EACN,cAAc,EACd,qBAAqB,GAErB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nexport { GarbageCollector } from \"./garbageCollection\";\nexport {\n\tnextGCVersion,\n\tdefaultInactiveTimeoutMs,\n\tdefaultSessionExpiryDurationMs,\n\tdisableSweepLogKey,\n\tGCNodeType,\n\tgcTestModeKey,\n\tgcTombstoneGenerationOptionName,\n\tgcSweepGenerationOptionName,\n\tGCFeatureMatrix,\n\tGCVersion,\n\tgcVersionUpgradeToV4Key,\n\tIGarbageCollectionRuntime,\n\tIGarbageCollector,\n\tIGarbageCollectorConfigs,\n\tIGarbageCollectorCreateParams,\n\tIGCMetadata,\n\tIGCResult,\n\tIGCRuntimeOptions,\n\tIGCStats,\n\toneDayMs,\n\trunGCKey,\n\trunSessionExpiryKey,\n\trunSweepKey,\n\tstableGCVersion,\n\tsweepAttachmentBlobsKey,\n\tsweepDatastoresKey,\n\tthrowOnTombstoneLoadKey,\n\tthrowOnTombstoneUsageKey,\n\tUnreferencedState,\n} from \"./gcDefinitions\";\nexport {\n\tcloneGCData,\n\tconcatGarbageCollectionStates,\n\tshouldAllowGcTombstoneEnforcement,\n\tshouldAllowGcSweep,\n\ttrimLeadingAndTrailingSlashes,\n\tunpackChildNodesGCDetails,\n\ttagAsCodeArtifact,\n} from \"./gcHelpers\";\nexport { runGarbageCollection } from \"./gcReferenceGraphAlgorithm\";\nexport {\n\tIGarbageCollectionNodeData,\n\tIGarbageCollectionSnapshotData,\n\tIGarbageCollectionState,\n\tIGarbageCollectionSummaryDetailsLegacy,\n} from \"./gcSummaryDefinitions\";\nexport {\n\tgcStateBlobKey,\n\tGCSummaryStateTracker,\n\tIGCSummaryTrackingData,\n} from \"./gcSummaryStateTracker\";\nexport { GCTelemetryTracker, sendGCUnexpectedUsageEvent } from \"./gcTelemetry\";\nexport { UnreferencedStateTracker } from \"./gcUnreferencedStateTracker\";\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/container-runtime";
8
- export declare const pkgVersion = "2.0.0-internal.6.3.1";
8
+ export declare const pkgVersion = "2.0.0-internal.6.3.3";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/container-runtime";
8
- export const pkgVersion = "2.0.0-internal.6.3.1";
8
+ export const pkgVersion = "2.0.0-internal.6.3.3";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -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.6.3.1\";\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.6.3.3\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/container-runtime",
3
- "version": "2.0.0-internal.6.3.1",
3
+ "version": "2.0.0-internal.6.3.3",
4
4
  "description": "Fluid container runtime",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,18 +35,18 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluid-internal/client-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
39
- "@fluidframework/container-definitions": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
40
- "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
41
- "@fluidframework/core-interfaces": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
42
- "@fluidframework/core-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
43
- "@fluidframework/datastore": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
44
- "@fluidframework/driver-definitions": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
45
- "@fluidframework/driver-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
38
+ "@fluid-internal/client-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
39
+ "@fluidframework/container-definitions": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
40
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
41
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
42
+ "@fluidframework/core-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
43
+ "@fluidframework/datastore": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
44
+ "@fluidframework/driver-definitions": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
45
+ "@fluidframework/driver-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
46
46
  "@fluidframework/protocol-definitions": "^1.1.0",
47
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
48
- "@fluidframework/runtime-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
49
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
47
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
48
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
49
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
50
50
  "double-ended-queue": "^2.1.0-0",
51
51
  "events": "^3.1.0",
52
52
  "lz4js": "^0.2.0",
@@ -54,15 +54,15 @@
54
54
  "uuid": "^9.0.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
57
+ "@fluid-internal/stochastic-test-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
58
58
  "@fluid-tools/benchmark": "^0.48.0",
59
59
  "@fluid-tools/build-cli": "^0.22.0",
60
60
  "@fluidframework/build-common": "^2.0.0",
61
61
  "@fluidframework/build-tools": "^0.22.0",
62
- "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.6.1.1",
62
+ "@fluidframework/container-runtime-previous": "npm:@fluidframework/container-runtime@2.0.0-internal.6.3.1",
63
63
  "@fluidframework/eslint-config-fluid": "^2.1.0",
64
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
65
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.6.3.1 <2.0.0-internal.6.4.0",
64
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
65
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.6.3.3 <2.0.0-internal.6.4.0",
66
66
  "@microsoft/api-extractor": "^7.34.4",
67
67
  "@types/double-ended-queue": "^2.1.0",
68
68
  "@types/events": "^3.0.0",
@@ -83,11 +83,7 @@
83
83
  "typescript": "~4.5.5"
84
84
  },
85
85
  "typeValidation": {
86
- "broken": {
87
- "ClassDeclaration_ContainerRuntime": {
88
- "backCompat": false
89
- }
90
- }
86
+ "broken": {}
91
87
  },
92
88
  "scripts": {
93
89
  "build": "fluid-build . --task build",
@@ -725,30 +725,16 @@ export class ContainerRuntime
725
725
  * - initializeEntryPoint - Promise that resolves to an object which will act as entryPoint for the Container.
726
726
  * This object should provide all the functionality that the Container is expected to provide to the loader layer.
727
727
  */
728
- public static async loadRuntime(
729
- params: {
730
- context: IContainerContext;
731
- registryEntries: NamedFluidDataStoreRegistryEntries;
732
- existing: boolean;
733
- runtimeOptions?: IContainerRuntimeOptions;
734
- containerScope?: FluidObject;
735
- containerRuntimeCtor?: typeof ContainerRuntime;
736
- } & (
737
- | {
738
- requestHandler?: (
739
- request: IRequest,
740
- runtime: IContainerRuntime,
741
- ) => Promise<IResponse>;
742
- initializeEntryPoint?: undefined;
743
- }
744
- | {
745
- requestHandler?: undefined;
746
- initializeEntryPoint: (
747
- containerRuntime: IContainerRuntime,
748
- ) => Promise<FluidObject>;
749
- }
750
- ),
751
- ): Promise<ContainerRuntime> {
728
+ public static async loadRuntime(params: {
729
+ context: IContainerContext;
730
+ registryEntries: NamedFluidDataStoreRegistryEntries;
731
+ existing: boolean;
732
+ runtimeOptions?: IContainerRuntimeOptions;
733
+ containerScope?: FluidObject;
734
+ containerRuntimeCtor?: typeof ContainerRuntime;
735
+ requestHandler?: (request: IRequest, runtime: IContainerRuntime) => Promise<IResponse>;
736
+ initializeEntryPoint?: (containerRuntime: IContainerRuntime) => Promise<FluidObject>;
737
+ }): Promise<ContainerRuntime> {
752
738
  const {
753
739
  context,
754
740
  registryEntries,
@@ -287,15 +287,13 @@ export class GarbageCollector implements IGarbageCollector {
287
287
  return { gcData: { gcNodes }, usedRoutes };
288
288
  });
289
289
 
290
- // Log all the GC options and the state determined by the garbage collector. This is interesting only for the
291
- // summarizer client since it is the only one that runs GC. It also helps keep the telemetry less noisy.
292
- if (this.isSummarizerClient) {
293
- this.mc.logger.sendTelemetryEvent({
294
- eventName: "GarbageCollectorLoaded",
295
- gcConfigs: JSON.stringify(this.configs),
296
- gcOptions: JSON.stringify(createParams.gcOptions),
297
- });
298
- }
290
+ // Log all the GC options and the state determined by the garbage collector.
291
+ // This is useful even for interactive clients since they track unreferenced nodes and log errors.
292
+ this.mc.logger.sendTelemetryEvent({
293
+ eventName: "GarbageCollectorLoaded",
294
+ gcConfigs: JSON.stringify(this.configs),
295
+ gcOptions: JSON.stringify(createParams.gcOptions),
296
+ });
299
297
  }
300
298
 
301
299
  /**
@@ -6,7 +6,7 @@
6
6
  import { MonitoringContext, UsageError } from "@fluidframework/telemetry-utils";
7
7
  import { IContainerRuntimeMetadata } from "../summary";
8
8
  import {
9
- currentGCVersion,
9
+ nextGCVersion,
10
10
  defaultInactiveTimeoutMs,
11
11
  defaultSessionExpiryDurationMs,
12
12
  disableTombstoneKey,
@@ -15,7 +15,7 @@ import {
15
15
  gcTestModeKey,
16
16
  gcTombstoneGenerationOptionName,
17
17
  GCVersion,
18
- gcVersionUpgradeToV3Key,
18
+ gcVersionUpgradeToV4Key,
19
19
  IGarbageCollectorConfigs,
20
20
  IGCRuntimeOptions,
21
21
  maxSnapshotCacheExpiryMs,
@@ -107,7 +107,7 @@ export function generateGCConfigs(
107
107
 
108
108
  // If version upgrade is not enabled, fall back to the stable GC version.
109
109
  const gcVersionInEffect =
110
- mc.config.getBoolean(gcVersionUpgradeToV3Key) === true ? currentGCVersion : stableGCVersion;
110
+ mc.config.getBoolean(gcVersionUpgradeToV4Key) === true ? nextGCVersion : stableGCVersion;
111
111
 
112
112
  // The GC version is up-to-date if the GC version in effect is at least equal to the GC version in base snapshot.
113
113
  // If it is not up-to-date, there is a newer version of GC out there which is more reliable than this. So, GC
@@ -22,10 +22,10 @@ import {
22
22
 
23
23
  export type GCVersion = number;
24
24
 
25
- /** The stable version of garbage collection in production. */
26
- export const stableGCVersion: GCVersion = 2;
27
- /** The current version of garbage collection. */
28
- export const currentGCVersion: GCVersion = 3;
25
+ /** The stable/default version of GC Data */
26
+ export const stableGCVersion: GCVersion = 3;
27
+ /** The next version of GC Data, to bump to in case we need to regenerate all GC Data across all files. */
28
+ export const nextGCVersion: GCVersion = 4;
29
29
 
30
30
  /**
31
31
  * This undocumented GC Option (on ContainerRuntime Options) allows an app to disable enforcing GC on old documents by incrementing this value
@@ -60,7 +60,7 @@ export const throwOnTombstoneLoadKey = "Fluid.GarbageCollection.ThrowOnTombstone
60
60
  // Feature gate to enable throwing an error when tombstone object is used (e.g. outgoing or incoming ops).
61
61
  export const throwOnTombstoneUsageKey = "Fluid.GarbageCollection.ThrowOnTombstoneUsage";
62
62
  // Feature gate to enable GC version upgrade.
63
- export const gcVersionUpgradeToV3Key = "Fluid.GarbageCollection.GCVersionUpgradeToV3";
63
+ export const gcVersionUpgradeToV4Key = "Fluid.GarbageCollection.GCVersionUpgradeToV4";
64
64
  // Feature gate to enable GC sweep for datastores.
65
65
  // TODO: Remove Test from the flag when we are confident to turn on sweep
66
66
  export const sweepDatastoresKey = "Fluid.GarbageCollection.Test.SweepDataStores";
package/src/gc/index.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  export { GarbageCollector } from "./garbageCollection";
7
7
  export {
8
- currentGCVersion,
8
+ nextGCVersion,
9
9
  defaultInactiveTimeoutMs,
10
10
  defaultSessionExpiryDurationMs,
11
11
  disableSweepLogKey,
@@ -15,7 +15,7 @@ export {
15
15
  gcSweepGenerationOptionName,
16
16
  GCFeatureMatrix,
17
17
  GCVersion,
18
- gcVersionUpgradeToV3Key,
18
+ gcVersionUpgradeToV4Key,
19
19
  IGarbageCollectionRuntime,
20
20
  IGarbageCollector,
21
21
  IGarbageCollectorConfigs,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/container-runtime";
9
- export const pkgVersion = "2.0.0-internal.6.3.1";
9
+ export const pkgVersion = "2.0.0-internal.6.3.3";