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

Mock implementation part 2 #33

Open
wants to merge 195 commits into
base: raftstore-proxy-backup
Choose a base branch
from

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Sep 27, 2021

What problem does this PR solve?

  1. Add support for AdminCmds with consistency checking
  2. Make several integration tests compactible
  3. Fix several unstable test cases
  4. Add support for grcov
  5. Add some new tests such as read batch index

What is not included in this PR:

  1. Try to return NotFound in several cases
  2. Make applying raft write commands async

Problem Summary:

What is changed and how it works?

Proposal: xxx

What's Changed:

Related changes

  • PR to update pingcap/docs/pingcap/docs-cn:
  • PR to update pingcap/tidb-ansible:
  • Need to cherry-pick to the release branch

Check List

Tests

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

Side effects

  • Performance regression
    • Consumes more CPU
    • Consumes more MEM
  • Breaking backward compatibility

Release note

Support more test cases and enhance stability of all test cases

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
.github/workflows/ci-test.sh Outdated Show resolved Hide resolved
components/test_raftstore/src/cluster.rs Outdated Show resolved Hide resolved
components/test_raftstore/src/cluster.rs Outdated Show resolved Hide resolved
mock-engine-store/src/lib.rs Outdated Show resolved Hide resolved
mock-engine-store/src/lib.rs Outdated Show resolved Hide resolved
mock-engine-store/src/lib.rs Show resolved Hide resolved
mock-engine-store/src/lib.rs Show resolved Hide resolved
mock-engine-store/src/lib.rs Show resolved Hide resolved
mock-engine-store/src/lib.rs Outdated Show resolved Hide resolved
Comment on lines 737 to 741
if snaps.len > 0 {
ffi_interfaces::EngineStoreApplyRes::Persist
} else {
ffi_interfaces::EngineStoreApplyRes::None
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we reutrn Persist directly ?

Copy link
Member Author

@CalvinNeo CalvinNeo Nov 2, 2021

Choose a reason for hiding this comment

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

I find in tiflash, apply state persistence can be skipped, when the snapshot is empty. So I think I should also mock this behavior.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Before pingcap/tiflash#1811, BR/Lightning may let ingest sst cmd contain only one CF. It may cause that tiflash can not flush all region cache into column storage and region->dataSize() will be bigger than 0. After write&default cf sst ingested, tiflash can flush all and region->dataSize() will be 0.

Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
@CalvinNeo CalvinNeo requested a review from solotzg November 3, 2021 03:23
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
Signed-off-by: CalvinNeo <calvinneo1995@gmail.com>
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.

2 participants