PageStorage v3 modules combine.#3795
PageStorage v3 modules combine.#3795jiaqizho wants to merge 44 commits intopingcap:masterfrom jiaqizho:ps-v3-combine
Conversation
call test: BlobStoreTest.testBlobStoreGcStats2 Error from - BlobStore::write - BlobStore::getBlobFile - DB::LRUCache - std::map The ptr in __hash:87 will be lost. And if i remove the `ro_ids` in BlobStore.h, it won't show again... Anyway `ro_ids` is useless.
|
[REVIEW NOTIFICATION] This pull request has not been approved. 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. |
Signed-off-by: JaySon-Huang <tshent@qq.com>
Add test for VersionedEntries. Need merge by hand, please wait...
dbms/src/Storages/Page/Page.h
Outdated
|
|
||
| public: | ||
| inline bool isValid() const { return file_id != 0; } | ||
| inline bool isValid() const { return file_id != 0 && file_id != INVALID_BLOBFILE_ID; } |
There was a problem hiding this comment.
Maybe make INVAILD_BLOBFILE_ID be 0?
|
This PR mixes too many changes in different components, suggest splitting these two changes into separate PRs:
|
|
|
||
| bool PageStorageImpl::gc(bool not_skip, const WriteLimiterPtr & write_limiter, const ReadLimiterPtr & read_limiter) | ||
| { | ||
| /// Get all pending external pages and BlobFiles. Note that we should get external pages before BlobFiles. |
There was a problem hiding this comment.
- We should avoid this method being called by more than 1 thread at the same time.
- Return
falseif we didn't do any job this time. So that the scheduler won't call it again in the near future.
|
|
||
| // TBD: wal apply | ||
| } | ||
|
|
There was a problem hiding this comment.
I think we should hold the lock instance in https://github.com/pingcap/tics/pull/3795/files#diff-1de4d86b0ebcbe77efe3ed6316f11350a64cdff662503b1eb9c48741d19a6b72R380
There was a problem hiding this comment.
-
It is hard to locate which lines with the URL you post when the PR changes lots of lines. You should use "view file" to open the file and then copy the URL inside that file.

-
Do you mean this lock in this PR? PageStorage: Fix locks on BlobStore, PageDirectory #3897
https://github.com/pingcap/tics/blob/ca65a7b1b3b359c5b3624b7482fef6f69c01e3fc/dbms/src/Storages/Page/V3/PageDirectory.cpp#L285-L288
There was a problem hiding this comment.
actually, I have fixed some locking issues in this pr.
- In
PageDirectory, due to addedgetSnapshotsStat, then we need to be added write_lock. Before we clear up snapshots ingc. - Fix
max_capmay cause inaccurate issues inBlobStore. There is no need to add more locks in other methods ofBlobStore, because this may lead to reentrancy problems or bring more lock problems, and we only need to ensure thatwrite/read/gchappens at the same time, and there will be no concurrency problems. - If I'm missing something, I'd prefer to fix it in this PR, or after that, so I can use the adapted stress tool to verify it.
| { | ||
| extern const Metric PSMVCCNumSnapshots; | ||
| } // namespace CurrentMetrics | ||
|
|
There was a problem hiding this comment.
Add a [[nodiscard]] mark to VersionedPageEntries::acquireLock.
|
@jiaqizho: PR needs rebase. 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 kubernetes/test-infra repository. |
|
@JaySon-Huang @flowbehappy |
What problem does this PR solve?
Issue Number: a part of #3594
Problem Summary:
What is changed and how it works?
remain
HeavySkewWriteRead.cppCheck List
Tests
Side effects
Documentation
Release note