@fluidframework/container-runtime 2.0.0-internal.1.0.0.83139 → 2.0.0-internal.1.0.0.84253

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 (64) hide show
  1. package/dist/batchTracker.js +1 -1
  2. package/dist/batchTracker.js.map +1 -1
  3. package/dist/blobManager.d.ts.map +1 -1
  4. package/dist/blobManager.js +16 -16
  5. package/dist/blobManager.js.map +1 -1
  6. package/dist/containerRuntime.d.ts +1 -38
  7. package/dist/containerRuntime.d.ts.map +1 -1
  8. package/dist/containerRuntime.js +51 -105
  9. package/dist/containerRuntime.js.map +1 -1
  10. package/dist/dataStore.d.ts +1 -1
  11. package/dist/dataStore.d.ts.map +1 -1
  12. package/dist/dataStore.js +2 -3
  13. package/dist/dataStore.js.map +1 -1
  14. package/dist/dataStores.d.ts +1 -1
  15. package/dist/dataStores.d.ts.map +1 -1
  16. package/dist/dataStores.js +2 -2
  17. package/dist/dataStores.js.map +1 -1
  18. package/dist/packageVersion.d.ts +1 -1
  19. package/dist/packageVersion.js +1 -1
  20. package/dist/packageVersion.js.map +1 -1
  21. package/dist/runningSummarizer.js +1 -1
  22. package/dist/runningSummarizer.js.map +1 -1
  23. package/dist/summarizer.d.ts.map +1 -1
  24. package/dist/summarizer.js +20 -1
  25. package/dist/summarizer.js.map +1 -1
  26. package/dist/summaryGenerator.js +1 -1
  27. package/dist/summaryGenerator.js.map +1 -1
  28. package/lib/batchTracker.js +1 -1
  29. package/lib/batchTracker.js.map +1 -1
  30. package/lib/blobManager.d.ts.map +1 -1
  31. package/lib/blobManager.js +16 -16
  32. package/lib/blobManager.js.map +1 -1
  33. package/lib/containerRuntime.d.ts +1 -38
  34. package/lib/containerRuntime.d.ts.map +1 -1
  35. package/lib/containerRuntime.js +51 -105
  36. package/lib/containerRuntime.js.map +1 -1
  37. package/lib/dataStore.d.ts +1 -1
  38. package/lib/dataStore.d.ts.map +1 -1
  39. package/lib/dataStore.js +2 -3
  40. package/lib/dataStore.js.map +1 -1
  41. package/lib/dataStores.d.ts +1 -1
  42. package/lib/dataStores.d.ts.map +1 -1
  43. package/lib/dataStores.js +2 -2
  44. package/lib/dataStores.js.map +1 -1
  45. package/lib/packageVersion.d.ts +1 -1
  46. package/lib/packageVersion.js +1 -1
  47. package/lib/packageVersion.js.map +1 -1
  48. package/lib/runningSummarizer.js +1 -1
  49. package/lib/runningSummarizer.js.map +1 -1
  50. package/lib/summarizer.d.ts.map +1 -1
  51. package/lib/summarizer.js +22 -3
  52. package/lib/summarizer.js.map +1 -1
  53. package/lib/summaryGenerator.js +1 -1
  54. package/lib/summaryGenerator.js.map +1 -1
  55. package/package.json +27 -18
  56. package/src/batchTracker.ts +1 -1
  57. package/src/blobManager.ts +20 -16
  58. package/src/containerRuntime.ts +71 -155
  59. package/src/dataStore.ts +1 -4
  60. package/src/dataStores.ts +13 -13
  61. package/src/packageVersion.ts +1 -1
  62. package/src/runningSummarizer.ts +1 -1
  63. package/src/summarizer.ts +28 -3
  64. package/src/summaryGenerator.ts +1 -1
@@ -77,7 +77,6 @@ var RuntimeHeaders;
77
77
  /** True if the request is coming from an IFluidHandle. */
78
78
  RuntimeHeaders["viaHandle"] = "viaHandle";
79
79
  })(RuntimeHeaders = exports.RuntimeHeaders || (exports.RuntimeHeaders = {}));
80
- const useDataStoreAliasingKey = "Fluid.ContainerRuntime.UseDataStoreAliasing";
81
80
  const maxConsecutiveReconnectsKey = "Fluid.ContainerRuntime.MaxConsecutiveReconnects";
82
81
  // Feature gate for the max op size. If the value is negative, chunking is enabled
83
82
  // and all ops over 16k would be chunked. If the value is positive, all ops with
@@ -379,7 +378,7 @@ exports.getDeviceSpec = getDeviceSpec;
379
378
  */
380
379
  class ContainerRuntime extends common_utils_1.TypedEventEmitter {
381
380
  constructor(context, registry, metadata, electedSummarizerData, chunks, dataStoreAliasMap, runtimeOptions, containerScope, logger, existing, blobManagerSnapshot, _storage, requestHandler, summaryConfiguration) {
382
- var _a, _b, _c, _d, _e, _f, _g, _h;
381
+ var _a, _b, _c, _d, _e, _f;
383
382
  if (summaryConfiguration === void 0) { summaryConfiguration = Object.assign(Object.assign({}, exports.DefaultSummaryConfiguration), (_a = runtimeOptions.summaryOptions) === null || _a === void 0 ? void 0 : _a.summaryConfigOverrides); }
384
383
  super();
385
384
  this.context = context;
@@ -448,15 +447,12 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
448
447
  this.summarizerClientElectionEnabled = this.isSummarizerClientElectionEnabled();
449
448
  this.maxOpsSinceLastSummary = this.getMaxOpsSinceLastSummary();
450
449
  this.initialSummarizerDelayMs = this.getInitialSummarizerDelayMs();
451
- this._aliasingEnabled =
452
- ((_c = this.mc.config.getBoolean(useDataStoreAliasingKey)) !== null && _c !== void 0 ? _c : false) ||
453
- ((_d = runtimeOptions.useDataStoreAliasing) !== null && _d !== void 0 ? _d : false);
454
- this._maxOpSizeInBytes = ((_e = this.mc.config.getNumber(maxOpSizeInBytesKey)) !== null && _e !== void 0 ? _e : defaultMaxOpSizeInBytes);
450
+ this._maxOpSizeInBytes = ((_c = this.mc.config.getNumber(maxOpSizeInBytesKey)) !== null && _c !== void 0 ? _c : defaultMaxOpSizeInBytes);
455
451
  this.maxConsecutiveReconnects =
456
- (_f = this.mc.config.getNumber(maxConsecutiveReconnectsKey)) !== null && _f !== void 0 ? _f : this.defaultMaxConsecutiveReconnects;
452
+ (_d = this.mc.config.getNumber(maxConsecutiveReconnectsKey)) !== null && _d !== void 0 ? _d : this.defaultMaxConsecutiveReconnects;
457
453
  this._flushMode = runtimeOptions.flushMode;
458
454
  const pendingRuntimeState = context.pendingLocalState;
459
- const baseSnapshot = (_g = pendingRuntimeState === null || pendingRuntimeState === void 0 ? void 0 : pendingRuntimeState.baseSnapshot) !== null && _g !== void 0 ? _g : context.baseSnapshot;
455
+ const baseSnapshot = (_e = pendingRuntimeState === null || pendingRuntimeState === void 0 ? void 0 : pendingRuntimeState.baseSnapshot) !== null && _e !== void 0 ? _e : context.baseSnapshot;
460
456
  this.garbageCollector = garbageCollection_1.GarbageCollector.create({
461
457
  runtime: this,
462
458
  gcOptions: this.runtimeOptions.gcOptions,
@@ -583,7 +579,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
583
579
  };
584
580
  // summaryNumber was renamed from summaryCount. For older docs that haven't been opened for a long time,
585
581
  // the count is reset to 0.
586
- loadSummaryNumber = (_h = metadata === null || metadata === void 0 ? void 0 : metadata.summaryNumber) !== null && _h !== void 0 ? _h : 0;
582
+ loadSummaryNumber = (_f = metadata === null || metadata === void 0 ? void 0 : metadata.summaryNumber) !== null && _f !== void 0 ? _f : 0;
587
583
  }
588
584
  else {
589
585
  this.createContainerMetadata = {
@@ -618,7 +614,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
618
614
  runtimeVersion: packageVersion_1.pkgVersion,
619
615
  },
620
616
  });
621
- const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", useDataStoreAliasing = false, flushMode = defaultFlushMode, enableOfflineLoad = false, } = runtimeOptions;
617
+ const { summaryOptions = {}, gcOptions = {}, loadSequenceNumberVerification = "close", flushMode = defaultFlushMode, enableOfflineLoad = false, } = runtimeOptions;
622
618
  const pendingRuntimeState = context.pendingLocalState;
623
619
  const baseSnapshot = (_b = pendingRuntimeState === null || pendingRuntimeState === void 0 ? void 0 : pendingRuntimeState.baseSnapshot) !== null && _b !== void 0 ? _b : context.baseSnapshot;
624
620
  const storage = !pendingRuntimeState ?
@@ -671,7 +667,6 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
671
667
  summaryOptions,
672
668
  gcOptions,
673
669
  loadSequenceNumberVerification,
674
- useDataStoreAliasing,
675
670
  flushMode,
676
671
  enableOfflineLoad,
677
672
  }, containerScope, logger, loadExisting, blobManagerSnapshot, storage, requestHandler);
@@ -1053,8 +1048,8 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1053
1048
  // ensure we don't submit ops referencing a blob that has not been uploaded
1054
1049
  const connecting = connected && !this._connected && !this.deltaManager.readOnlyInfo.readonly;
1055
1050
  if (connecting && this.blobManager.hasPendingOfflineUploads) {
1056
- (0, common_utils_1.assert)(!this.delayConnectClientId, "Connect event delay must be canceled before subsequent connect event");
1057
- (0, common_utils_1.assert)(!!clientId, "Must have clientId when connecting");
1051
+ (0, common_utils_1.assert)(!this.delayConnectClientId, 0x392 /* Connect event delay must be canceled before subsequent connect event */);
1052
+ (0, common_utils_1.assert)(!!clientId, 0x393 /* Must have clientId when connecting */);
1058
1053
  this.delayConnectClientId = clientId;
1059
1054
  this.blobManager.onConnected().then(() => {
1060
1055
  // make sure we didn't reconnect before the promise resolved
@@ -1068,7 +1063,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1068
1063
  this.setConnectionStateCore(connected, clientId);
1069
1064
  }
1070
1065
  setConnectionStateCore(connected, clientId) {
1071
- (0, common_utils_1.assert)(!this.delayConnectClientId, "connect event delay must be cleared before propagating connect event");
1066
+ (0, common_utils_1.assert)(!this.delayConnectClientId, 0x394 /* connect event delay must be cleared before propagating connect event */);
1072
1067
  this.verifyNotClosed();
1073
1068
  // There might be no change of state due to Container calling this API after loading runtime.
1074
1069
  const changeOfState = this._connected !== connected;
@@ -1310,59 +1305,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1310
1305
  }
1311
1306
  async createDataStore(pkg) {
1312
1307
  const internalId = (0, uuid_1.v4)();
1313
- return (0, dataStore_1.channelToDataStore)(await this._createDataStore(pkg, false /* isRoot */, internalId), internalId, this, this.dataStores, this.mc.logger);
1314
- }
1315
- /**
1316
- * Creates a root datastore directly with a user generated id and attaches it to storage.
1317
- * It is vulnerable to name collisions and should not be used.
1318
- *
1319
- * This method will be removed. See #6465.
1320
- */
1321
- async createRootDataStoreLegacy(pkg, rootDataStoreId) {
1322
- const fluidDataStore = await this._createDataStore(pkg, true /* isRoot */, rootDataStoreId);
1323
- fluidDataStore.makeVisibleAndAttachGraph();
1324
- return fluidDataStore;
1325
- }
1326
- /**
1327
- * @deprecated - will be removed in an upcoming release. See #9660.
1328
- */
1329
- async createRootDataStore(pkg, rootDataStoreId) {
1330
- if (rootDataStoreId.includes("/")) {
1331
- throw new container_utils_1.UsageError(`Id cannot contain slashes: '${rootDataStoreId}'`);
1332
- }
1333
- return this._aliasingEnabled === true ?
1334
- this.createAndAliasDataStore(pkg, rootDataStoreId) :
1335
- this.createRootDataStoreLegacy(pkg, rootDataStoreId);
1336
- }
1337
- /**
1338
- * Creates a data store then attempts to alias it.
1339
- * If aliasing fails, it will raise an exception.
1340
- *
1341
- * This method will be removed. See #6465.
1342
- *
1343
- * @param pkg - Package name of the data store
1344
- * @param alias - Alias to be assigned to the data store
1345
- * @param props - Properties for the data store
1346
- * @returns - An aliased data store which can can be found / loaded by alias.
1347
- */
1348
- async createAndAliasDataStore(pkg, alias, props) {
1349
- const internalId = (0, uuid_1.v4)();
1350
- try {
1351
- // A similar call may have been initiated by the same client, so we should try to get
1352
- // a possible existing aliased datastore first.
1353
- const existingDataStore = await this.getRootDataStoreChannel(alias, /* wait */ false);
1354
- return (0, dataStore_1.channelToDataStore)(existingDataStore, internalId, this, this.dataStores, this.mc.logger, true);
1355
- }
1356
- catch (err) {
1357
- const newChannel = await this._createDataStore(pkg, false /* isRoot */, internalId, props);
1358
- const newDataStore = (0, dataStore_1.channelToDataStore)(newChannel, internalId, this, this.dataStores, this.mc.logger);
1359
- const aliasResult = await newDataStore.trySetAlias(alias);
1360
- if (aliasResult === "Success") {
1361
- return newDataStore;
1362
- }
1363
- const existingDataStore = await this.getRootDataStoreChannel(alias, /* wait */ false);
1364
- return (0, dataStore_1.channelToDataStore)(existingDataStore, internalId, this, this.dataStores, this.mc.logger, true);
1365
- }
1308
+ return (0, dataStore_1.channelToDataStore)(await this._createDataStore(pkg, internalId), internalId, this, this.dataStores, this.mc.logger);
1366
1309
  }
1367
1310
  createDetachedRootDataStore(pkg, rootDataStoreId) {
1368
1311
  if (rootDataStoreId.includes("/")) {
@@ -1373,31 +1316,13 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1373
1316
  createDetachedDataStore(pkg) {
1374
1317
  return this.dataStores.createDetachedDataStoreCore(pkg, false);
1375
1318
  }
1376
- /**
1377
- * Creates a possibly root datastore directly with a possibly user generated id and attaches it to storage.
1378
- * It is vulnerable to name collisions if both aforementioned conditions are true, and should not be used.
1379
- *
1380
- * This method will be removed. See #6465.
1381
- */
1382
- async _createDataStoreWithPropsLegacy(pkg, props, id = (0, uuid_1.v4)(), isRoot = false) {
1383
- const fluidDataStore = await this.dataStores._createFluidDataStoreContext(Array.isArray(pkg) ? pkg : [pkg], id, isRoot, props).realize();
1384
- if (isRoot) {
1385
- fluidDataStore.makeVisibleAndAttachGraph();
1386
- this.logger.sendTelemetryEvent({
1387
- eventName: "Root datastore with props",
1388
- hasProps: props !== undefined,
1389
- });
1390
- }
1319
+ async _createDataStoreWithProps(pkg, props, id = (0, uuid_1.v4)()) {
1320
+ const fluidDataStore = await this.dataStores._createFluidDataStoreContext(Array.isArray(pkg) ? pkg : [pkg], id, props).realize();
1391
1321
  return (0, dataStore_1.channelToDataStore)(fluidDataStore, id, this, this.dataStores, this.mc.logger);
1392
1322
  }
1393
- async _createDataStoreWithProps(pkg, props, id = (0, uuid_1.v4)(), isRoot = false) {
1394
- return this._aliasingEnabled === true && isRoot ?
1395
- this.createAndAliasDataStore(pkg, id, props) :
1396
- this._createDataStoreWithPropsLegacy(pkg, props, id, isRoot);
1397
- }
1398
- async _createDataStore(pkg, isRoot, id = (0, uuid_1.v4)(), props) {
1323
+ async _createDataStore(pkg, id = (0, uuid_1.v4)(), props) {
1399
1324
  return this.dataStores
1400
- ._createFluidDataStoreContext(Array.isArray(pkg) ? pkg : [pkg], id, isRoot, props)
1325
+ ._createFluidDataStoreContext(Array.isArray(pkg) ? pkg : [pkg], id, props)
1401
1326
  .realize();
1402
1327
  }
1403
1328
  canSendOps() {
@@ -1671,16 +1596,19 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1671
1596
  const summaryNumberLogger = telemetry_utils_1.ChildLogger.create(summaryLogger, undefined, {
1672
1597
  all: { summaryNumber },
1673
1598
  });
1599
+ let latestSnapshotVersionId;
1674
1600
  if (refreshLatestAck) {
1675
- const latestSummaryRefSeq = await this.refreshLatestSummaryAckFromServer(telemetry_utils_1.ChildLogger.create(summaryNumberLogger, undefined, { all: { safeSummary: true } }));
1676
- if (latestSummaryRefSeq > this.deltaManager.lastSequenceNumber) {
1601
+ const latestSnapshotInfo = await this.refreshLatestSummaryAckFromServer(telemetry_utils_1.ChildLogger.create(summaryNumberLogger, undefined, { all: { safeSummary: true } }));
1602
+ const latestSnapshotRefSeq = latestSnapshotInfo.latestSnapshotRefSeq;
1603
+ latestSnapshotVersionId = latestSnapshotInfo.latestSnapshotVersionId;
1604
+ if (latestSnapshotRefSeq > this.deltaManager.lastSequenceNumber) {
1677
1605
  // We need to catch up to the latest summary's reference sequence number before pausing.
1678
1606
  await telemetry_utils_1.PerformanceEvent.timedExecAsync(summaryNumberLogger, {
1679
1607
  eventName: "WaitingForSeq",
1680
1608
  lastSequenceNumber: this.deltaManager.lastSequenceNumber,
1681
- targetSequenceNumber: latestSummaryRefSeq,
1609
+ targetSequenceNumber: latestSnapshotRefSeq,
1682
1610
  lastKnownSeqNumber: this.deltaManager.lastKnownSeqNumber,
1683
- }, async () => waitForSeq(this.deltaManager, latestSummaryRefSeq), { start: true, end: true, cancel: "error" });
1611
+ }, async () => waitForSeq(this.deltaManager, latestSnapshotRefSeq), { start: true, end: true, cancel: "error" });
1684
1612
  }
1685
1613
  }
1686
1614
  try {
@@ -1716,7 +1644,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1716
1644
  error: `lastSequenceNumber changed before uploading to storage. ${this.deltaManager.lastSequenceNumber} !== ${summaryRefSeqNum}`,
1717
1645
  };
1718
1646
  }
1719
- (0, common_utils_1.assert)(summaryRefSeqNum === ((_a = this.deltaManager.lastMessage) === null || _a === void 0 ? void 0 : _a.sequenceNumber), "it's one and the same thing");
1647
+ (0, common_utils_1.assert)(summaryRefSeqNum === ((_a = this.deltaManager.lastMessage) === null || _a === void 0 ? void 0 : _a.sequenceNumber), 0x395 /* it's one and the same thing */);
1720
1648
  if (lastAck !== this.summaryCollection.latestAck) {
1721
1649
  return {
1722
1650
  continue: false,
@@ -1781,17 +1709,34 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
1781
1709
  if (!continueResult.continue) {
1782
1710
  return Object.assign(Object.assign({ stage: "generate" }, generateSummaryData), { error: continueResult.error });
1783
1711
  }
1784
- const summaryContext = lastAck === undefined
1785
- ? {
1712
+ // It may happen that the lastAck it not correct due to missing summaryAck in case of single commit
1713
+ // summary. So if the previous summarizer closes just after submitting the summary and before
1714
+ // submitting the summaryOp then we can't rely on summaryAck. So in case we have
1715
+ // latestSnapshotVersionId from storage and it does not match with the lastAck ackHandle, then use
1716
+ // the one fetched from storage as parent as that is the latest.
1717
+ let summaryContext;
1718
+ if ((lastAck === null || lastAck === void 0 ? void 0 : lastAck.summaryAck.contents.handle) !== latestSnapshotVersionId
1719
+ && latestSnapshotVersionId !== undefined) {
1720
+ summaryContext = {
1721
+ proposalHandle: undefined,
1722
+ ackHandle: latestSnapshotVersionId,
1723
+ referenceSequenceNumber: summaryRefSeqNum,
1724
+ };
1725
+ }
1726
+ else if (lastAck === undefined) {
1727
+ summaryContext = {
1786
1728
  proposalHandle: undefined,
1787
1729
  ackHandle: (_b = this.context.getLoadedFromVersion()) === null || _b === void 0 ? void 0 : _b.id,
1788
1730
  referenceSequenceNumber: summaryRefSeqNum,
1789
- }
1790
- : {
1731
+ };
1732
+ }
1733
+ else {
1734
+ summaryContext = {
1791
1735
  proposalHandle: lastAck.summaryOp.contents.handle,
1792
1736
  ackHandle: lastAck.summaryAck.contents.handle,
1793
1737
  referenceSequenceNumber: summaryRefSeqNum,
1794
1738
  };
1739
+ }
1795
1740
  let handle;
1796
1741
  try {
1797
1742
  handle = await this.storage.uploadSummaryWithContext(summarizeResult.summary, summaryContext);
@@ -2030,12 +1975,13 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
2030
1975
  /** Implementation of ISummarizerInternalsProvider.refreshLatestSummaryAck */
2031
1976
  async refreshLatestSummaryAck(proposalHandle, ackHandle, summaryRefSeq, summaryLogger) {
2032
1977
  const readAndParseBlob = async (id) => (0, driver_utils_1.readAndParse)(this.storage, id);
2033
- const result = await this.summarizerNode.refreshLatestSummary(proposalHandle, summaryRefSeq, async () => this.fetchSnapshotFromStorage(ackHandle, summaryLogger, {
1978
+ const { snapshotTree } = await this.fetchSnapshotFromStorage(ackHandle, summaryLogger, {
2034
1979
  eventName: "RefreshLatestSummaryGetSnapshot",
2035
1980
  ackHandle,
2036
1981
  summaryRefSeq,
2037
1982
  fetchLatest: false,
2038
- }), readAndParseBlob, summaryLogger);
1983
+ });
1984
+ const result = await this.summarizerNode.refreshLatestSummary(proposalHandle, summaryRefSeq, async () => snapshotTree, readAndParseBlob, summaryLogger);
2039
1985
  // Notify the garbage collector so it can update its latest summary state.
2040
1986
  await this.garbageCollector.latestSummaryStateRefreshed(result, readAndParseBlob);
2041
1987
  }
@@ -2046,16 +1992,16 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
2046
1992
  * @returns downloaded snapshot's reference sequence number
2047
1993
  */
2048
1994
  async refreshLatestSummaryAckFromServer(summaryLogger) {
2049
- const snapshot = await this.fetchSnapshotFromStorage(null, summaryLogger, {
1995
+ const { snapshotTree, versionId } = await this.fetchSnapshotFromStorage(null, summaryLogger, {
2050
1996
  eventName: "RefreshLatestSummaryGetSnapshot",
2051
1997
  fetchLatest: true,
2052
1998
  }, driver_definitions_1.FetchSource.noCache);
2053
1999
  const readAndParseBlob = async (id) => (0, driver_utils_1.readAndParse)(this.storage, id);
2054
- const snapshotRefSeq = await (0, runtime_utils_1.seqFromTree)(snapshot, readAndParseBlob);
2055
- const result = await this.summarizerNode.refreshLatestSummary(undefined, snapshotRefSeq, async () => snapshot, readAndParseBlob, summaryLogger);
2000
+ const latestSnapshotRefSeq = await (0, runtime_utils_1.seqFromTree)(snapshotTree, readAndParseBlob);
2001
+ const result = await this.summarizerNode.refreshLatestSummary(undefined, latestSnapshotRefSeq, async () => snapshotTree, readAndParseBlob, summaryLogger);
2056
2002
  // Notify the garbage collector so it can update its latest summary state.
2057
2003
  await this.garbageCollector.latestSummaryStateRefreshed(result, readAndParseBlob);
2058
- return snapshotRefSeq;
2004
+ return { latestSnapshotRefSeq, latestSnapshotVersionId: versionId };
2059
2005
  }
2060
2006
  async fetchSnapshotFromStorage(versionId, logger, event, fetchSource) {
2061
2007
  return telemetry_utils_1.PerformanceEvent.timedExecAsync(logger, event, async (perfEvent) => {
@@ -2068,7 +2014,7 @@ class ContainerRuntime extends common_utils_1.TypedEventEmitter {
2068
2014
  (0, common_utils_1.assert)(!!maybeSnapshot, 0x138 /* "Failed to get snapshot from storage" */);
2069
2015
  stats.getSnapshotDuration = trace.trace().duration;
2070
2016
  perfEvent.end(stats);
2071
- return maybeSnapshot;
2017
+ return { snapshotTree: maybeSnapshot, versionId: versions[0].id };
2072
2018
  });
2073
2019
  }
2074
2020
  notifyAttaching(snapshot) {