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

WriteThread::EnterAsBatchGroupLeader reorder writers #12138

Closed
wants to merge 4 commits into from

Conversation

mm304321141
Copy link
Contributor

Reorder writers list to allow a leader can take as more commits as possible to maximize the throughput of the system and reduce IOPS.

@mm304321141
Copy link
Contributor Author

@siying @ajkr @igorcanadi @riversand963 @IslamAbdelRahman @maysamyabandeh
Does anyone want to review this PR? It should be very useful on special ...

Copy link
Contributor

@ajkr ajkr left a comment

Choose a reason for hiding this comment

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

Makes sense. Thanks!

Comment on lines 467 to 475
// @leader, n1, *n2, n3, *newest_writer
// @leader, *n2, n3, *newest_writer, n1
// @leader, @n2, n3, *newest_writer, n1
// @leader, @n2, @newest_writer, n1, n3
// case A
// @leader, @n2, @newest_writer, n1, n3
// case B
// @leader, @n2, @newest_writer, n4 n1, n3
// @leader, @n2, @newest_writer, n1, n3, n4
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please describe the notation above the comment?

My understanding is

  • Each line before the "case"s is the state at the beginning of an iteration of the while-loop
  • Each "case" is a possible state at the end of the function
  • Items prefixed by @ have been included in write_group
  • Items prefixed by * share the same options as write_group, but have not been included yet
  • Items after several spaces are in r_list, temporarily separated from the main list

Copy link
Contributor

Choose a reason for hiding this comment

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

Done. Let me know if you disagree with any of the changes I made.

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mm304321141 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@mm304321141 has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot
Copy link
Contributor

@ajkr has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@ajkr merged this pull request in 1fa5dff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants