@fluidframework/map 2.0.0-internal.7.4.5 → 2.0.0-internal.7.4.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.
@@ -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/map";
8
- export declare const pkgVersion = "2.0.0-internal.7.4.5";
8
+ export declare const pkgVersion = "2.0.0-internal.7.4.6";
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/map";
8
- export const pkgVersion = "2.0.0-internal.7.4.5";
8
+ export const pkgVersion = "2.0.0-internal.7.4.6";
9
9
  //# sourceMappingURL=packageVersion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.mjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,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/map\";\nexport const pkgVersion = \"2.0.0-internal.7.4.5\";\n"]}
1
+ {"version":3,"file":"packageVersion.mjs","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAC7C,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/map\";\nexport const pkgVersion = \"2.0.0-internal.7.4.6\";\n"]}
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/map",
3
- "version": "2.0.0-internal.7.4.5",
3
+ "version": "2.0.0-internal.7.4.6",
4
4
  "description": "Distributed map",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,31 +35,31 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluid-internal/client-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
39
- "@fluidframework/core-interfaces": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
40
- "@fluidframework/core-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
41
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
42
- "@fluidframework/driver-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
43
- "@fluidframework/merge-tree": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
38
+ "@fluid-internal/client-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
39
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
40
+ "@fluidframework/core-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
41
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
42
+ "@fluidframework/driver-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
43
+ "@fluidframework/merge-tree": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
44
44
  "@fluidframework/protocol-definitions": "^3.0.0",
45
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
46
- "@fluidframework/runtime-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
47
- "@fluidframework/shared-object-base": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
48
- "@fluidframework/telemetry-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
45
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
46
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
47
+ "@fluidframework/shared-object-base": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
48
+ "@fluidframework/telemetry-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
49
49
  "path-browserify": "^1.0.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@arethetypeswrong/cli": "^0.13.3",
53
- "@fluid-private/stochastic-test-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
54
- "@fluid-private/test-dds-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
53
+ "@fluid-private/stochastic-test-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
54
+ "@fluid-private/test-dds-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
55
55
  "@fluid-tools/benchmark": "^0.48.0",
56
56
  "@fluid-tools/build-cli": "^0.28.0",
57
57
  "@fluidframework/build-common": "^2.0.3",
58
58
  "@fluidframework/build-tools": "^0.28.0",
59
59
  "@fluidframework/eslint-config-fluid": "^3.1.0",
60
60
  "@fluidframework/map-previous": "npm:@fluidframework/map@2.0.0-internal.7.2.0",
61
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
62
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.4.5 <2.0.0-internal.7.5.0",
61
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
62
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.4.6 <2.0.0-internal.7.5.0",
63
63
  "@microsoft/api-extractor": "^7.38.3",
64
64
  "@types/mocha": "^9.1.1",
65
65
  "@types/node": "^18.19.0",
package/src/directory.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils";
7
7
  import { TypedEventEmitter } from "@fluid-internal/client-utils";
8
- import { UsageError } from "@fluidframework/telemetry-utils";
8
+ import { ITelemetryLoggerExt, UsageError } from "@fluidframework/telemetry-utils";
9
9
  import { readAndParse } from "@fluidframework/driver-utils";
10
10
  import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
11
11
  import {
@@ -433,6 +433,10 @@ class DirectoryCreationTracker {
433
433
  }, keys);
434
434
  return keys;
435
435
  }
436
+
437
+ public get size(): number {
438
+ return this.keyToIndex.size;
439
+ }
436
440
  }
437
441
 
438
442
  /**
@@ -498,6 +502,7 @@ export class SharedDirectory
498
502
  this.runtime,
499
503
  this.serializer,
500
504
  posix.sep,
505
+ this.logger,
501
506
  );
502
507
 
503
508
  /**
@@ -810,6 +815,7 @@ export class SharedDirectory
810
815
  this.runtime,
811
816
  this.serializer,
812
817
  posix.join(currentSubDir.absolutePath, subdirName),
818
+ this.logger,
813
819
  );
814
820
  currentSubDir.populateSubDirectory(subdirName, newSubDir);
815
821
  // Record the newly inserted subdirectory to the creation tracker
@@ -1219,6 +1225,8 @@ function assertNonNullClientId(clientId: string | null): asserts clientId is str
1219
1225
  assert(clientId !== null, 0x6af /* client id should never be null */);
1220
1226
  }
1221
1227
 
1228
+ let hasLoggedDirectoryInconsistency = false;
1229
+
1222
1230
  /**
1223
1231
  * Node of the directory tree.
1224
1232
  * @sealed
@@ -1309,6 +1317,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1309
1317
  private readonly runtime: IFluidDataStoreRuntime,
1310
1318
  private readonly serializer: IFluidSerializer,
1311
1319
  public readonly absolutePath: string,
1320
+ private readonly logger: ITelemetryLoggerExt,
1312
1321
  ) {
1313
1322
  super();
1314
1323
  this.localCreationSeqTracker = new DirectoryCreationTracker();
@@ -1510,10 +1519,24 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
1510
1519
 
1511
1520
  const subdirNames = [...ackedSubdirsInOrder, ...localSubdirsInOrder];
1512
1521
 
1513
- assert(
1514
- subdirNames.length === this._subdirectories.size,
1515
- 0x85c /* The count of keys for iteration should be consistent with the size of actual data */,
1516
- );
1522
+ if (subdirNames.length !== this._subdirectories.size) {
1523
+ // TODO: AB#7022: Hitting this block indicates that the eventual consistency scheme for ordering subdirectories
1524
+ // has failed. Fall back to previous directory behavior, which didn't guarantee ordering.
1525
+ // It's not currently clear how to reach this state, so log some diagnostics to help understand the issue.
1526
+ // This whole block should eventually be replaced by an assert that the two sizes align.
1527
+ if (!hasLoggedDirectoryInconsistency) {
1528
+ this.logger.sendTelemetryEvent({
1529
+ eventName: "inconsistentSubdirectoryOrdering",
1530
+ localKeyCount: this.localCreationSeqTracker.size,
1531
+ ackedKeyCount: this.ackedCreationSeqTracker.size,
1532
+ subdirNamesLength: subdirNames.length,
1533
+ subdirectoriesSize: this._subdirectories.size,
1534
+ });
1535
+ hasLoggedDirectoryInconsistency = true;
1536
+ }
1537
+
1538
+ return this._subdirectories.entries();
1539
+ }
1517
1540
 
1518
1541
  const entriesIterator = {
1519
1542
  index: 0,
@@ -2596,6 +2619,7 @@ class SubDirectory extends TypedEventEmitter<IDirectoryEvents> implements IDirec
2596
2619
  this.runtime,
2597
2620
  this.serializer,
2598
2621
  absolutePath,
2622
+ this.logger,
2599
2623
  );
2600
2624
  /**
2601
2625
  * Store the sequnce numbers of newly created subdirectory to the proper creation tracker, based
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/map";
9
- export const pkgVersion = "2.0.0-internal.7.4.5";
9
+ export const pkgVersion = "2.0.0-internal.7.4.6";