baidu / bfs

The Baidu File System.
BSD 3-Clause "New" or "Revised" License
2.86k stars 556 forks source link

block read might miss some data #814

Open cheneydeng opened 7 years ago

cheneydeng commented 7 years ago

hi bfs, I'm reading your chunk server code,and the code in the Block::Read seems might miss some data already written.Now the read data process is: diskfile --> block_buflist --> block buf

However,I think that while someone doing read,someone can write,the writer might add data into "recvwindow".So the correct way i think is: diskfile --> block_buf_list --> recvwindows --> block buf

Through,as the write and read might happen concurrently,the data might be mixed.Is that right?

cheneydeng commented 7 years ago

ping @lylei @bluebore