document-dataply 0.0.13 → 0.0.14-alpha.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.
- package/dist/cjs/index.js +11 -2
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -11458,6 +11458,7 @@ var IndexManager = class {
|
|
|
11458
11458
|
this.fieldToIndices.get(field).push(indexName);
|
|
11459
11459
|
}
|
|
11460
11460
|
}
|
|
11461
|
+
const perIndexCapacity = Math.floor(this.api.options.pageCacheCapacity / Object.keys(this.api.indices).length);
|
|
11461
11462
|
for (const indexName of targetIndices.keys()) {
|
|
11462
11463
|
if (metadata.indices[indexName]) {
|
|
11463
11464
|
const tree = new import_dataply3.BPTreeAsync(
|
|
@@ -11467,7 +11468,10 @@ var IndexManager = class {
|
|
|
11467
11468
|
this.api.txContext,
|
|
11468
11469
|
indexName
|
|
11469
11470
|
),
|
|
11470
|
-
this.api.comparator
|
|
11471
|
+
this.api.comparator,
|
|
11472
|
+
{
|
|
11473
|
+
capacity: perIndexCapacity
|
|
11474
|
+
}
|
|
11471
11475
|
);
|
|
11472
11476
|
await tree.init();
|
|
11473
11477
|
this.trees.set(indexName, tree);
|
|
@@ -11509,6 +11513,7 @@ var IndexManager = class {
|
|
|
11509
11513
|
}
|
|
11510
11514
|
this.fieldToIndices.get(field).push(name);
|
|
11511
11515
|
}
|
|
11516
|
+
const perIndexCapacity = Math.floor(this.api.options.pageCacheCapacity / Object.keys(this.api.indices).length);
|
|
11512
11517
|
const tree = new import_dataply3.BPTreeAsync(
|
|
11513
11518
|
new DocumentSerializeStrategyAsync(
|
|
11514
11519
|
this.api.rowTableEngine.order,
|
|
@@ -11516,7 +11521,10 @@ var IndexManager = class {
|
|
|
11516
11521
|
this.api.txContext,
|
|
11517
11522
|
name
|
|
11518
11523
|
),
|
|
11519
|
-
this.api.comparator
|
|
11524
|
+
this.api.comparator,
|
|
11525
|
+
{
|
|
11526
|
+
capacity: perIndexCapacity
|
|
11527
|
+
}
|
|
11520
11528
|
);
|
|
11521
11529
|
await tree.init();
|
|
11522
11530
|
this.trees.set(name, tree);
|
|
@@ -11951,6 +11959,7 @@ var MutationManager = class {
|
|
|
11951
11959
|
});
|
|
11952
11960
|
const res = await treeTx.commit();
|
|
11953
11961
|
if (!res.success) {
|
|
11962
|
+
await treeTx.rollback();
|
|
11954
11963
|
throw res.error;
|
|
11955
11964
|
}
|
|
11956
11965
|
}
|
package/package.json
CHANGED