@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.
- package/dist/directory.cjs +26 -5
- package/dist/directory.cjs.map +1 -1
- package/dist/directory.d.ts +4 -1
- package/dist/directory.d.ts.map +1 -1
- package/dist/packageVersion.cjs +1 -1
- package/dist/packageVersion.cjs.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/lib/directory.d.ts +4 -1
- package/lib/directory.d.ts.map +1 -1
- package/lib/directory.mjs +26 -5
- package/lib/directory.mjs.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.mjs +1 -1
- package/lib/packageVersion.mjs.map +1 -1
- package/map.test-files.tar +0 -0
- package/package.json +15 -15
- package/src/directory.ts +29 -5
- package/src/packageVersion.ts +1 -1
package/lib/packageVersion.d.ts
CHANGED
|
@@ -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.
|
|
8
|
+
export declare const pkgVersion = "2.0.0-internal.7.4.6";
|
|
9
9
|
//# sourceMappingURL=packageVersion.d.ts.map
|
package/lib/packageVersion.mjs
CHANGED
|
@@ -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.
|
|
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"]}
|
package/map.test-files.tar
CHANGED
|
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.
|
|
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.
|
|
39
|
-
"@fluidframework/core-interfaces": ">=2.0.0-internal.7.4.
|
|
40
|
-
"@fluidframework/core-utils": ">=2.0.0-internal.7.4.
|
|
41
|
-
"@fluidframework/datastore-definitions": ">=2.0.0-internal.7.4.
|
|
42
|
-
"@fluidframework/driver-utils": ">=2.0.0-internal.7.4.
|
|
43
|
-
"@fluidframework/merge-tree": ">=2.0.0-internal.7.4.
|
|
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.
|
|
46
|
-
"@fluidframework/runtime-utils": ">=2.0.0-internal.7.4.
|
|
47
|
-
"@fluidframework/shared-object-base": ">=2.0.0-internal.7.4.
|
|
48
|
-
"@fluidframework/telemetry-utils": ">=2.0.0-internal.7.4.
|
|
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.
|
|
54
|
-
"@fluid-private/test-dds-utils": ">=2.0.0-internal.7.4.
|
|
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.
|
|
62
|
-
"@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.4.
|
|
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
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
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
|
package/src/packageVersion.ts
CHANGED