@optimystic/db-core 1.17.0 → 1.18.0

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.
@@ -81,9 +81,10 @@ export declare function isBlockChangeNotifier(x: unknown): x is IBlockChangeNoti
81
81
  * names as `WriteDurability.recordedBy`. An answer without `recordedBy` is a write no node is
82
82
  * tracking, and no event should be expected for it. That node fires the event when its record of a
83
83
  * block's shortfall is removed, which happens two ways, each firing exactly once per record: the
84
- * node's push of the missing copies empties it (the event carries the record's own `rev` and
85
- * `actionId`), or a later commit of the block that every member confirmed settles it (the event
86
- * carries that later commit's `rev` and `actionId`).
84
+ * missing copies are confirmed — by the node's own push, or by the embedder reporting a copy it
85
+ * delivered itself — and empty it (the event carries the record's own `rev` and `actionId`), or a
86
+ * later commit of the block that every member confirmed settles it (the event carries that later
87
+ * commit's `rev` and `actionId`).
87
88
  *
88
89
  * **Keyed by block, deliberately, never by action.** The node's record of what is still owed (the
89
90
  * under-replication ledger) keeps ONE entry per block, at the block's highest under-replicated
@@ -107,7 +108,8 @@ export type BlockDurabilityReachedEvent = {
107
108
  * fully replicated commit that settled it. See the note above on superseded writes. */
108
109
  readonly actionId: ActionId;
109
110
  /** Best-effort; absent when the collection could not be resolved from the block's header, and
110
- * always when a settling commit fired the event (the coordinator does not read the block). */
111
+ * always when a settling commit fired the event (the coordinator does not read the block) or an
112
+ * embedder's report cleared the entry (`reportBlockHeld` on a db-p2p node reads no block either). */
111
113
  readonly collectionId?: CollectionId;
112
114
  };
113
115
  export type BlockDurabilityListener = (event: BlockDurabilityReachedEvent) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"change-notifier.d.ts","sourceRoot":"","sources":["../../../src/transactor/change-notifier.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAExD,qEAAqE;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.ts"],"names":[],"mappings":"AA6EA,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC/C,OAAO,CAAC,CAAC,CAAC,IAAI,OAAQ,CAA0B,CAAC,kBAAkB,KAAK,UAAU,CAAC;AACpF,CAAC;AA2DD,MAAM,UAAU,yBAAyB,CAAC,CAAU;IACnD,OAAO,CAAC,CAAC,CAAC,IAAI,OAAQ,CAA8B,CAAC,wBAAwB,KAAK,UAAU,CAAC;AAC9F,CAAC"}
1
+ {"version":3,"file":"change-notifier.js","sourceRoot":"","sources":["../../../src/transactor/change-notifier.ts"],"names":[],"mappings":"AA6EA,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC/C,OAAO,CAAC,CAAC,CAAC,IAAI,OAAQ,CAA0B,CAAC,kBAAkB,KAAK,UAAU,CAAC;AACpF,CAAC;AA6DD,MAAM,UAAU,yBAAyB,CAAC,CAAU;IACnD,OAAO,CAAC,CAAC,CAAC,IAAI,OAAQ,CAA8B,CAAC,wBAAwB,KAAK,UAAU,CAAC;AAC9F,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimystic/db-core",
3
- "version": "1.17.0",
3
+ "version": "1.18.0",
4
4
  "type": "module",
5
5
  "description": "Core database functionality for Optimystic",
6
6
  "main": "dist/src/index.js",
@@ -89,9 +89,10 @@ export function isBlockChangeNotifier(x: unknown): x is IBlockChangeNotifier {
89
89
  * names as `WriteDurability.recordedBy`. An answer without `recordedBy` is a write no node is
90
90
  * tracking, and no event should be expected for it. That node fires the event when its record of a
91
91
  * block's shortfall is removed, which happens two ways, each firing exactly once per record: the
92
- * node's push of the missing copies empties it (the event carries the record's own `rev` and
93
- * `actionId`), or a later commit of the block that every member confirmed settles it (the event
94
- * carries that later commit's `rev` and `actionId`).
92
+ * missing copies are confirmed — by the node's own push, or by the embedder reporting a copy it
93
+ * delivered itself — and empty it (the event carries the record's own `rev` and `actionId`), or a
94
+ * later commit of the block that every member confirmed settles it (the event carries that later
95
+ * commit's `rev` and `actionId`).
95
96
  *
96
97
  * **Keyed by block, deliberately, never by action.** The node's record of what is still owed (the
97
98
  * under-replication ledger) keeps ONE entry per block, at the block's highest under-replicated
@@ -115,7 +116,8 @@ export type BlockDurabilityReachedEvent = {
115
116
  * fully replicated commit that settled it. See the note above on superseded writes. */
116
117
  readonly actionId: ActionId;
117
118
  /** Best-effort; absent when the collection could not be resolved from the block's header, and
118
- * always when a settling commit fired the event (the coordinator does not read the block). */
119
+ * always when a settling commit fired the event (the coordinator does not read the block) or an
120
+ * embedder's report cleared the entry (`reportBlockHeld` on a db-p2p node reads no block either). */
119
121
  readonly collectionId?: CollectionId;
120
122
  };
121
123