Three pieces addressing the cold-restart-write incident where a production deployment's first writes after every restart (33-35s each on a cold page cache) blew the op-count-scaled transact budget mid-batch: every write is itself a multi-op transaction, so one cold operation consumed the whole budget, the gate before the next operation tripped, and the write rolled back atomically - refused, retried, and refused again until the page cache warmed passively. - The budget's start-gating contract is now explicit and pinned: it gates STARTING the next operation, never rolling back completed work for elapsed time (the shipped schedule since 8.7.0, now stated in contract JSDoc, guarded by code for operation 0, and enforced by regression tests). The 30s floor is configurable via transactionBudgetFloorMs for stores whose cold operations legitimately run long. - New brain.warm() eagerly loads the vector index, metadata index, and graph adjacency so first operations after a cold restart run at steady-state cost. Returns a WarmReport with an honest per-surface outcome (warmed / probed / unavailable) - never reports a probe as a warm. warmOnOpen: true runs it during init(). New optional provider hook warm() on the vector and graph plugin contracts. - Vector-index transaction op classes renamed from the backend-specific AddToHNSWOperation / RemoveFromHNSWOperation to backend-neutral AddToVectorIndexOperation / RemoveFromVectorIndexOperation, stamping the active backend into the emitted op-name string (AddToVectorIndex(js-hnsw) vs a native provider's own identity) so journals never misdirect an operator toward an index that isn't running.
32 lines
810 B
TypeScript
32 lines
810 B
TypeScript
/**
|
|
* Transaction Operations
|
|
*
|
|
* Re-exports all transactional operations for storage and indexes.
|
|
* These operations provide atomicity with rollback support.
|
|
*
|
|
* @module transaction/operations
|
|
*/
|
|
|
|
// Storage Operations
|
|
export {
|
|
SaveNounMetadataOperation,
|
|
SaveNounOperation,
|
|
DeleteNounMetadataOperation,
|
|
SaveVerbMetadataOperation,
|
|
SaveVerbOperation,
|
|
DeleteVerbMetadataOperation,
|
|
UpdateNounMetadataOperation,
|
|
UpdateVerbMetadataOperation
|
|
} from './StorageOperations.js'
|
|
|
|
// Index Operations
|
|
export {
|
|
AddToVectorIndexOperation,
|
|
RemoveFromVectorIndexOperation,
|
|
AddToMetadataIndexOperation,
|
|
RemoveFromMetadataIndexOperation,
|
|
AddToGraphIndexOperation,
|
|
RemoveFromGraphIndexOperation,
|
|
BatchAddToVectorIndexOperation,
|
|
BatchAddToMetadataIndexOperation
|
|
} from './IndexOperations.js'
|