cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Preston Chang <zhangyf2...@gmail.com>
Subject sync commitlog in batch mode lose data
Date Tue, 31 May 2011 07:45:38 GMT
Hi,

I have a cluster with two nodes (node A and node B) and make a test as
follows:

1). set commitlog sync in batch mode and the sync batch window in 0 ms
2). one client wrote random keys in infinite loop with consistency level
QUORUM and record the keys in file after the insert() method return normally
3). unplug one server (node A) power cord
4). restart the server and cassandra service
5). read the key list generated in step 2) with consistency level ONE

I thought the result of test is all the key in list can be read normally,
but actually there are some NotFound keys.

My question is why there are NotFound keys. In my opinion server would not
ack the client before finishing syncing the commitlog if I set commitlog
sync in batch mode and the sync batch window in 0 ms. So if the insert()
method return normally it means the mutation had been written in commitlog
and the commitlog had been synced to the disk. Am I right?

My Cassandra version is 0.7.3.

Thanks for your help very much.

-- 
by Preston Chang

Mime
View raw message