Skip to content

Found key was not removed #124

@PierceZ

Description

@PierceZ

I'm seeing this logged a bunch when I call remove() on a Query:
Found key was not removed: 123

Query looks like this:
dataBox.query().equal(Data_.parentId, parentId).build().remove();

It's being run inside boxStore.runInTx().

The thing is, Data has 0 rows at this point. And the IDs it's logging are not part of Data.

The IDs are actually part of another table, let's call it OtherData. They aren't related in any way. Why is it logging out that some keys weren't removed for a different table? Even if it was the correct table, I'm not sure why it's logging this at all.

EDIT: On further inspection, it seems like it's logging this for every similar query, regardless of the table. I have a 3rd table (let's call it ThirdTable) where I'm performing a similar query, it does have some data that is being removed, but it also logs out "Found key was not removed" for every row in the OtherData table.

Also, when the transaction finishes when I have 2 of these queries, it logs out: "Illegal state: Tx destroyed/inactive, writeable cursor still available".

If I comment one out, it doesn't log the illegal state message.

Normally I'm seeing a bunch of "Found key was not removed" for each key, and then a 2nd time when it runs the 2nd query, and then at the end when the transaction is complete, I get the illegal state message. Aside from the logs, it seems to be all working properly though. All the data looks correct.

Also, I forgot to mention. ThirdTable has a 1 to many relation with Data, as in, ThirdTable has a list of Data, and Data has one ThirdTable. I'm using @Relation and @Backlink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions