acebase icon indicating copy to clipboard operation
acebase copied to clipboard

Removing a large dataset throws RangeError

Open kylerberry opened this issue 1 year ago • 1 comments

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();
  }

kylerberry avatar Jun 05 '23 16:06 kylerberry

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.

ilkkanisula avatar Jun 28 '23 08:06 ilkkanisula