insert sometimes doesn't insert anything

This forum is to report technical problems with Rel.
Post Reply
HughDarwen
Posts: 121
Joined: Sat May 24, 2008 4:49 pm

insert sometimes doesn't insert anything

Post by HughDarwen » Mon Sep 09, 2019 5:02 pm

This might have to be just a heads up to begin with. I can't give a specific example at this time because the examples where this bug is hitting me are too complex.

Sometimes, when I give an INSERT command, with a complex expression as source and a target of existing high cardinality, the operation appears to work, telling me how many tuples have been inserted, but I find that none of them have been inserted at all. For example, repeating the same operation tells me the same number have been inserted when it should now be saying zero have been inserted.

In the database where this problem arises I notice that there are a large number of files with names like 00000123.jdb and I am guessing these are where my data is actually stored. I'm wondering if the bug is somehow connected with when new .jdb files need to be created.

Perhaps the bug can be found by code inspection. If not, I'll have to provide a .zip file along with a specific example.

Hugh

Dave
Site Admin
Posts: 367
Joined: Sun Nov 27, 2005 7:19 pm

Re: insert sometimes doesn't insert anything

Post by Dave » Sat Sep 21, 2019 11:42 am

Sorry for the slow response - I've been on holiday.

This sounds like a bug in transaction handling; maybe the INSERT has written in a "write" transaction but is being read in a "read" transaction whilst the "write" transaction is still open and uncommitted.

I've examined the code and can't see anything obvious, particularly as it appears to work under most circumstances. That suggests a threading and/or transaction race condition rather than a simple logic bug.

If you could send me a .zip file that demonstrates the problem it would be most helpful, particularly as I've been unable to replicate it.

Post Reply