Bug #9896
Record reference count should account for dirty records
Start date:
Due date:
% Done:
0%
billable:
No
vendor_id:
GCD
case_num:
version_reported:
version_resolved:
reviewer:
production:
No
env_name:
topics:
Related issues
History
#1 Updated by Alexandru Lungu over 1 year ago
- Assignee set to Alexandru Lungu
First problem¶
Dirty records are not accounted for the reference count, so that a dirty record referenced in two buffers will always have reference count 1. This was fixed already in 9769a! But due to the fact that #8388 is not yet it trunk, there are some regressions with dirty share.
Semi-flush on buffer out of scope¶
procedure seed:
create dsUnique.
dsUnique.pi = "a".
end. // NO WRITE TRIGGERS
procedure getId:
def buffer buf0 for dsUnique.
find first buf0 no-error. // simply load the buffer that is going to run out-of-scope
end. // NO WRITE TRIGGERS
procedure dostuff:
def buffer buf for dsUnique.
do transaction:
for each buf:
delete buf.
end.
end.
do transaction:
run seed. // create record that is visible only on PI index
def var x as int.
run getId. // without this line, the following FIND will fail because it is not visible on test index.
find first buf where test = ? no-lock.
message buf.test. // ?, the initial value
end. // write trigger fired.
end.
run dostuff.
When a buffers runs out of scope and the record is multiply referenced, it becomes visible on all indices, but the write trigger is not called! This means that is should be part of the dirty-share database without actually flushing it. This can be integrated in #8388.
#4 Updated by Alexandru Lungu 10 months ago
- Related to Bug #10542: Write trigger called when multiple buffers reference the same record added