Hi Jaln,

No, both are different. I hope you are asking about 'entry log' files and
'journal' files

*Journal : *When client performs a write operation (such as adding an entry
etc), it is first recorded in the journal file. Journal will be flushed and
synced after every write operation before a success code is returned to the
client. This ensures that no operation is lost due to machine failure.

*Entry Log : *It is not updated for every write operation, bookie server
will do it lazily. Because writing out the ledger involves - update ledger
index files to faster look up and add entry to the logger file. This will
be a costly operation and will affect the performance.

In Bookie, there is a dedicated thread to play journal transactions and add
it to the logger lazily, this is called as checkpointing operation. This
will be performed periodically, now the data will be persisted to ledger
index files and entry logger. By default the 'flushInterval' is 100
milliseconds. Probably you can configure a bigger value to see the
difference.

*"SyncThread"* is a background thread which help checkpointing. After a
ledger storage is checkpointed, the journal files added before checkpoint
will be garbage collected.

Cheers,
Rakesh


On Sat, Jul 19, 2014 at 1:41 AM, Jaln <[email protected]> wrote:

> Hi,
> is the ledger file and journal file same?
> I run the bookkeeper and generate the bookie,
> inside the bookie, I found the journal file and ledger file are almost
> same.
>
> Best,
> Jialin
>

Reply via email to