Closed donl closed 2 years ago
If I follow the stack trace it looks like you are adding those objects to the root node of the db, is that right?
This line sets the tree.id
:
https://github.com/appy-one/acebase/blob/74a2c54f8ace839dfda0cd19b05184ef3566bf91/src/storage/binary/index.js#L2568
If path === ''
, so will tree.id
be and fail the assertion with given error.
Can you try changing the line above to tree.id = 'path:' + this.address.path;
and let me know if that fixes it?
Correct, these objects were being added to the root node.
I patched the code on the server
. I replaced my server
's /node_modules/acebase with your repo, made the change and built acebase
. The error still occurred. Do I need to try and update my acebase-client
app as well?
Starting with a fresh db, this is what I'm seeing upon database creation...
[mydb] DEBUG THIS: getNodeInfo error DetailedError: Set tree.id property to something unique for locking purposes
at BinaryBPlusTree._threadSafe (/ace-server-test/node_modules/acebase/src/btree/binary-tree.js:853:19)
at BinaryBPlusTree.findAll (/ace-server-test/node_modules/acebase/src/btree/binary-tree.js:1539:21)
at createStreamFromBinaryTree (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:2589:44)
at start (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:2551:24)
at async NodeReader.getChildInfo (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:2872:9)
at async AceBaseStorage.getNodeInfo (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:1763:33)
at async AceBaseStorage.getNodeInfo (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:1739:36)
at async AceBaseStorage.getNodeInfo (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:1739:36)
at async AceBaseStorage.getNode (/ace-server-test/node_modules/acebase/src/storage/binary/index.js:1629:30)
at async AceBaseStorage.transactNode (/ace-server-test/node_modules/acebase/src/storage/index.js:1119:26) {
code: 'tree-id-not-set',
originalError: null
}
I must be missing a step. It looks like after running npm run build
in the acebase
directory, my modification to acebase/src/storage/binary/index.js
is being reverted.
When I only edit the .js file (without additional building) I am seeing these types of messages when attempting to log in and being stuck waiting for the server to respond.
storage.getNode "/__auth__/accounts/admin") is taking a long time to complete
I must be missing a step. It looks like after running
npm run build
in theacebase
directory, my modification toacebase/src/storage/binary/index.js
is being reverted.
Yes, that's why I asked to change the .js file, that would have been the only needed change. If you'd change the .ts file you would have needed to rebuild, I wanted to save you the hassle ;-)
I am seeing these types of messages when attempting to log in and being stuck waiting for the server to respond. storage.getNode "/auth/accounts/admin") is taking a long time to complete
Are you logging in while your bulk adds are being processed?
The login was on a fresh server / database file. I wasn't able to proceed any further. I'll try another fresh server setup with no authentication.
The npm installed acebase
package didn't have the .js
files you referenced. Going off your git repo, I was more out of my element -- but a good lesson for me none the less. :)
Did you update acebase-server
after I fixed https://github.com/appy-one/acebase-server/issues/40 ?
Because if you didn't, you are now using a newer acebase
version than your old acebase-server
package expects - that might cause issues.
Hi Don, I published the fix in acebase
v1.25.2
Let me know if you still see that last error you reported after updating acebase-server
to the latest version
I just ran into this error. I'll see if I can get you something reproducible. This is from an
acebase-server
that was having dummy data (2k small objects) added from a remote client.