Closed WenyXu closed 1 week ago
The updates in this change set involve additions and modifications to the migration logic, including functions for handling partitions and procedures asynchronously. New functions fetch_partition
and procedure_state
, adjustments to existing functions to accept references, and the introduction of the Migration
struct enhance the code's robustness and manageability. These refinements aim to streamline the process and ensure seamless execution during migrations.
File | Summary |
---|---|
tests-fuzz/src/utils/partition.rs |
Added new fetch_partition function; modified fetch_partitions and region_distribution functions. |
tests-fuzz/src/utils/procedure.rs |
Changed procedure_state to accept reference to string slice; altered wait_for_procedure_finish . |
tests-fuzz/targets/migration/… |
Significant migration logic changes: restructuring, updating dependencies, and new functions for procedures. |
sequenceDiagram
participant Client
participant MigrationLogic as Migration Logic
participant DB as Database
participant Utils as Utils
Client->>MigrationLogic: InitiateMigration()
MigrationLogic->>DB: query(region_id)
DB-->>MigrationLogic: return region details
MigrationLogic->>Utils: fetch_partition(region_id)
Utils->>DB: SQL query to fetch partition
DB-->>Utils: return Partition
Utils-->>MigrationLogic: Partition result
MigrationLogic->>DB: execute migration steps
MigrationLogic->>Utils: wait_for_procedure_finish(procedure_id)
Utils->>DB: query procedure_state(procedure_id)
DB-->>Utils: return procedure state
Utils-->>MigrationLogic: procedure state
MigrationLogic-->>Client: Migration completed
By the bytes and lines so bright,
We fetch partitions through the night.
Procedures state with strings in hand,
Migration flows across the land.
Code refactored, strong and lean,
In each commit, a clearer scene.
✨🔧🥕
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Attention: Patch coverage is 0%
with 19 lines
in your changes missing coverage. Please review.
Project coverage is 84.69%. Comparing base (
22f4d43
) to head (cda9f86
). Report is 1 commits behind head on main.
I hereby agree to the terms of the GreptimeDB CLA.
Refer to a related PR or issue link (optional)
What's changed and what's your intention?
check the migration result instead of check procedure state
Checklist
Summary by CodeRabbit
New Features
Improvements