Data Table Migration Around Query Locks and Cold Data States
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data migration in data storage systems reduces system performance due to incomplete perception of data tables during migration and potential query failures when data query tasks are ongoing.
Innovation Solution
A data migration method that determines the hot and cold state of data tables and performs migration only after data locks are released to ensure ongoing query tasks are completed, thereby avoiding performance degradation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If data migration is performed without checking data lock status, then migration speed is improved, but data query task reliability deteriorates
Solution Approach 1:
The patent checks the data lock status before initiating the migration operation. This preliminary check ensures that if a data query task is currently executing (indicated by a locked data table), the migration will be deferred until the lock is released, thereby preventing query failures while maintaining efficient migration when conditions are favorable
2Productivity
If data migration is performed immediately without waiting for lock release, then migration efficiency is improved, but system stability deteriorates
Solution Approach 1:
The patent implements a dynamic migration strategy where the migration operation adapts to the current system state. When the data table is locked, migration is postponed; when unlocked, migration proceeds immediately. This dynamic adjustment optimizes migration efficiency while maintaining system stability by avoiding conflicts with ongoing query operations
3Loss of time
If data migration is performed during ongoing query tasks, then migration time is reduced, but query performance deteriorates
Solution Approach 1:
The patent implements a feedback mechanism by continuously monitoring the data lock status. The migration operation receives feedback about the current query task state (locked/unlocked) and adjusts its execution accordingly. This feedback loop ensures migration occurs at optimal moments when it will not interfere with query performance, while minimizing overall migration time
Data Source
AI summary
A data migration method, electronic device, and storage medium are provided. The method includes: obtaining a hot and cold state of a data table to be processed; in response to the hot and cold state indicating that the data in the data table to be processed is cold data, determining whether the data table to be processed is associated with a data lock, where the data table to be processed being associated with the data lock indicates that a data query task that needs to query the data table to be processed exists, and the data table to be processed not being associated with the data lock indicates that the data query task does not exist; and in response to the data table to be processed being associated with the data lock, performing a migration operation on the data table to be processed after the data lock is released.


