Find problem in eXtremeDB, problemtremedb
Class table1
{
Char <8> f1;
Char <80> f2;
Uint4 f3;
Uint4 f4;
Double f5;
Uint4 f6;
Uniquetree <f1, f2> Idx1;
Tree <f6> Idx2;
};
Steps:
Step 1: find (Idx1 = (a, B), find the records;
Step 2: put (f6, c );
Step 3: find (Idx1 = (a, B), did not find the record instep 1.
The record shoshould be there, what happened when the putmethod is used, the index is changed after _ put method?
If a class has one or more indexes, thenthe field (s) on which the index is defined
Will have an index component (hash tableentry or tree node) in addition to
Actual field value. The index component isnot updated when the field's _ put ()
Function is called, but rather when theREAD_WRITE transaction containing this
Update is committed. Or, alternatively, a_checkpoint () function can be called
To explicitly update the index componentsfor this object. The _ checkpoint ()
Function completes the object's update before the transaction is committed,
However if the application decides to rollback the current transaction, all
Updates for the object including indexcomponents are discarded. (Committing
Transaction implicitly checkpoints all theobjects created, updated or deleted in
Transaction .)
Updating f6causes the object to be removed from all indexes. Using _ checkpoint () after _ put () is the correct approach.