@fluidframework/id-compressor 2.0.0-dev-rc.1.0.0.225277 → 2.0.0-dev-rc.1.0.0.232845
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/CHANGELOG.md +12 -0
- package/README.md +0 -6
- package/api-report/id-compressor.api.md +4 -39
- package/dist/{appendOnlySortedMap.cjs → appendOnlySortedMap.js} +1 -1
- package/dist/appendOnlySortedMap.js.map +1 -0
- package/dist/{finalSpace.cjs → finalSpace.js} +2 -2
- package/dist/finalSpace.js.map +1 -0
- package/dist/id-compressor-alpha.d.ts +24 -59
- package/dist/id-compressor-beta.d.ts +1 -2
- package/dist/id-compressor-public.d.ts +1 -2
- package/dist/id-compressor-untrimmed.d.ts +24 -59
- package/dist/idCompressor.d.ts +13 -17
- package/dist/idCompressor.d.ts.map +1 -1
- package/dist/{idCompressor.cjs → idCompressor.js} +94 -55
- package/dist/idCompressor.js.map +1 -0
- package/dist/{identifiers.cjs → identifiers.js} +1 -1
- package/dist/identifiers.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/{index.cjs → index.js} +4 -5
- package/dist/index.js.map +1 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/{packageVersion.cjs → packageVersion.js} +2 -2
- package/dist/packageVersion.js.map +1 -0
- package/dist/{persistanceUtilities.cjs → persistanceUtilities.js} +1 -1
- package/dist/persistanceUtilities.js.map +1 -0
- package/dist/{sessionSpaceNormalizer.cjs → sessionSpaceNormalizer.js} +3 -3
- package/dist/sessionSpaceNormalizer.js.map +1 -0
- package/dist/{sessions.cjs → sessions.js} +5 -8
- package/dist/sessions.js.map +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/idCompressor.d.ts +21 -0
- package/dist/types/idCompressor.d.ts.map +1 -1
- package/dist/types/{identifiers.cjs → idCompressor.js} +1 -1
- package/dist/types/idCompressor.js.map +1 -0
- package/dist/types/identifiers.js +7 -0
- package/dist/types/identifiers.js.map +1 -0
- package/dist/types/{persisted-types/0.0.1.cjs → index.js} +1 -1
- package/dist/types/index.js.map +1 -0
- package/dist/types/{index.cjs → persisted-types/0.0.1.js} +1 -1
- package/dist/types/persisted-types/0.0.1.js.map +1 -0
- package/dist/types/persisted-types/{index.cjs → index.js} +1 -1
- package/dist/types/persisted-types/index.js.map +1 -0
- package/dist/{utilities.cjs → utilities.js} +1 -1
- package/dist/utilities.js.map +1 -0
- package/lib/id-compressor-alpha.d.mts +24 -59
- package/lib/id-compressor-beta.d.mts +1 -2
- package/lib/id-compressor-public.d.mts +1 -2
- package/lib/id-compressor-untrimmed.d.mts +24 -59
- package/lib/idCompressor.d.mts +13 -17
- package/lib/idCompressor.d.mts.map +1 -1
- package/lib/idCompressor.mjs +88 -49
- package/lib/idCompressor.mjs.map +1 -1
- package/lib/index.d.mts +1 -1
- package/lib/index.d.mts.map +1 -1
- package/lib/index.mjs +1 -1
- package/lib/index.mjs.map +1 -1
- package/lib/packageVersion.d.mts +1 -1
- package/lib/packageVersion.mjs +1 -1
- package/lib/packageVersion.mjs.map +1 -1
- package/lib/sessions.mjs +1 -1
- package/lib/sessions.mjs.map +1 -1
- package/lib/types/idCompressor.d.mts +21 -0
- package/lib/types/idCompressor.d.mts.map +1 -1
- package/lib/types/idCompressor.mjs.map +1 -1
- package/package.json +16 -15
- package/src/idCompressor.ts +125 -66
- package/src/index.ts +1 -1
- package/src/packageVersion.ts +1 -1
- package/src/sessions.ts +1 -1
- package/src/types/idCompressor.ts +22 -0
- package/dist/appendOnlySortedMap.cjs.map +0 -1
- package/dist/finalSpace.cjs.map +0 -1
- package/dist/idCompressor.cjs.map +0 -1
- package/dist/identifiers.cjs.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/packageVersion.cjs.map +0 -1
- package/dist/persistanceUtilities.cjs.map +0 -1
- package/dist/sessionSpaceNormalizer.cjs.map +0 -1
- package/dist/sessions.cjs.map +0 -1
- package/dist/types/idCompressor.cjs +0 -7
- package/dist/types/idCompressor.cjs.map +0 -1
- package/dist/types/identifiers.cjs.map +0 -1
- package/dist/types/index.cjs.map +0 -1
- package/dist/types/persisted-types/0.0.1.cjs.map +0 -1
- package/dist/types/persisted-types/index.cjs.map +0 -1
- package/dist/utilities.cjs.map +0 -1
- package/tsc-multi.test.json +0 -4
- /package/{.eslintrc.js → .eslintrc.cjs} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @fluidframework/id-compressor
|
|
2
2
|
|
|
3
|
+
## 2.0.0-rc.1.0.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- id-compressor: Cluster allocation strategy updated ([#19066](https://github.com/microsoft/FluidFramework/issues/19066)) [0c36eb5f53](https://github.com/microsoft/FluidFramework/commits/0c36eb5f539362a8e27982e831a3ffe7999c1478)
|
|
8
|
+
|
|
9
|
+
This change adjusts the cluster allocation strategy for ghost sessions to exactly fill the cluster instead of needlessly allocating a large cluster.
|
|
10
|
+
It will also not make a cluster at all if IDs are not allocated.
|
|
11
|
+
This change adjusts a computation performed at a consensus point, and thus breaks any sessions collaborating across version numbers.
|
|
12
|
+
The version for the serialized format has been bumped to 2.0, and 1.0 documents will fail to load with the following error:
|
|
13
|
+
IdCompressor version 1.0 is no longer supported.
|
|
14
|
+
|
|
3
15
|
## 2.0.0-internal.8.0.0
|
|
4
16
|
|
|
5
17
|
Dependency updates only.
|
package/README.md
CHANGED
|
@@ -30,12 +30,6 @@ When taking a dependency on a Fluid Framework library, we recommend using a `^`
|
|
|
30
30
|
While Fluid Framework libraries may use different ranges with interdependencies between other Fluid Framework libraries,
|
|
31
31
|
library consumers should always prefer `^`.
|
|
32
32
|
|
|
33
|
-
Note that when depending on a library version of the form `2.0.0-internal.x.y.z`, called the Fluid internal version scheme,
|
|
34
|
-
you must use a `>= <` dependency range (such as `>=2.0.0-internal.x.y.z <2.0.0-internal.w.0.0` where `w` is `x+1`).
|
|
35
|
-
Standard `^` and `~` ranges will not work as expected.
|
|
36
|
-
See the [@fluid-tools/version-tools](https://github.com/microsoft/FluidFramework/blob/main/build-tools/packages/version-tools/README.md)
|
|
37
|
-
package for more information including tools to convert between version schemes.
|
|
38
|
-
|
|
39
33
|
<!-- prettier-ignore-end -->
|
|
40
34
|
|
|
41
35
|
<!-- AUTO-GENERATED-CONTENT:END -->
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
```ts
|
|
6
6
|
|
|
7
7
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
8
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
8
9
|
|
|
9
10
|
// @internal
|
|
10
11
|
export function assertIsStableId(stableId: string): StableId;
|
|
@@ -19,51 +20,14 @@ export function createIdCompressor(sessionId: SessionId, logger?: ITelemetryBase
|
|
|
19
20
|
export function createSessionId(): SessionId;
|
|
20
21
|
|
|
21
22
|
// @alpha
|
|
22
|
-
export function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession): IIdCompressor & IIdCompressorCore;
|
|
23
|
+
export function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
23
24
|
|
|
24
25
|
// @alpha
|
|
25
|
-
export function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IIdCompressor & IIdCompressorCore;
|
|
26
|
+
export function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
26
27
|
|
|
27
28
|
// @internal
|
|
28
29
|
export function generateStableId(): StableId;
|
|
29
30
|
|
|
30
|
-
// @alpha @deprecated
|
|
31
|
-
export class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
32
|
-
// @deprecated (undocumented)
|
|
33
|
-
static create(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
34
|
-
// @deprecated (undocumented)
|
|
35
|
-
static create(sessionId: SessionId, logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
36
|
-
// (undocumented)
|
|
37
|
-
decompress(id: SessionSpaceCompressedId): StableId;
|
|
38
|
-
// (undocumented)
|
|
39
|
-
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
40
|
-
// (undocumented)
|
|
41
|
-
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
|
|
42
|
-
// (undocumented)
|
|
43
|
-
equals(other: IdCompressor, includeLocalState: boolean): boolean;
|
|
44
|
-
// (undocumented)
|
|
45
|
-
finalizeCreationRange(range: IdCreationRange): void;
|
|
46
|
-
// (undocumented)
|
|
47
|
-
generateCompressedId(): SessionSpaceCompressedId;
|
|
48
|
-
// (undocumented)
|
|
49
|
-
readonly localSessionId: SessionId;
|
|
50
|
-
static readonly maxClusterSize: number;
|
|
51
|
-
// (undocumented)
|
|
52
|
-
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
53
|
-
// (undocumented)
|
|
54
|
-
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
55
|
-
// (undocumented)
|
|
56
|
-
recompress(uncompressed: StableId): SessionSpaceCompressedId;
|
|
57
|
-
// (undocumented)
|
|
58
|
-
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
59
|
-
// (undocumented)
|
|
60
|
-
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
61
|
-
// (undocumented)
|
|
62
|
-
takeNextCreationRange(): IdCreationRange;
|
|
63
|
-
// (undocumented)
|
|
64
|
-
tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
31
|
// @alpha
|
|
68
32
|
export interface IdCreationRange {
|
|
69
33
|
// (undocumented)
|
|
@@ -90,6 +54,7 @@ export interface IIdCompressor {
|
|
|
90
54
|
|
|
91
55
|
// @alpha (undocumented)
|
|
92
56
|
export interface IIdCompressorCore {
|
|
57
|
+
beginGhostSession(ghostSessionId: SessionId, ghostSessionCallback: () => void): any;
|
|
93
58
|
finalizeCreationRange(range: IdCreationRange): void;
|
|
94
59
|
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
95
60
|
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
@@ -315,4 +315,4 @@ exports.AppendOnlySortedMap = AppendOnlySortedMap;
|
|
|
315
315
|
* The value xor'd with the result index when a search fails.
|
|
316
316
|
*/
|
|
317
317
|
AppendOnlySortedMap.failureXor = -1;
|
|
318
|
-
//# sourceMappingURL=appendOnlySortedMap.
|
|
318
|
+
//# sourceMappingURL=appendOnlySortedMap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appendOnlySortedMap.js","sourceRoot":"","sources":["../src/appendOnlySortedMap.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,iCAAiC;AACjC,+BAA+B;AAC/B,2DAAoD;AAEpD;;;GAGG;AACH,MAAa,mBAAmB;IAG/B;;OAEG;IACH,YAAsC,UAAkC;QAAlC,eAAU,GAAV,UAAU,CAAwB;QALrD,aAAQ,GAAc,EAAE,CAAC;IAK+B,CAAC;IAE5E;;OAEG;IACH,IAAW,IAAI;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IACjC,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAkB,CAAC;IAC1C,CAAC;IAED;;OAEG;IACI,MAAM;QACZ,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAkB,CAAC;IACjE,CAAC;IAED;;OAEG;IACI,QAAQ;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAk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,GAAG,GAAG,CAAC,CAAC;QACZ,IAAI,IAAI,GAAG,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;QAC/B,IAAI,GAAG,GAAG,IAAI,IAAI,CAAC,CAAC;QACpB,OAAO,GAAG,GAAG,IAAI,EAAE;YAClB,MAAM,QAAQ,GAAG,GAAG,GAAG,CAAC,CAAC;YACzB,MAAM,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAM,EAAE,QAAQ,CAAC,QAAQ,GAAG,CAAC,CAAM,CAAC,CAAC;YACnF,IAAI,CAAC,GAAG,CAAC,EAAE;gBACV,GAAG,GAAG,GAAG,GAAG,CAAC,CAAC;aACd;iBAAM,IAAI,CAAC,GAAG,CAAC,EAAE;gBACjB,IAAI,GAAG,GAAG,CAAC;aACX;iBAAM,IAAI,CAAC,KAAK,CAAC,EAAE;gBACnB,OAAO,QAAQ,CAAC;aAChB;iBAAM;gBACN,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;aACvC;YACD,GAAG,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC;SACxB;QACD,OAAO,CAAC,GAAG,GAAG,CAAC,CAAC,GAAG,mBAAmB,CAAC,UAAU,CAAC;IACnD,CAAC;;AA/VF,kDAgWC;AAnCA;;GAEG;AACoB,8BAAU,GAAG,CAAC,CAAC,AAAL,CAAM","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/* eslint-disable tsdoc/syntax */\n/* eslint-disable no-bitwise */\nimport { assert } from \"@fluidframework/core-utils\";\n\n/**\n * A map in which entries are always added in key-sorted order.\n * Supports appending and searching.\n */\nexport class AppendOnlySortedMap<K, V> {\n\tprotected readonly elements: (K | V)[] = [];\n\n\t/**\n\t * @param comparator - a comparator for keys\n\t */\n\tpublic constructor(protected readonly comparator: (a: K, b: K) => number) {}\n\n\t/**\n\t * @returns the number of entries in this map\n\t */\n\tpublic get size(): number {\n\t\treturn this.elements.length / 2;\n\t}\n\n\t/**\n\t * @returns the min key in the map.\n\t */\n\tpublic minKey(): K | undefined {\n\t\treturn this.elements[0] as K | undefined;\n\t}\n\n\t/**\n\t * @returns the max key in the map.\n\t */\n\tpublic maxKey(): K | undefined {\n\t\treturn this.elements[this.elements.length - 2] as K | undefined;\n\t}\n\n\t/**\n\t * @returns the min value in the map.\n\t */\n\tpublic minValue(): V | undefined {\n\t\treturn this.elements[1] as V | undefined;\n\t}\n\n\t/**\n\t * @returns the min value in the map.\n\t */\n\tpublic maxValue(): V | undefined {\n\t\treturn this.elements[this.elements.length - 1] as V | undefined;\n\t}\n\n\t/**\n\t * @returns the min key in the map.\n\t */\n\tpublic first(): [K, V] | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn [elements[0] as K, elements[1] as V];\n\t}\n\n\t/**\n\t * @returns the max key in the map.\n\t */\n\tpublic last(): [K, V] | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tconst lastKeyIndex = length - 2;\n\t\treturn [elements[lastKeyIndex] as K, elements[lastKeyIndex + 1] as V];\n\t}\n\n\t/**\n\t * Returns the element at the insertion index.\n\t */\n\tpublic getAtIndex(index: number): [K, V] | undefined {\n\t\tconst realIndex = index * 2;\n\t\tconst { elements } = this;\n\t\tif (realIndex < 0 || realIndex > elements.length - 1) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn [elements[realIndex] as K, elements[realIndex + 1] as V];\n\t}\n\n\t/**\n\t * @returns an iterable of the entries in the map.\n\t */\n\tpublic *entries(): IterableIterator<readonly [K, V]> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield [elements[i] as K, elements[i + 1] as V];\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the keys in the map.\n\t */\n\tpublic *keys(): IterableIterator<K> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield elements[i] as K;\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the values in the map.\n\t */\n\tpublic *values(): IterableIterator<V> {\n\t\tconst { elements } = this;\n\t\tfor (let i = 0; i < elements.length; i += 2) {\n\t\t\tyield elements[i + 1] as V;\n\t\t}\n\t}\n\n\t/**\n\t * @returns an iterable of the entries in the map, reversed.\n\t */\n\tpublic *entriesReversed(): IterableIterator<readonly [K, V]> {\n\t\tconst { elements } = this;\n\t\tfor (let i = elements.length - 2; i >= 0; i -= 2) {\n\t\t\tyield [elements[i] as K, elements[i + 1] as V];\n\t\t}\n\t}\n\n\t/**\n\t * Adds a new key/value pair to the map. `key` must be > to all keys in the map.\n\t * @param key - the key to add.\n\t * @param value - the value to add.\n\t */\n\tpublic append(key: K, value: V): void {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length !== 0 && this.comparator(key, this.maxKey() as K) <= 0) {\n\t\t\tthrow new Error(\"Inserted key must be > all others in the map.\");\n\t\t}\n\t\telements.push(key);\n\t\telements.push(value);\n\t}\n\n\t/**\n\t * Replaces the last key/value pair with the given one. If the map is empty, it simply appends.\n\t * `key` must be > to all keys in the map prior to the one replaced.\n\t * @param key - the key to add.\n\t * @param value - the value to add.\n\t */\n\tpublic replaceLast(key: K, value: V): void {\n\t\tconst { elements, comparator } = this;\n\t\tconst { length } = elements;\n\t\tif (length !== 0) {\n\t\t\telements.pop();\n\t\t\telements.pop();\n\t\t\tif (comparator(key, this.maxKey() as K) <= 0) {\n\t\t\t\tthrow new Error(\"Inserted key must be > all others in the map.\");\n\t\t\t}\n\t\t}\n\t\telements.push(key);\n\t\telements.push(value);\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the value associated with `key` if such an entry exists, and undefined otherwise.\n\t */\n\tpublic get(key: K): V | undefined {\n\t\tconst index = AppendOnlySortedMap.keyIndexOf(this.elements, key, this.comparator);\n\t\tif (index < 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\treturn this.elements[index + 1] as V;\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the entry associated with `key` if such an entry exists, the entry associated with the next lower key if such an entry\n\t * exists, and undefined otherwise.\n\t */\n\tpublic getPairOrNextLower(key: K): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextLowerBy(key, this.comparator);\n\t}\n\n\t/**\n\t * @param key - the key to lookup.\n\t * @returns the entry associated with `key` if such an entry exists, the entry associated with the next higher key if such an entry\n\t * exists, and undefined otherwise.\n\t */\n\tpublic getPairOrNextHigher(key: K): readonly [K, V] | undefined {\n\t\treturn this.getPairOrNextHigherBy(key, this.comparator);\n\t}\n\n\t/**\n\t * Compares two `AppendOnlySortedMap`s.\n\t */\n\tpublic equals(\n\t\tother: AppendOnlySortedMap<K, V>,\n\t\tcompareValues: (a: V, b: V) => boolean,\n\t): boolean {\n\t\tif (other === this) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (this.elements.length !== other.elements.length) {\n\t\t\treturn false;\n\t\t}\n\n\t\tfor (let i = this.elements.length - 2; i >= 0; i -= 2) {\n\t\t\tconst keyThis = this.elements[i] as K;\n\t\t\tconst valueThis = this.elements[i + 1] as V;\n\t\t\tconst keyOther = other.elements[i] as K;\n\t\t\tconst valueOther = other.elements[i + 1] as V;\n\t\t\tif (this.comparator(keyThis, keyOther) !== 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!compareValues(valueThis, valueOther)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Test-only expensive assertions to check the internal validity of the data structure.\n\t */\n\tpublic assertValid(): void {\n\t\tlet prev: readonly [K, unknown] | undefined;\n\t\tfor (const kv of this.entries()) {\n\t\t\tif (prev !== undefined) {\n\t\t\t\tassert(\n\t\t\t\t\tthis.comparator(kv[0], prev[0]) > 0,\n\t\t\t\t\t0x752 /* Keys in map must be sorted. */,\n\t\t\t\t);\n\t\t\t}\n\t\t\tprev = kv;\n\t\t}\n\t}\n\n\t/**\n\t * Queries a range of entries.\n\t * @param from - the key to start the range query at, inclusive.\n\t * @param to - the key to end the range query at, inclusive.\n\t * @returns the range of entries.\n\t */\n\tpublic *getRange(from: K, to: K): IterableIterator<readonly [K, V]> {\n\t\tconst keyIndexFrom = this.getKeyIndexOfOrNextHigher(from, this.comparator);\n\t\tif (keyIndexFrom === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst keyIndexTo = this.getKeyIndexOfOrNextLower(to, this.comparator);\n\t\tif (keyIndexTo === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (let i = keyIndexFrom; i <= keyIndexTo; i += 2) {\n\t\t\tyield [this.elements[i] as K, this.elements[i + 1] as V];\n\t\t}\n\t}\n\n\tprotected getPairOrNextLowerBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): readonly [K, V] | undefined {\n\t\tconst keyIndex = this.getKeyIndexOfOrNextLower(search, comparator);\n\t\tif (keyIndex === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn [this.elements[keyIndex] as K, this.elements[keyIndex + 1] as V];\n\t}\n\n\tprivate getKeyIndexOfOrNextLower<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number | undefined {\n\t\tconst { elements } = this;\n\t\tif (elements.length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet keyIndex = AppendOnlySortedMap.keyIndexOf(elements, search, comparator);\n\t\tif (keyIndex < 0) {\n\t\t\tkeyIndex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (keyIndex > 0) {\n\t\t\t\treturn keyIndex - 2;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn keyIndex;\n\t}\n\n\tprotected getPairOrNextHigherBy<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): readonly [K, V] | undefined {\n\t\tconst keyIndex = this.getKeyIndexOfOrNextHigher(search, comparator);\n\t\tif (keyIndex === undefined) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn [this.elements[keyIndex] as K, this.elements[keyIndex + 1] as V];\n\t}\n\n\tprivate getKeyIndexOfOrNextHigher<T>(\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number | undefined {\n\t\tconst { elements } = this;\n\t\tconst { length } = elements;\n\t\tif (length === 0) {\n\t\t\treturn undefined;\n\t\t}\n\t\tlet keyIndex = AppendOnlySortedMap.keyIndexOf(elements, search, comparator);\n\t\tif (keyIndex < 0) {\n\t\t\tkeyIndex ^= AppendOnlySortedMap.failureXor;\n\t\t\tif (keyIndex < length) {\n\t\t\t\treturn keyIndex;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t}\n\t\treturn keyIndex;\n\t}\n\n\t/**\n\t * The value xor'd with the result index when a search fails.\n\t */\n\tpublic static readonly failureXor = -1;\n\n\t/**\n\t * Performs a binary search on the sorted array.\n\t * @returns the index of the key for `search`, or (if not present) the index it would have been inserted into xor'd\n\t * with `failureXor`. Note that negating is not an adequate solution as that could result in -0.\n\t */\n\tpublic static keyIndexOf<T, K, V>(\n\t\telements: readonly (K | V)[],\n\t\tsearch: T,\n\t\tcomparator: (search: T, key: K, value: V) => number,\n\t): number {\n\t\t// Low, high, and mid are addresses of [K,V] pairs and *not* key indices\n\t\tlet low = 0;\n\t\tlet high = elements.length / 2;\n\t\tlet mid = high >> 1;\n\t\twhile (low < high) {\n\t\t\tconst keyIndex = mid * 2;\n\t\t\tconst c = comparator(search, elements[keyIndex] as K, elements[keyIndex + 1] as V);\n\t\t\tif (c > 0) {\n\t\t\t\tlow = mid + 1;\n\t\t\t} else if (c < 0) {\n\t\t\t\thigh = mid;\n\t\t\t} else if (c === 0) {\n\t\t\t\treturn keyIndex;\n\t\t\t} else {\n\t\t\t\tthrow new Error(\"Invalid comparator.\");\n\t\t\t}\n\t\t\tmid = (low + high) >> 1;\n\t\t}\n\t\treturn (mid * 2) ^ AppendOnlySortedMap.failureXor;\n\t}\n}\n"]}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.FinalSpace = void 0;
|
|
8
8
|
const core_utils_1 = require("@fluidframework/core-utils");
|
|
9
|
-
const sessions_1 = require("./sessions
|
|
9
|
+
const sessions_1 = require("./sessions");
|
|
10
10
|
/**
|
|
11
11
|
* All IDs that have been finalized (acked), grouped into clusters sorted by their base final IDs.
|
|
12
12
|
* These clusters span the positive integer space and are not sparse, meaning a cluster's base final
|
|
@@ -59,4 +59,4 @@ class FinalSpace {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
exports.FinalSpace = FinalSpace;
|
|
62
|
-
//# sourceMappingURL=finalSpace.
|
|
62
|
+
//# sourceMappingURL=finalSpace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finalSpace.js","sourceRoot":"","sources":["../src/finalSpace.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,yCAA8F;AAG9F;;;;GAIG;AACH,MAAa,UAAU;IAAvB;QACkB,gBAAW,GAAgB,EAAE,CAAC;IAmDhD,CAAC;IAjDA,IAAW,QAAQ;QAClB,OAAO,IAAI,CAAC,WAAW,CAAC;IACzB,CAAC;IAEM,cAAc;QACpB,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IACtD,CAAC;IAEM,UAAU,CAAC,UAAqB;QACtC,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,IAAA,mBAAM,EACL,WAAW,KAAK,SAAS;YACxB,qEAAqE;YACrE,UAAU,CAAC,WAAW,KAAK,WAAW,CAAC,WAAW,GAAG,WAAW,CAAC,QAAQ,EAC1E,KAAK,CAAC,oDAAoD,CAC1D,CAAC;QACF,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACnC,CAAC;IAED;;;OAGG;IACI,mBAAmB;QACzB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,OAAO,WAAW,KAAK,SAAS;YAC/B,CAAC,CAAE,CAAuB;YAC1B,CAAC,CAAE,CAAE,IAAA,6BAAkB,EAAC,WAAW,CAAY,GAAG,CAAC,CAAuB,CAAC;IAC7E,CAAC;IAED;;;OAGG;IACI,mBAAmB;QACzB,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,OAAO,WAAW,KAAK,SAAS;YAC/B,CAAC,CAAE,CAAuB;YAC1B,CAAC,CAAE,CAAE,IAAA,6BAAkB,EAAC,WAAW,CAAY,GAAG,CAAC,CAAuB,CAAC;IAC7E,CAAC;IAEM,MAAM,CAAC,KAAiB;QAC9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACjD,IAAI,CAAC,IAAA,wBAAa,EAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EAAE;gBAC9D,OAAO,KAAK,CAAC;aACb;SACD;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,KAAK,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC;IAC7D,CAAC;CACD;AApDD,gCAoDC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { IdCluster, clustersEqual, lastAllocatedFinal, lastFinalizedFinal } from \"./sessions\";\nimport { FinalCompressedId } from \"./identifiers\";\n\n/**\n * All IDs that have been finalized (acked), grouped into clusters sorted by their base final IDs.\n * These clusters span the positive integer space and are not sparse, meaning a cluster's base final\n * ID will always be one greater than the last final ID in the previous cluster (or 0 if there is not one).\n */\nexport class FinalSpace {\n\tprivate readonly clusterList: IdCluster[] = [];\n\n\tpublic get clusters(): readonly IdCluster[] {\n\t\treturn this.clusterList;\n\t}\n\n\tpublic getLastCluster(): IdCluster | undefined {\n\t\treturn this.clusterList[this.clusterList.length - 1];\n\t}\n\n\tpublic addCluster(newCluster: IdCluster) {\n\t\tconst lastCluster = this.getLastCluster();\n\t\tassert(\n\t\t\tlastCluster === undefined ||\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/restrict-plus-operands\n\t\t\t\tnewCluster.baseFinalId === lastCluster.baseFinalId + lastCluster.capacity,\n\t\t\t0x753 /* Cluster insert to final_space is out of order. */,\n\t\t);\n\t\tthis.clusterList.push(newCluster);\n\t}\n\n\t/**\n\t * @returns the upper bound (exclusive) of finalized IDs in final space, i.e. one greater than the last final ID in the last cluster.\n\t * Note: this does not include allocated but unfinalized space in clusters.\n\t */\n\tpublic getFinalizedIdLimit(): FinalCompressedId {\n\t\tconst lastCluster = this.getLastCluster();\n\t\treturn lastCluster === undefined\n\t\t\t? (0 as FinalCompressedId)\n\t\t\t: (((lastFinalizedFinal(lastCluster) as number) + 1) as FinalCompressedId);\n\t}\n\n\t/**\n\t * @returns the upper bound (exclusive) of allocated IDs in final space, i.e. one greater than the last final ID in the last cluster.\n\t * Note: this does includes all allocated IDs in clusters.\n\t */\n\tpublic getAllocatedIdLimit(): FinalCompressedId {\n\t\tconst lastCluster = this.getLastCluster();\n\t\treturn lastCluster === undefined\n\t\t\t? (0 as FinalCompressedId)\n\t\t\t: (((lastAllocatedFinal(lastCluster) as number) + 1) as FinalCompressedId);\n\t}\n\n\tpublic equals(other: FinalSpace): boolean {\n\t\tfor (let i = 0; i < this.clusterList.length; i++) {\n\t\t\tif (!clustersEqual(this.clusterList[i], other.clusterList[i])) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn this.clusterList.length === other.clusterList.length;\n\t}\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
2
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
2
3
|
|
|
3
4
|
/* Excluded from this release type: assertIsStableId */
|
|
4
5
|
|
|
@@ -25,73 +26,16 @@ export declare function createSessionId(): SessionId;
|
|
|
25
26
|
* Deserializes the supplied state into an ID compressor.
|
|
26
27
|
* @alpha
|
|
27
28
|
*/
|
|
28
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession): IIdCompressor & IIdCompressorCore;
|
|
29
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
29
30
|
|
|
30
31
|
/**
|
|
31
32
|
* Deserializes the supplied state into an ID compressor.
|
|
32
33
|
* @alpha
|
|
33
34
|
*/
|
|
34
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IIdCompressor & IIdCompressorCore;
|
|
35
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
35
36
|
|
|
36
37
|
/* Excluded from this release type: generateStableId */
|
|
37
38
|
|
|
38
|
-
/**
|
|
39
|
-
* See {@link IIdCompressor} and {@link IIdCompressorCore}
|
|
40
|
-
*
|
|
41
|
-
* @alpha
|
|
42
|
-
*
|
|
43
|
-
* @deprecated Not intended for public use and will be removed from the public API in the future.
|
|
44
|
-
* Use `createIdCompressor` instead.
|
|
45
|
-
*/
|
|
46
|
-
export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
47
|
-
private readonly logger?;
|
|
48
|
-
/**
|
|
49
|
-
* Max allowed initial cluster size.
|
|
50
|
-
*/
|
|
51
|
-
static readonly maxClusterSize: number;
|
|
52
|
-
readonly localSessionId: SessionId;
|
|
53
|
-
private readonly localSession;
|
|
54
|
-
private readonly normalizer;
|
|
55
|
-
private localGenCount;
|
|
56
|
-
private nextRangeBaseGenCount;
|
|
57
|
-
private readonly sessions;
|
|
58
|
-
private readonly finalSpace;
|
|
59
|
-
/**
|
|
60
|
-
* Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
|
|
61
|
-
* Eventually, this can be adjusted dynamically to have cluster reservation policies that
|
|
62
|
-
* optimize the number of eager finals.
|
|
63
|
-
* It is not readonly as it is accessed by tests for clear-box testing.
|
|
64
|
-
*/
|
|
65
|
-
private nextRequestedClusterSize;
|
|
66
|
-
private telemetryLocalIdCount;
|
|
67
|
-
private telemetryEagerFinalIdCount;
|
|
68
|
-
private constructor();
|
|
69
|
-
/**
|
|
70
|
-
* @deprecated Use `createIdCompressor` instead.
|
|
71
|
-
*/
|
|
72
|
-
static create(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
73
|
-
/**
|
|
74
|
-
* @deprecated Use `createIdCompressor` instead.
|
|
75
|
-
*/
|
|
76
|
-
static create(sessionId: SessionId, logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
77
|
-
generateCompressedId(): SessionSpaceCompressedId;
|
|
78
|
-
private generateNextLocalId;
|
|
79
|
-
takeNextCreationRange(): IdCreationRange;
|
|
80
|
-
private static assertValidRange;
|
|
81
|
-
finalizeCreationRange(range: IdCreationRange): void;
|
|
82
|
-
private addEmptyCluster;
|
|
83
|
-
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
84
|
-
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
85
|
-
decompress(id: SessionSpaceCompressedId): StableId;
|
|
86
|
-
recompress(uncompressed: StableId): SessionSpaceCompressedId;
|
|
87
|
-
tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
|
|
88
|
-
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
89
|
-
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
90
|
-
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
91
|
-
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
|
|
92
|
-
equals(other: IdCompressor, includeLocalState: boolean): boolean;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
39
|
/**
|
|
96
40
|
* Data describing a range of session-local IDs (from a remote or local session).
|
|
97
41
|
*
|
|
@@ -240,6 +184,27 @@ export declare interface IIdCompressorCore {
|
|
|
240
184
|
* @param range - the range of session-local IDs to finalize.
|
|
241
185
|
*/
|
|
242
186
|
finalizeCreationRange(range: IdCreationRange): void;
|
|
187
|
+
/**
|
|
188
|
+
* Run a callback that is performed from the perspective of a special "ghost" session.
|
|
189
|
+
* Any ids generated by this session will be immediately finalized on the local client as if
|
|
190
|
+
* they were created by a remote client with `ghostSessionId`.
|
|
191
|
+
*
|
|
192
|
+
* *WARNING:* This API requires an external consensus mechanism to safely use:
|
|
193
|
+
* In an attached container (i.e. multiple clients may have the document loaded), all clients must guarantee that:
|
|
194
|
+
* - They invoke this API starting from the same finalized creation ranges
|
|
195
|
+
* - This API is invoked with the same ghost session id
|
|
196
|
+
* - `ghostSessionCallback` deterministically mints the same number of ids on each client within the ghost session
|
|
197
|
+
* Failure to meet these requirement will result in divergence across clients and eventual consistency errors.
|
|
198
|
+
* While the ghost sesion callback is running, IdCompressor does not support serialization.
|
|
199
|
+
* @remarks This API is primarily intended for data migration scenarios which are able to deterministically transform
|
|
200
|
+
* data in some format into data in a new format.
|
|
201
|
+
* The first requirement (that all clients must invoke the API with the same finalized creation ranges) is guaranteed
|
|
202
|
+
* for this scenario because the data transformation callback occurs at a specific ack within the op stream on all
|
|
203
|
+
* clients, and clients don't finalize creation ranges for local changes they might have at this point in time.
|
|
204
|
+
* @param ghostSessionId - The session id that minted ids generated within `ghostSessionCallback` should be attributed to.
|
|
205
|
+
* @param ghostSessionCallback - Callback which mints ids attributed to the ghost session.
|
|
206
|
+
*/
|
|
207
|
+
beginGhostSession(ghostSessionId: SessionId, ghostSessionCallback: () => void): any;
|
|
243
208
|
/**
|
|
244
209
|
* Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
|
|
245
210
|
* This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
2
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
2
3
|
|
|
3
4
|
/* Excluded from this release type: assertIsStableId */
|
|
4
5
|
|
|
@@ -10,8 +11,6 @@ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
|
10
11
|
|
|
11
12
|
/* Excluded from this release type: generateStableId */
|
|
12
13
|
|
|
13
|
-
/* Excluded from this release type: IdCompressor */
|
|
14
|
-
|
|
15
14
|
/* Excluded from this release type: IdCreationRange */
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
2
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
2
3
|
|
|
3
4
|
/* Excluded from this release type: assertIsStableId */
|
|
4
5
|
|
|
@@ -10,8 +11,6 @@ import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
|
10
11
|
|
|
11
12
|
/* Excluded from this release type: generateStableId */
|
|
12
13
|
|
|
13
|
-
/* Excluded from this release type: IdCompressor */
|
|
14
|
-
|
|
15
14
|
/* Excluded from this release type: IdCreationRange */
|
|
16
15
|
|
|
17
16
|
/**
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
|
|
2
|
+
import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Asserts that the given string is a stable ID.
|
|
@@ -29,13 +30,13 @@ export declare function createSessionId(): SessionId;
|
|
|
29
30
|
* Deserializes the supplied state into an ID compressor.
|
|
30
31
|
* @alpha
|
|
31
32
|
*/
|
|
32
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession): IIdCompressor & IIdCompressorCore;
|
|
33
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
33
34
|
|
|
34
35
|
/**
|
|
35
36
|
* Deserializes the supplied state into an ID compressor.
|
|
36
37
|
* @alpha
|
|
37
38
|
*/
|
|
38
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IIdCompressor & IIdCompressorCore;
|
|
39
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Generate a random stable ID
|
|
@@ -43,63 +44,6 @@ export declare function deserializeIdCompressor(serialized: SerializedIdCompress
|
|
|
43
44
|
*/
|
|
44
45
|
export declare function generateStableId(): StableId;
|
|
45
46
|
|
|
46
|
-
/**
|
|
47
|
-
* See {@link IIdCompressor} and {@link IIdCompressorCore}
|
|
48
|
-
*
|
|
49
|
-
* @alpha
|
|
50
|
-
*
|
|
51
|
-
* @deprecated Not intended for public use and will be removed from the public API in the future.
|
|
52
|
-
* Use `createIdCompressor` instead.
|
|
53
|
-
*/
|
|
54
|
-
export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
55
|
-
private readonly logger?;
|
|
56
|
-
/**
|
|
57
|
-
* Max allowed initial cluster size.
|
|
58
|
-
*/
|
|
59
|
-
static readonly maxClusterSize: number;
|
|
60
|
-
readonly localSessionId: SessionId;
|
|
61
|
-
private readonly localSession;
|
|
62
|
-
private readonly normalizer;
|
|
63
|
-
private localGenCount;
|
|
64
|
-
private nextRangeBaseGenCount;
|
|
65
|
-
private readonly sessions;
|
|
66
|
-
private readonly finalSpace;
|
|
67
|
-
/**
|
|
68
|
-
* Roughly equates to a minimum of 1M sessions before we start allocating 64 bit IDs.
|
|
69
|
-
* Eventually, this can be adjusted dynamically to have cluster reservation policies that
|
|
70
|
-
* optimize the number of eager finals.
|
|
71
|
-
* It is not readonly as it is accessed by tests for clear-box testing.
|
|
72
|
-
*/
|
|
73
|
-
private nextRequestedClusterSize;
|
|
74
|
-
private telemetryLocalIdCount;
|
|
75
|
-
private telemetryEagerFinalIdCount;
|
|
76
|
-
private constructor();
|
|
77
|
-
/**
|
|
78
|
-
* @deprecated Use `createIdCompressor` instead.
|
|
79
|
-
*/
|
|
80
|
-
static create(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
81
|
-
/**
|
|
82
|
-
* @deprecated Use `createIdCompressor` instead.
|
|
83
|
-
*/
|
|
84
|
-
static create(sessionId: SessionId, logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
85
|
-
generateCompressedId(): SessionSpaceCompressedId;
|
|
86
|
-
private generateNextLocalId;
|
|
87
|
-
takeNextCreationRange(): IdCreationRange;
|
|
88
|
-
private static assertValidRange;
|
|
89
|
-
finalizeCreationRange(range: IdCreationRange): void;
|
|
90
|
-
private addEmptyCluster;
|
|
91
|
-
normalizeToOpSpace(id: SessionSpaceCompressedId): OpSpaceCompressedId;
|
|
92
|
-
normalizeToSessionSpace(id: OpSpaceCompressedId, originSessionId: SessionId): SessionSpaceCompressedId;
|
|
93
|
-
decompress(id: SessionSpaceCompressedId): StableId;
|
|
94
|
-
recompress(uncompressed: StableId): SessionSpaceCompressedId;
|
|
95
|
-
tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
|
|
96
|
-
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
97
|
-
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
98
|
-
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
99
|
-
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
|
|
100
|
-
equals(other: IdCompressor, includeLocalState: boolean): boolean;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
47
|
/**
|
|
104
48
|
* Data describing a range of session-local IDs (from a remote or local session).
|
|
105
49
|
*
|
|
@@ -248,6 +192,27 @@ export declare interface IIdCompressorCore {
|
|
|
248
192
|
* @param range - the range of session-local IDs to finalize.
|
|
249
193
|
*/
|
|
250
194
|
finalizeCreationRange(range: IdCreationRange): void;
|
|
195
|
+
/**
|
|
196
|
+
* Run a callback that is performed from the perspective of a special "ghost" session.
|
|
197
|
+
* Any ids generated by this session will be immediately finalized on the local client as if
|
|
198
|
+
* they were created by a remote client with `ghostSessionId`.
|
|
199
|
+
*
|
|
200
|
+
* *WARNING:* This API requires an external consensus mechanism to safely use:
|
|
201
|
+
* In an attached container (i.e. multiple clients may have the document loaded), all clients must guarantee that:
|
|
202
|
+
* - They invoke this API starting from the same finalized creation ranges
|
|
203
|
+
* - This API is invoked with the same ghost session id
|
|
204
|
+
* - `ghostSessionCallback` deterministically mints the same number of ids on each client within the ghost session
|
|
205
|
+
* Failure to meet these requirement will result in divergence across clients and eventual consistency errors.
|
|
206
|
+
* While the ghost sesion callback is running, IdCompressor does not support serialization.
|
|
207
|
+
* @remarks This API is primarily intended for data migration scenarios which are able to deterministically transform
|
|
208
|
+
* data in some format into data in a new format.
|
|
209
|
+
* The first requirement (that all clients must invoke the API with the same finalized creation ranges) is guaranteed
|
|
210
|
+
* for this scenario because the data transformation callback occurs at a specific ack within the op stream on all
|
|
211
|
+
* clients, and clients don't finalize creation ranges for local changes they might have at this point in time.
|
|
212
|
+
* @param ghostSessionId - The session id that minted ids generated within `ghostSessionCallback` should be attributed to.
|
|
213
|
+
* @param ghostSessionCallback - Callback which mints ids attributed to the ghost session.
|
|
214
|
+
*/
|
|
215
|
+
beginGhostSession(ghostSessionId: SessionId, ghostSessionCallback: () => void): any;
|
|
251
216
|
/**
|
|
252
217
|
* Returns a persistable form of the current state of this `IdCompressor` which can be rehydrated via `IdCompressor.deserialize()`.
|
|
253
218
|
* This includes finalized state as well as un-finalized state and is therefore suitable for use in offline scenarios.
|
package/dist/idCompressor.d.ts
CHANGED
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
import { ITelemetryBaseLogger } from "@fluidframework/core-interfaces";
|
|
6
|
+
import { ITelemetryLoggerExt } from "@fluidframework/telemetry-utils";
|
|
6
7
|
import { IdCreationRange, IIdCompressor, IIdCompressorCore, OpSpaceCompressedId, SerializedIdCompressorWithNoSession, SerializedIdCompressorWithOngoingSession, SessionId, SessionSpaceCompressedId, StableId } from "./types";
|
|
8
|
+
import { Index } from "./persistanceUtilities";
|
|
9
|
+
import { Sessions } from "./sessions";
|
|
7
10
|
/**
|
|
8
11
|
* See {@link IIdCompressor} and {@link IIdCompressorCore}
|
|
9
|
-
*
|
|
10
|
-
* @alpha
|
|
11
|
-
*
|
|
12
|
-
* @deprecated Not intended for public use and will be removed from the public API in the future.
|
|
13
|
-
* Use `createIdCompressor` instead.
|
|
14
12
|
*/
|
|
15
13
|
export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
16
14
|
private readonly logger?;
|
|
@@ -34,16 +32,13 @@ export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
|
34
32
|
private nextRequestedClusterSize;
|
|
35
33
|
private telemetryLocalIdCount;
|
|
36
34
|
private telemetryEagerFinalIdCount;
|
|
37
|
-
private
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
*/
|
|
41
|
-
static create(logger?: ITelemetryBaseLogger): IIdCompressor & IIdCompressorCore;
|
|
35
|
+
private ongoingGhostSession?;
|
|
36
|
+
constructor(localSessionIdOrDeserialized: SessionId | Sessions, logger?: ITelemetryLoggerExt | undefined);
|
|
37
|
+
generateCompressedId(): SessionSpaceCompressedId;
|
|
42
38
|
/**
|
|
43
|
-
* @
|
|
39
|
+
* {@inheritdoc IIdCompressorCore.beginGhostSession}
|
|
44
40
|
*/
|
|
45
|
-
|
|
46
|
-
generateCompressedId(): SessionSpaceCompressedId;
|
|
41
|
+
beginGhostSession(ghostSessionId: SessionId, ghostSessionCallback: () => void): void;
|
|
47
42
|
private generateNextLocalId;
|
|
48
43
|
takeNextCreationRange(): IdCreationRange;
|
|
49
44
|
private static assertValidRange;
|
|
@@ -56,8 +51,9 @@ export declare class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
|
56
51
|
tryRecompress(uncompressed: StableId): SessionSpaceCompressedId | undefined;
|
|
57
52
|
serialize(withSession: true): SerializedIdCompressorWithOngoingSession;
|
|
58
53
|
serialize(withSession: false): SerializedIdCompressorWithNoSession;
|
|
59
|
-
static deserialize(serialized: SerializedIdCompressorWithOngoingSession): IdCompressor;
|
|
60
|
-
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IdCompressor;
|
|
54
|
+
static deserialize(serialized: SerializedIdCompressorWithOngoingSession, logger?: ITelemetryLoggerExt): IdCompressor;
|
|
55
|
+
static deserialize(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, logger?: ITelemetryLoggerExt): IdCompressor;
|
|
56
|
+
static deserialize2_0(index: Index, sessionId?: SessionId, logger?: ITelemetryLoggerExt): IdCompressor;
|
|
61
57
|
equals(other: IdCompressor, includeLocalState: boolean): boolean;
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
@@ -75,10 +71,10 @@ export declare function createIdCompressor(sessionId: SessionId, logger?: ITelem
|
|
|
75
71
|
* Deserializes the supplied state into an ID compressor.
|
|
76
72
|
* @alpha
|
|
77
73
|
*/
|
|
78
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession): IIdCompressor & IIdCompressorCore;
|
|
74
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithOngoingSession, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
79
75
|
/**
|
|
80
76
|
* Deserializes the supplied state into an ID compressor.
|
|
81
77
|
* @alpha
|
|
82
78
|
*/
|
|
83
|
-
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId): IIdCompressor & IIdCompressorCore;
|
|
79
|
+
export declare function deserializeIdCompressor(serialized: SerializedIdCompressorWithNoSession, newSessionId: SessionId, logger?: ITelemetryLoggerExt): IIdCompressor & IIdCompressorCore;
|
|
84
80
|
//# sourceMappingURL=idCompressor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idCompressor.d.ts","sourceRoot":"","sources":["../src/idCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"idCompressor.d.ts","sourceRoot":"","sources":["../src/idCompressor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAqB,MAAM,iCAAiC,CAAC;AACzF,OAAO,EACN,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EAEnB,mCAAmC,EACnC,wCAAwC,EACxC,SAAS,EACT,wBAAwB,EACxB,QAAQ,EACR,MAAM,SAAS,CAAC;AAWjB,OAAO,EACN,KAAK,EAOL,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAMN,QAAQ,EAER,MAAM,YAAY,CAAC;AAUpB;;GAEG;AACH,qBAAa,YAAa,YAAW,aAAa,EAAE,iBAAiB;IA+CnE,OAAO,CAAC,QAA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