Commit graph

514 commits

Author SHA1 Message Date
Ewout Stortenbeker
744bcc3322 Fix: make sure unallocated records are not referenced in cache anymore. Might prevent CorruptRecordErrors from occuring whilst running in a single process. 2026-04-13 10:51:03 +02:00
Ewout Stortenbeker
4314735293 Fix DataProxy test race condition causing other transaction order 2025-10-10 12:14:16 +02:00
Ewout Stortenbeker
116f869aea Remove Pino and custom logger from tests 2025-09-16 13:12:25 +02:00
Ewout Stortenbeker
a9e8a04297
Merge branch 'master' into feature/custom-logger-support 2025-09-16 12:52:34 +02:00
Ewout Stortenbeker
23812d5b67 Disable usage of socket IPC for tests, needs works 2025-09-06 12:16:15 +02:00
Ewout Stortenbeker
6c67c9579b Change JSDoc type to TypeScript 2025-08-28 13:25:51 +02:00
Ewout Stortenbeker
49822b2cac Refactor all .forEach calls to for .. of loops 2025-08-28 13:25:17 +02:00
Ewout Stortenbeker
f474787296 Fix stack overflow when building a large index 2025-08-28 13:22:38 +02:00
Ewout Stortenbeker
27ea13f06e Removed double property setting in constructor 2025-08-28 13:20:08 +02:00
Ewout Stortenbeker
eb53d25ffb test with pino logger 2023-12-04 12:21:47 +01:00
Ewout Stortenbeker
dd1a6462e5 Add custom logger support 2023-10-09 22:50:06 +02:00
Ewout Stortenbeker
0badec1224 remove commented out earlier caching attempt
Caching worked, but might cause unpredictable issues somewhere else
2023-10-02 11:06:27 +02:00
Ewout Stortenbeker
3756aaba7e Improve allocation ranges -> addresses conversion
This moves away from adding all allocated storage addresses for each range which is VERY slow on large nodes spanning multiple pages.  It now only requests target records for specific record numbers, and calculated counts only
2023-10-02 11:03:39 +02:00
Ewout Stortenbeker
e3fdade566 Change increaseMaxEntries to trigger 50% growth
Was 10%, but this causes growing trees to quickly increase the number of leafs and node levels instead of adding more entries to the leafs.
Example: A small tree with 5 entries per node/leaf is rebuilt when growing. Growing node entries with 10% means it now gets 5 + 0.5 = 5.5 = (rounded up) 6 entries. The next time, it gets 7 (6.6), then 8, 9, 10 etc.
Growing the number of entries in the leafs and nodes faster  improves the performance of the tree, using 50% the tree will grow as follows: 5 + 2.5 = 7.5 = 8 entries, then 8 + 4 = 12, then 12 + 6 = 18 etc.
2023-10-02 10:57:15 +02:00
Ewout Stortenbeker
444c1ffd7f improved unit test 2023-08-19 09:30:11 +02:00
Ewout Stortenbeker
1f612b7576 Trigger single-leaf tree growth rebuilds on time
Fixes #242
2023-08-19 09:29:45 +02:00
Ewout Stortenbeker
bae638645e Handle empty leafs 2023-08-16 23:12:49 +02:00
Ewout Stortenbeker
fba5eded0e Add unit test 2023-08-16 22:40:27 +02:00
Ewout Stortenbeker
cae1cd6f8b Improve readability 2023-08-16 22:39:38 +02:00
Ewout Stortenbeker
6d63cce2bc Fix #239 deletion causing empty leaf issue 2023-08-16 22:38:38 +02:00
Ewout Stortenbeker
efe8f0def7 Add support for old Safari in webworker 2023-07-27 23:34:19 +02:00
Ewout Stortenbeker
a8c5bdd889
Fix target of mutations events on wildcard paths (#230) 2023-07-17 12:10:40 +02:00
Ewout Stortenbeker
d5475180c9 use optional chaining 2023-07-10 11:55:36 +02:00
Ewout Stortenbeker
c0e68dcc65 Remove window references 2023-07-10 11:54:58 +02:00
Ewout Stortenbeker
4e5b203adf add warnOnly schema option 2023-05-21 13:08:08 +02:00
Ewout Stortenbeker
ff19a8056c unit test for issue #225 2023-05-18 19:20:10 +02:00
Ewout Stortenbeker
4882211fdc Fix write single-leaf tree leaf rollback issue 2023-05-18 19:18:34 +02:00
Ewout Stortenbeker
27d00b3558 Fix index extData value removal free space calc 2023-05-18 19:17:26 +02:00
Ewout Stortenbeker
1d66d6382a early exit if not triggering anyway 2023-05-18 19:16:16 +02:00
Ewout Stortenbeker
224e198af2 fix double index adding concurrency issue 2023-05-18 19:15:13 +02:00
Ewout Stortenbeker
6b04d03ac1 Use LONG_RUNNING_TESTS env var 2023-05-01 17:29:43 +02:00
Ewout Stortenbeker
8988961a50 adjust to Node 18 types 2023-05-01 17:22:59 +02:00
Ewout Stortenbeker
29cbb253c7 Add command level arguments 2023-05-01 17:19:25 +02:00
Ewout Stortenbeker
8cc685a7fb use hash for socket/pipe if filePath is too long 2023-05-01 17:18:45 +02:00
Ewout Stortenbeker
a48341b9f6 Add config settings, no console logging 2023-05-01 17:17:56 +02:00
Ewout Stortenbeker
8daa2b3058 Work on socket IPC implementation:
- use spawn instead of fork to start service, pass additional args
- do not bind to service stdout and stderr to allow process exit
- use db logger and level
- use Buffer.subarray instead of deprecated Buffer.slice
2023-05-01 17:16:09 +02:00
Ewout Stortenbeker
8b260c2e56 Fix (invisible) tsc compile errors 2023-04-27 12:21:27 +02:00
Ewout Stortenbeker
78bc6040ca Fix schema validation of update on higher path 2023-04-24 22:51:19 +02:00
Ewout Stortenbeker
5d5536f9f9 Fix cluster IPC breaking browser build #215 2023-04-17 10:15:04 +02:00
Ewout Stortenbeker
9110f474c5 Transaction logging fixes:
- use IPC settings
- catch `getMutations` node not found error if there are no mutations
2023-04-11 20:42:25 +02:00
Ewout Stortenbeker
a4f5400cb6
Merge pull request #213 from appy-one/feature/socket-ipc-service
New feature: socket IPC service
2023-04-10 13:01:15 +02:00
Ewout Stortenbeker
fcfb57d517
Merge pull request #212 from appy-one/fix/inline-unicode-keys
Fix writing inline keys with unicode chars
2023-04-10 13:00:44 +02:00
Ewout Stortenbeker
aaf6a41833
Merge pull request #211 from appy-one/fix/ipc-index-issues
Fix IPC index issues
2023-04-10 13:00:10 +02:00
Ewout Stortenbeker
b29793fe65 use 'socket' IPC method for tests 2023-04-03 16:40:02 +02:00
Ewout Stortenbeker
59685ffd6e increase worker db existence polling timeout 2023-04-03 16:39:45 +02:00
Ewout Stortenbeker
e64d5de8b0 Add new 'socket' IPC mode
This approach automatically starts a service ("daemon") for the target database in a separate process. The service will take on the master/primary role, all connecting clients will take on the worker role.
2023-04-03 16:36:58 +02:00
Ewout Stortenbeker
3d6a46c49e Fix writing inline keys with unicode chars 2023-04-03 16:23:04 +02:00
Ewout Stortenbeker
8ac23ac91d conform to new acebase-core types 2023-04-03 16:14:43 +02:00
Ewout Stortenbeker
f1d3b07c7f more verbose logging 2023-04-03 16:13:17 +02:00
Ewout Stortenbeker
a4496f11d0 invalidate index cache upon relevant path changes 2023-04-03 16:12:35 +02:00