The "Update" verb in JDB finds a record in the database, deletes it
(actually: disables it), and then adds an updated version of that
record, as specified.

 

I was running updates on a large scale (changing zeros to a computed
value) and it was taking a few days longer than expected, so I broke it
with jbreak (has worked ok for me before). My hope was to make sure
everything was ok, and then read the values which were still zero and
run the updates on them (so I'd pick up where  left off). The problem
was I was completely unable to specify reading entries where that value
was zero. I could read the values themselves, but if I specified where
value=0, the Read verb behaved as if it wasn't there.

 

I suspected the problem was that JDB was somehow looking at the old
disabled entries, seeing they had value=0, and then  outputting the
corresponding enabled entries, which were mostly updated to have
value>0. To test this, I removed all disabled entries from the mapped
files by hand. This went something like (for each  column number *):

 

c*=:  d0 # c*

d0=:  #~ d0

d1=: 0 2$0

 

c* are all the column files c0, c1, c2,...

d0 is the boolean column specifying disabled/enabled

d1 is just a list of disabled entries

 

This worked, I can now specify where value=0 and get the correct output!

 

However, this is just a hacked together fix for a problem I don't really
understand fully. I'd like to try to duplicate this problem, but it did
take several days of updating for it to crop up, and I haven't seen in
before, though I've done similar updates in the past.

 

 

Jordan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to