baidu / baidu/bfs

block read might miss some data

Open
#814 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.8k
Forks
551
PR merge metrics
No merged PRs in 30d

Description

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_buf_list_ --> block buf

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

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in the chunk server's Block::Read entry point and trace the path from diskfile through block_buf_list_ to the block buffer. Compare that path with writes entering recv_window_ while a read is in progress, and determine whether concurrent operations can omit or mix data; done means the behavior is confirmed and the required read/write handling is clearly defined.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.