question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Found key was not removed

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PierceZcommented, Aug 2, 2017

@Martinsos no problem.

I actually confused myself, because this issue is from about a month ago. I had forgotten what I was referencing in my actual code. After figuring it out again, I just copied the actual code and changed the references.

Anyway, I’m glad you could reproduce it.

0reactions
greenrobotcommented, Aug 26, 2017

@PierceZ We think all issues are resolved with 0.9.16-RC. Please let us know if we missed something!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Key Stuck in Lock? Here Are 3 Easy Ways to Remove It
Method 2: Lubricate the lock. If stabilizing the cylinder on your house's lock doesn't work, it might not be a loose plug causing...
Read more >
Reasons For A Car Key Stuck In Ignition And How To Remove It
Sometimes, it is common to have a key stuck in ignition; other times, it indicates a real problem with the ignition lock switch....
Read more >
How to Remove Key Stuck in Ignition | Ernie's Lock
Jiggling the key – Another easy method for removing a stuck key is to push down on the key cylinder with your left...
Read more >
'Not Found' when deleting key from a Python Dictionary
I'm trying to iterate through a Python dictionary using a for loop and then delete one of the keys/value pairs but I'm getting...
Read more >
How to recover the private key of an SSL certificate in an IIS ...
From the File menu, choose Add/Remove Snap-in. 4. ... If the private key was not recovered successfully, you will need to generate a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found