Skip to content

PageStorage: WALStore#3891

Merged
ti-chi-bot merged 23 commits intopingcap:masterfrom
JaySon-Huang:ps_walstore
Jan 26, 2022
Merged

PageStorage: WALStore#3891
ti-chi-bot merged 23 commits intopingcap:masterfrom
JaySon-Huang:ps_walstore

Conversation

@JaySon-Huang
Copy link
Contributor

What problem does this PR solve?

Issue Number: a part of #3594, WALStore implementation

What is changed and how it works?

  • Add InMemoryPageDirectory that only stores the latest version of entry for restoring and compact logs in WALStore
  • Serializing/Deserializing PageEntriesEdit as WAL record
  • Implement compact logs to make the restore time more reasonable

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot
Copy link
Member

ti-chi-bot commented Jan 19, 2022

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • jiaqizho

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Details

Reviewer can indicate their review by submitting an approval review.
Reviewer can cancel approval by submitting a request changes review.

@ti-chi-bot ti-chi-bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 19, 2022
@JaySon-Huang
Copy link
Contributor Author

Need to add more tests currently.

@JaySon-Huang JaySon-Huang force-pushed the ps_walstore branch 4 times, most recently from 42b2481 to ce91533 Compare January 21, 2022 11:28
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

1 similar comment
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

3 similar comments
@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang JaySon-Huang force-pushed the ps_walstore branch 2 times, most recently from d18c73c to 26978e8 Compare January 25, 2022 02:08
@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

@JaySon-Huang
Copy link
Contributor Author

@jiaqizho PTAL

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 25, 2022

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/1156/cobertura/
(Coverage detail url is limited office network access)

lines: 45.1% (52356 out of 116141)
branches: 7.1% (90625 out of 1277280)

@jiaqizho jiaqizho self-requested a review January 25, 2022 02:46
Copy link
Contributor

Choose a reason for hiding this comment

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

we not support multi-path yet. how about just used delegator->defaultPath replace L22-34.

Copy link
Contributor Author

@JaySon-Huang JaySon-Huang Jan 25, 2022

Choose a reason for hiding this comment

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

I prefer to keep it since we need to write the same code later. Just keep the assertion for TODO.

Copy link
Contributor

@jiaqizho jiaqizho left a comment

Choose a reason for hiding this comment

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

So I think the logical in PageDirectory restore, should put into PageStorageImpl?

cause we also need BlobStore restore, eq. restore the BlobStats and rebuild the inside spacemap.

Copy link
Contributor

Choose a reason for hiding this comment

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

how about changing the LogFilenameSet to list and pop_back?

Copy link
Contributor Author

@JaySon-Huang JaySon-Huang Jan 25, 2022

Choose a reason for hiding this comment

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

  1. I use the sorted set to keep the order of restoring log files
  2. The LogFilename only store some string and don't contains any fd, so I think releasing them by list::pop_back is not very necessary

I'm not sure whether we still need this ordering after we

  • persisted REF as PUT
  • use CollapsingPageDirectory to restore data and only keep the largest version of entry

maybe come back to it later?

@JaySon-Huang
Copy link
Contributor Author

/run-unit-test

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 25, 2022

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/1174/cobertura/
(Coverage detail url is limited office network access)

lines: 45.1% (52381 out of 116163)
branches: 7.1% (90639 out of 1277294)

@JaySon-Huang
Copy link
Contributor Author

/run-all-tests

Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
Signed-off-by: JaySon-Huang <tshent@qq.com>
@ti-chi-bot ti-chi-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jan 26, 2022
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

DetailsCommit hash: d8ff1f8

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Jan 26, 2022
@JaySon-Huang
Copy link
Contributor Author

/merge

@ti-chi-bot
Copy link
Member

@JaySon-Huang: It seems you want to merge this PR, I will help you trigger all the tests:

/run-all-tests

You only need to trigger /merge once, and if the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

If you have any questions about the PR merge process, please refer to pr process.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 26, 2022

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/1194/cobertura/
(Coverage detail url is limited office network access)

lines: 45.1% (52458 out of 116360)
branches: 7.1% (90768 out of 1277726)

@sre-bot
Copy link
Collaborator

sre-bot commented Jan 26, 2022

Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/1198/cobertura/
(Coverage detail url is limited office network access)

lines: 45.1% (52452 out of 116380)
branches: 7.1% (90753 out of 1277738)

@ti-chi-bot ti-chi-bot merged commit cc71835 into pingcap:master Jan 26, 2022
@JaySon-Huang JaySon-Huang deleted the ps_walstore branch January 26, 2022 04:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants