lost index information

28 views
Skip to first unread message

liulei

unread,
Jul 24, 2011, 4:14:34 AM7/24/11
to Krati
I am studying the Krati code, I find the indexes are stored into
instance of PreFillEntryLong first in memory, and when the Entry is
full, the indexes are stored to disk.

If before the indexes are stored to disk, my machine is crash, the
indexes in memory will be losted.

Is this bug of Krati?


Thanks,

LiuLei

Jingwei

unread,
Jul 24, 2011, 6:52:29 PM7/24/11
to Krati
Hi,

This is an intended design rather than a bug.

A PreFillEntryLong is essentially a batch of updates occurred over
time. Such a batch is flushed to disk upon the entry/batch is full. If
a system crash occurred before the current entry/batch is flushed,
there is no guarantee that updates from the current batch is available
for read upon restart. However, the indexes.dat maintains a SCN
(monotonically increasing system change number) from the last
successfully flushed batch. Such a SCN represents a checkpoint, from
where a client should re-apply lost updates.

Thanks.

Jingwei

lei liu

unread,
Jul 24, 2011, 10:07:11 PM7/24/11
to kr...@googlegroups.com
Thanks jingwei for you reply.

How can I receive
SCN in indexes.dat ?


Thanks,

LiuLei

2011/7/25 Jingwei <jingw...@gmail.com>

Jingwei

unread,
Jul 25, 2011, 3:07:54 AM7/25/11
to Krati
The subclasses of Persistable has a method called getLWMark(), which
gives you the last SCN to use upon restart.

However, DataStore interface does not give you a way to getLWMark().
Your application will need to maintain external scn explicitly.

Thanks.

Jingwei

On Jul 24, 7:07 pm, lei liu <liulei...@gmail.com> wrote:
> Thanks jingwei for you reply.
>
> How can I receive SCN in indexes.dat ?
>
> Thanks,
>
> LiuLei
>
> 2011/7/25 Jingwei <jingwei...@gmail.com>
Reply all
Reply to author
Forward
0 new messages