@soulcraft/cor 3.0.20 → 3.0.21
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.
|
@@ -2096,6 +2096,22 @@ export class MetadataIndexManager {
|
|
|
2096
2096
|
// Extract field names from entity to know which fields to load
|
|
2097
2097
|
const fieldNames = this.native.extractFieldNames(JSON.stringify(entityOrMetadata));
|
|
2098
2098
|
await this.ensureFieldsLoaded(fieldNames);
|
|
2099
|
+
// **Drain BEFORE the native call, not only after.** The native
|
|
2100
|
+
// mutation reserves admission first thing; the post-mutation
|
|
2101
|
+
// threshold check below can never help a memtable that arrived
|
|
2102
|
+
// over-threshold from shard-log replay at open (this wrapper is the
|
|
2103
|
+
// engine's only flusher — inside the native call nobody drains, so
|
|
2104
|
+
// admission would park until the stall valve fires). Draining here
|
|
2105
|
+
// makes the open/replay path structurally deadlock-free instead of
|
|
2106
|
+
// timeout-rescued.
|
|
2107
|
+
{
|
|
2108
|
+
const engine = this.lsmEngine;
|
|
2109
|
+
if (engine !== null &&
|
|
2110
|
+
this.lsmMetaDir !== null &&
|
|
2111
|
+
Number(engine.memtableBytes()) >= this.lsmFlushThresholdBytes) {
|
|
2112
|
+
await this.flushLsm();
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2099
2115
|
// Execute mutation in Rust (single FFI call)
|
|
2100
2116
|
const resultJson = this.native.addToIndex(id, JSON.stringify(entityOrMetadata));
|
|
2101
2117
|
const result = JSON.parse(resultJson);
|
package/dist/version.d.ts
CHANGED
|
@@ -11,5 +11,5 @@
|
|
|
11
11
|
* `check:brainy`-style drift between the two fails the release.
|
|
12
12
|
*/
|
|
13
13
|
/** The @soulcraft/cor version this build was cut from. */
|
|
14
|
-
export declare const COR_VERSION = "3.0.
|
|
14
|
+
export declare const COR_VERSION = "3.0.21";
|
|
15
15
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soulcraft/cor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.21",
|
|
4
4
|
"description": "Native Rust acceleration for Brainy — SIMD distance, vector quantization, zero-copy mmap, native embeddings. Free tier for storage, Pro license for compute acceleration.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@napi-rs/cli": "^3.0.0",
|
|
85
|
-
"@soulcraft/brainy": "8.5.
|
|
85
|
+
"@soulcraft/brainy": "8.5.2",
|
|
86
86
|
"@types/node": "^22.0.0",
|
|
87
87
|
"pg": "^8.21.0",
|
|
88
88
|
"tsx": "^4.21.0",
|