Refine the GC interface by PageEntriesEdit#3879
Conversation
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by submitting an approval review. |
|
/run-all-tests |
There was a problem hiding this comment.
not sure WALStore need gc or we can make it more simple?
There was a problem hiding this comment.
There are two approaches:
- Stopping the foreground write and dump the MVCCDirectory into a new LogFile to replace all files before it
- Select some LogFiles and compact them in a background thread
I prefer 2 cause it doesn't stall the foreground writes
There was a problem hiding this comment.
While 1 will stop the foreground writes, and the stop duration is proportional to the size of MVCC Directory.
jiaqizho
left a comment
There was a problem hiding this comment.
It's just a suggestion, can we finish the WalStore in this pr, in this case, the changes to the interface can be done together?
There was a problem hiding this comment.
After digging into current gc routine implementation, we only use PageEntriesEdit:: upsertPage in BlobStore::gc (with version set in the same time). WriteBatch::upsert is not a valid input.
https://github.com/pingcap/tics/blob/ded8a062b9f777ccfd70087f6341feac725bcb08/dbms/src/Storages/Page/V3/BlobStore.cpp#L406
There was a problem hiding this comment.
so we do have wal->apply already , can we just use it? or is there remain some work for it?
There was a problem hiding this comment.
We need to set a proper version for edits written from PageDirectory::apply...
https://github.com/pingcap/tics/blob/ded8a062b9f777ccfd70087f6341feac725bcb08/dbms/src/Storages/Page/V3/WALStore.cpp#L136-L142
... While in PageDirectory::gcApply, we use the existing version
https://github.com/pingcap/tics/blob/ded8a062b9f777ccfd70087f6341feac725bcb08/dbms/src/Storages/Page/V3/PageDirectory.cpp#L279-L300
There was a problem hiding this comment.
I am not sure we need ptr to refine WALStore.
And I don't see we init it in the constructor?
There was a problem hiding this comment.
I use WALStore::create to create it in restore instead of during the constructor of PageDirectory::PageDirectory now, so it need to be a ptr.
I may refactor PageDirectory to make it construct by a static method create, so that we do not get a PageDirectory instance that is created but without restoring existing data from disks.
I've created #3891 for the full implementation of WALStore. That PR contains lots of changes files (1300 lines over 23 files). |
7487e4f to
40d6c35
Compare
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>
40d6c35 to
fd4bbbb
Compare
|
Should get #3897 merged first. |
Signed-off-by: JaySon-Huang <tshent@qq.com>
|
/merge |
|
@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 If you have any questions about the PR merge process, please refer to pr process. DetailsInstructions 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. |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 4057c79 |
|
Coverage detail: https://ci-internal.pingcap.net/job/tics_ghpr_unit_test/1074/cobertura/ lines: 44.7% (51509 out of 115198) |
What problem does this PR solve?
Issue Number: a part of #3594; a part of WALStore implementation
Problem Summary:
PageEntriesEditto unify the data exchange structure betweenBlobStoreandPageDirectoryWhat is changed and how it works?
Check List
Tests
Side effects
Documentation
Release note