mirror of
https://github.com/appy-one/acebase.git
synced 2026-05-25 06:02:14 -06:00
[GH-ISSUE #20] storage-custom.js:1142 Assertion failed: Merging child values can only be done if existing and current values are both an array or object #19
Labels
No labels
IndexedDB
browser
bug
dependencies
documentation
duplicate
enhancement
feature request
indexes
indexes
invalid
pull-request
query
question
transaction logging
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @appy-one on GitHub (Mar 11, 2021).
Original GitHub issue: https://github.com/appy-one/acebase/issues/20
Originally assigned to: @appy-one on GitHub.
I got this assertion failure in
CustomStorage.getNode(). It was trying to merge a standalone string value (stored in its own record because of its size) with the parent object, which also has an (old, shorter) string value stored inline. Apparently in some cases, if a large string is saved in its own record, it is not removed when the value is overwritten by a shorter string (being stored in its parent record) - causing 2 versions being saved and clashing ingetNode.This problem occurs in
CustomStorageclasses, which is used for IndexedDB and LocalStorage in the browser. Normal AceBase databases are not affected.To reproduce, run in the browser:
I've found the code causing this issue, fix is on its way.
@appy-one commented on GitHub (Mar 11, 2021):
Issue was introduced in v1.1.3 while improving IndexedDB performance for #10
Fix published with v1.2.3 - Nodes that cannot be merged in
getNodewill now be ignored, only printing a console error. Once the node is updated again, the db should be ok again and the error should disappear.