Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chunkserver: fix crc issues #405

Merged
merged 1 commit into from
Jul 9, 2021

Conversation

SeanHai
Copy link
Contributor

@SeanHai SeanHai commented Jul 1, 2021

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

What's Changed:

How it Works:

Side effects(Breaking backward compatibility? Performance regression?):

Check List

  • Relevant documentation/comments is changed or added
  • I acknowledge that all my contributions will be made under the project's license

@SeanHai
Copy link
Contributor Author

SeanHai commented Jul 1, 2021

recheck

@@ -307,6 +318,10 @@ class CSChunkFile {
return lfs_->Read(fd_, buf, offset + pageSize_, length);
}

inline int readMetaData(char* buf, off_t offset, size_t length) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the existing function?

inline int readMetaPage(char* buf) {
?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not use the existing function?

inline int readMetaPage(char* buf) {

?

done

job->taskLock.WRLock();
job->task.localMap.Clear();
job->task.followerMap.clear();
job->task.waitingNum = 3;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to use

void ListPeers(std::vector<Peer>* peers);
to get the number of replica rather than hard code 3.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's better to use

void ListPeers(std::vector<Peer>* peers);

to get the number of replica rather than hard code 3.

done

request->set_sendscanmaptimeoutms(timeoutMs_);
request->set_sendscanmapretrytimes(retry_);
request->set_sendscanmapretryintervalus(retryIntervalUs_);
if (scanChunkMetaPage) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for scan meta page, you can just set request->set_readmetapage(true), ellipsis set_offset/set_size and member variable chunkMetaPageSize_

Copy link
Contributor Author

@SeanHai SeanHai Jul 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for scan meta page, you can just set request->set_readmetapage(true), ellipsis set_offset/set_size and member variable chunkMetaPageSize_

Although offset and length is not needed in datastore and chunkfile, LOG and build scanmap is need. Otherwise more judgment is needed.

@SeanHai
Copy link
Contributor Author

SeanHai commented Jul 2, 2021

recheck

@SeanHai SeanHai force-pushed the curve_discard_flatten branch 3 times, most recently from 9be32d7 to bfb7ec5 Compare July 5, 2021 02:22
@ilixiaocui ilixiaocui merged commit dc58284 into opencurve:master Jul 9, 2021
ilixiaocui pushed a commit to ilixiaocui/curve that referenced this pull request Feb 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants