In-Memory Chunk Redistribution via Timestamp Feedback
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In a multi-node database cluster, inefficiencies arise when nodes join or leave the cluster, leading to inefficient distribution of work due to outdated chunk-to-node mappings, where nodes may send work to nodes that have not finished loading chunks or are no longer active.
Innovation Solution
Nodes maintain timestamp information, such as registration, global completion, and startup timestamps, to select the appropriate host node for processing work granules, ensuring that only stable host nodes with loaded chunks are chosen, and updating mappings and timestamps during topology changes.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of operation
If nodes send work to host nodes based on chunk-to-node mappings after topology changes, then work distribution appears simple, but work may be sent to nodes that have not finished loading chunks or are no longer active
Solution Approach 1:
The system implements feedback mechanisms where host nodes send completion notifications to coordinating nodes when chunks are successfully loaded. This feedback loop allows the coordinating node to update its knowledge of which nodes have completed loading, ensuring subsequent work is sent only to ready nodes. The feedback resolves the contradiction by maintaining simple work distribution while adding reliability through status awareness.
Solution Approach 2:
The system performs preliminary actions by having host nodes load chunks into memory before being assigned work. The chunk-to-node mapping is established in advance, and nodes begin loading chunks proactively. This preliminary loading ensures that when work arrives, the host node is already ready to process it, eliminating the problem of sending work to nodes that haven't finished loading.
2Productivity
If the cluster redistributes chunks to newly joined nodes, then data distribution becomes more balanced, but nodes may send work to nodes that have not finished loading chunks
Solution Approach 1:
During redistribution, the system uses feedback mechanisms where coordinating nodes track which nodes have completed loading their assigned chunks. Work is sent only after receiving confirmation that the host node has finished loading, preventing work waiting time while maintaining balanced distribution. The feedback ensures productivity gains from redistribution are not offset by work delays.
Solution Approach 2:
The chunk-to-node mapping is made dynamic during topology changes, allowing the system to adapt to newly joined nodes in real-time. Rather than static pre-distribution, the system dynamically assigns chunks to available nodes and tracks loading progress. This dynamic approach balances data distribution efficiently while preventing work from being sent too early, eliminating work waiting time.
3Reliability
If the cluster waits for all host nodes to finish loading chunks before sending work, then work is guaranteed to reach ready nodes, but productivity is reduced due to idle time
Solution Approach 1:
Instead of waiting for all nodes to finish loading, the system uses feedback mechanisms where coordinating nodes receive completion notifications as they arrive. Work is sent immediately upon receiving confirmation that a host node is ready, rather than waiting for all nodes. This feedback-driven approach maintains reliability by ensuring work reaches ready nodes while improving productivity by eliminating idle waiting time.
Solution Approach 2:
The system accepts that some work may need to be resent if a node fails or is slow to load, rather than waiting for all nodes. This approach treats work assignment as a potentially disposable operation that can be retried, maintaining reliability through redundancy while improving productivity by not blocking on slow nodes. The cost of potential reassignment is acceptable compared to the productivity loss from waiting.
4Device complexity
If outdated chunk-to-node mappings are used after node removal, then the system maintains simple mapping logic, but work is sent to nodes that are no longer active
Solution Approach 1:
The system implements feedback mechanisms where host nodes notify coordinating nodes of their status changes, including when they leave the cluster. This feedback allows the mapping to be updated automatically without complex manual intervention. The feedback resolves the contradiction by keeping mapping logic simple while ensuring reliability through real-time status awareness.
Solution Approach 2:
The system uses self-service mechanisms where the cluster automatically detects and handles topology changes without external intervention. When a node leaves, the system automatically updates the chunk-to-node mapping through self-service protocols, maintaining simple logic while ensuring reliability. The automatic self-service update prevents work from being sent to inactive nodes without adding complex manual management overhead.
Data Source
AI summary
Techniques are described herein for executing queries on distinct portions of a database object that has been separate into chunks and distributed across the volatile memories of a plurality of nodes in a clustered database system. The techniques involve redistributing the in-memory database object portions on changes to the clustered database system. Each node may maintain a mapping indicating which nodes in the clustered database system store which chunks, and timestamps indicating when each mapping entry was created or updated. A query coordinator may use the timestamps to select a database server instance with local in memory access to data required by a portion of a query to process that portion of the query.


