Find problem in eXtremeDB

class table1

{

char<8>    f1;

char<80>  f2;

uint4        f3;

uint4        f4;

double     f5;

uint4        f6;

uniquetree<f1,f2> Idx1;

tree<f6>Idx2; 

};

 

Steps:

step1findIdx1=ab)),find the records;

step2putf6,c;

step3findIdx1=ab)),did not find the record instep 1.

 

The record should 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 the

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 the

updates for the object including indexcomponents are discarded. (Committing a

transaction implicitly checkpoints all theobjects created, updated or deleted in the

transaction.)


Updating f6causes the object to be removed from all indexes.  Using _checkpoint()after _put() is the correct approach.



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值