[GH-ISSUE #231] Removing a large dataset throws RangeError #107

Open
opened 2026-05-23 08:30:57 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @kylerberry on GitHub (Jun 5, 2023).
Original GitHub issue: https://github.com/appy-one/acebase/issues/231

Originally assigned to: @appy-one on GitHub.

Hi, I'm working with the local instance of AceBase. I have an an index of Things that has ~100k records in it. Attempting to drop those records to do a fresh data import results in the following error:
RangeError: Maximum call stack size exceeded

Example code:

  public _drop() {
    return this.db.ref('Things').remove();
  }
Originally created by @kylerberry on GitHub (Jun 5, 2023). Original GitHub issue: https://github.com/appy-one/acebase/issues/231 Originally assigned to: @appy-one on GitHub. Hi, I'm working with the local instance of AceBase. I have an an index of `Things` that has ~100k records in it. Attempting to drop those records to do a fresh data import results in the following error: `RangeError: Maximum call stack size exceeded` Example code: ``` public _drop() { return this.db.ref('Things').remove(); } ```
Author
Owner

@ilkkanisula commented on GitHub (Jun 28, 2023):

It would help developer if you can clone this repo and write new failing unit test case with your example. See existing tests in repo for example.

As a workaround I guess you could write loops to iterate your dataset using existing api calls to make smaller remove patches.

Root cause of this error you are seeing is probably a recursion that code uses to walk the database tree.

<!-- gh-comment-id:1610982956 --> @ilkkanisula commented on GitHub (Jun 28, 2023): It would help developer if you can clone this repo and write new failing unit test case with your example. See existing tests in repo for example. As a workaround I guess you could write loops to iterate your dataset using existing api calls to make smaller remove patches. Root cause of this error you are seeing is probably a recursion that code uses to walk the database tree.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/acebase#107
No description provided.