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

KVStore: LargeTxn spill: Read without version col #8746

Merged
merged 45 commits into from
Feb 19, 2024

Conversation

CalvinNeo
Copy link
Member

@CalvinNeo CalvinNeo commented Feb 1, 2024

What problem does this PR solve?

Issue Number: ref #8736

Problem Summary:

  1. Introduce RegionUncommittedDataList for uncommitted key-values that could be spilled.
  2. Refactor getSchemaSnapshotAndBlockForDecoding and RegionBlockReader that can create a Block with no version col.
  3. Introduce AtomicReadWriteCtx to decouple some logic in writeRegionDataToStorage.

What is changed and how it works?

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 ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 1, 2024
@JaySon-Huang JaySon-Huang changed the title BigTxn: KVStore spill part 1 KVStore: LargeTxn spill part 1 Feb 1, 2024
Signed-off-by: CalvinNeo <[email protected]>
@ti-chi-bot ti-chi-bot bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 2, 2024
@ti-chi-bot ti-chi-bot bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 4, 2024
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
@CalvinNeo
Copy link
Member Author

/run-all-tests

auto col_id = iter->first;
auto & cd = (*(schema_snapshot->column_defines))[iter->second];
if (!has_version_column && cd.id == VersionColumnID)
Copy link
Member Author

Choose a reason for hiding this comment

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

Don't create version col in this case

Signed-off-by: CalvinNeo <[email protected]>
@CalvinNeo
Copy link
Member Author

/run-all-tests

// TODO rename it after we support spill.
// ReadList could be RegionDataReadInfoList
template <typename ReadList>
DM::WriteResult writeRegionDataToStorage(
Copy link
Member Author

Choose a reason for hiding this comment

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

The function should later be renamed to something like writeRegionDataToLowerLayer or something more suitable.

@CalvinNeo CalvinNeo requested a review from JinheLin February 5, 2024 10:19
@CalvinNeo
Copy link
Member Author

/run-all-tests

@CalvinNeo
Copy link
Member Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Feb 8, 2024
@CalvinNeo CalvinNeo changed the title KVStore: LargeTxn spill part 1 KVStore: LargeTxn spill: Read without version col Feb 18, 2024
@CalvinNeo CalvinNeo requested a review from JinheLin February 18, 2024 09:06
f
Signed-off-by: CalvinNeo <[email protected]>
@CalvinNeo CalvinNeo requested a review from JinheLin February 19, 2024 05:15
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
Signed-off-by: CalvinNeo <[email protected]>
@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Feb 19, 2024
Copy link
Contributor

ti-chi-bot bot commented Feb 19, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [JinheLin,Lloyd-Pottiger]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link
Contributor

ti-chi-bot bot commented Feb 19, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-02-08 01:07:55.514418345 +0000 UTC m=+405401.081188235: ☑️ agreed by Lloyd-Pottiger.
  • 2024-02-19 10:46:37.529674352 +0000 UTC m=+267686.277297463: ☑️ agreed by JinheLin.

@CalvinNeo
Copy link
Member Author

/run-all-tests

@CalvinNeo
Copy link
Member Author

/run-unit-test

@ti-chi-bot ti-chi-bot bot merged commit 82a13c4 into pingcap:master Feb 19, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants