cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yang <teddyyyy...@gmail.com>
Subject help with CommitLog code?
Date Fri, 19 Aug 2011 00:41:14 GMT
I'm reading the commitLog code since I have some similar logic in my
application code,
so that I could benefit from the same techniques that CommitLog code uses.

I see that
CommitLog.add(RowMutation rowMutation) {
        executor.add(new LogRecordAdder(rowMutation));
}

while executor could be the parallel  BatchCommitLogExecutorService(),
which by default
has 32 writer threads.

I wonder how the CommitLog code is able to avoid writing garbled
result on the file,
since if multiple LogRecordAdder() are all executed at the same time,  they run
currentSegment().write() ====> SequentialWriter.write() , is it
possible that their output will overlap??


Thanks  l lot
Yang

Mime
View raw message