Skip to content

tso: eliminate unnecessary abstractions in the allocator #9158

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

Merged
merged 6 commits into from
Apr 1, 2025

Conversation

JmPotato
Copy link
Member

@JmPotato JmPotato commented Mar 19, 2025

What problem does this PR solve?

Issue Number: ref #8802.

What is changed and how does it work?

This commit refactors the TSO allocator components to simplify the architecture:

1. Removed the unnecessary `AllocatorManager` abstraction and its related operations
2. Removed the unnecessary `GlobalTSO term and its related codes
3. Renamed internal methods to be more consistent with their accessibility levels

The refactoring maintains all functionality while making the code more maintainable with fewer abstraction layers.

Check List

Tests

  • Unit test
  • Integration test

Release note

None.

@JmPotato JmPotato added the component/tso Timestamp Oracle. label Mar 19, 2025
@JmPotato JmPotato requested review from lhy1024, okJiang and rleungx March 19, 2025 08:16
@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. dco-signoff: yes Indicates the PR's author has signed the dco. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Mar 19, 2025
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch from 76b222b to d945728 Compare March 19, 2025 09:17
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 90.80460% with 32 lines in your changes missing coverage. Please review.

Project coverage is 75.70%. Comparing base (07c19b1) to head (5396531).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9158      +/-   ##
==========================================
- Coverage   75.81%   75.70%   -0.11%     
==========================================
  Files         477      476       -1     
  Lines       73229    73114     -115     
==========================================
- Hits        55515    55353     -162     
- Misses      14256    14296      +40     
- Partials     3458     3465       +7     
Flag Coverage Δ
unittests 75.70% <90.80%> (-0.11%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Member

@okJiang okJiang left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Mar 20, 2025
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch from d945728 to 2ed6e44 Compare March 26, 2025 05:49
@JmPotato JmPotato requested a review from nolouch March 26, 2025 06:23
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch from 5c870e2 to 2a803fa Compare March 26, 2025 06:47
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch from 2a803fa to b42440c Compare March 31, 2025 09:16
@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 Mar 31, 2025
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch 2 times, most recently from 277ee22 to fbb46d4 Compare March 31, 2025 09:46
@JmPotato JmPotato force-pushed the simplify_allocator_mgr branch from fbb46d4 to e266a37 Compare March 31, 2025 10:18
@ti-chi-bot ti-chi-bot bot added the lgtm label Apr 1, 2025
Copy link
Contributor

ti-chi-bot bot commented Apr 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: okJiang, rleungx

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:

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

@ti-chi-bot ti-chi-bot bot added approved and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Apr 1, 2025
Copy link
Contributor

ti-chi-bot bot commented Apr 1, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-03-20 07:41:04.055260703 +0000 UTC m=+514157.739496800: ☑️ agreed by okJiang.
  • 2025-04-01 07:35:19.359786902 +0000 UTC m=+1550613.044022995: ☑️ agreed by rleungx.

@ti-chi-bot ti-chi-bot bot merged commit 6eac733 into tikv:master Apr 1, 2025
25 checks passed
@JmPotato JmPotato deleted the simplify_allocator_mgr branch April 1, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved component/tso Timestamp Oracle. dco-signoff: yes Indicates the PR's author has signed the dco. 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.

3 participants