Commit d5fbbf8
In resource-constrained environments, 10TB-scale 8-parallel processing in cloudberry may encounter specific anomalies related to Motion layer UDP communication. Below are four key scenarios and how the code modifications address them.
Four Anomaly Scenarios
1. Capacity Mismatch:
The receiving end’s buffer becomes full, but the sender is unaware. As a result, the sender’s unacknowledged packet queue continues transmitting, leading to unnecessary retransmissions and packet drops.
2. False Deadlock Detection:
The peer node processes heartbeat packets but fails to free up buffer capacity. This triggers a false deadlock judgment, incorrectly flagging network anomalies.
3. Unprocessed Packets Require Main Thread Wakeup:
When the receive queue is full, incoming data packets are discarded. However, the main thread still needs to be awakened to process backlogged packets in the queue, preventing permanent stalling.
4. Execution Time Mismatch Across Nodes:
Issues like data skew, computational performance gaps, or I/O bottlenecks cause significant differences in execution time between nodes. For example, in a hash join, if the inner table’s is not ready, the node cannot process data from other nodes, leading to packet timeouts.
*Example Plan*: Packets from to (via ) timeout because the in remains unready, blocking packet processing.
Code Modifications and Their Impact
The code changes target the above scenarios by enhancing UDP communication feedback, adjusting deadlock checks, and ensuring proper thread wakeup. Key modifications:
1. Addressing Capacity Mismatch:
- Added (256) to flag when the receive buffer is full.
- When the receive queue is full (), a response with is sent to the sender (). This notifies the sender to pause or adjust transmission, preventing blind retransmissions.
2. Fixing False Deadlock Detection:
- Modified to accept as a parameter, enabling ACK polling during deadlock checks.
- Extended the initial timeout for deadlock suspicion from to 600 seconds, reducing premature network error reports.
- If no response is received after 600 seconds, the buffer capacity is incrementally increased () to alleviate false bottlenecks, with detailed logging before triggering an error.
3. Ensuring Main Thread Wakeup on Full Queue:
- In , even when packets are dropped due to a full queue, the main thread is awakened () if the packet matches the waiting query/node/route. This ensures backlogged packets in the queue are processed.
4. Mitigating Node Execution Mismatches:
- Added logging for retransmissions after attempts, providing visibility into prolonged packet delays (e.g., due to unready ).
- Reset after successful ACK polling, preventing excessive retry counts from triggering false timeouts.1 parent 1e13f60 commit d5fbbf8
1 file changed
+67
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
| 212 | + | |
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| |||
835 | 836 | | |
836 | 837 | | |
837 | 838 | | |
838 | | - | |
| 839 | + | |
839 | 840 | | |
840 | 841 | | |
841 | 842 | | |
| |||
5220 | 5221 | | |
5221 | 5222 | | |
5222 | 5223 | | |
| 5224 | + | |
| 5225 | + | |
| 5226 | + | |
| 5227 | + | |
| 5228 | + | |
| 5229 | + | |
5223 | 5230 | | |
5224 | 5231 | | |
5225 | 5232 | | |
| |||
6099 | 6106 | | |
6100 | 6107 | | |
6101 | 6108 | | |
| 6109 | + | |
6102 | 6110 | | |
6103 | 6111 | | |
6104 | 6112 | | |
| |||
6120 | 6128 | | |
6121 | 6129 | | |
6122 | 6130 | | |
| 6131 | + | |
| 6132 | + | |
| 6133 | + | |
| 6134 | + | |
| 6135 | + | |
| 6136 | + | |
6123 | 6137 | | |
6124 | 6138 | | |
6125 | 6139 | | |
| |||
6214 | 6228 | | |
6215 | 6229 | | |
6216 | 6230 | | |
6217 | | - | |
| 6231 | + | |
6218 | 6232 | | |
6219 | 6233 | | |
6220 | 6234 | | |
| |||
6251 | 6265 | | |
6252 | 6266 | | |
6253 | 6267 | | |
| 6268 | + | |
| 6269 | + | |
| 6270 | + | |
| 6271 | + | |
| 6272 | + | |
| 6273 | + | |
6254 | 6274 | | |
6255 | | - | |
| 6275 | + | |
6256 | 6276 | | |
6257 | | - | |
6258 | | - | |
6259 | | - | |
6260 | | - | |
6261 | | - | |
6262 | | - | |
6263 | | - | |
6264 | | - | |
| 6277 | + | |
| 6278 | + | |
| 6279 | + | |
| 6280 | + | |
| 6281 | + | |
| 6282 | + | |
| 6283 | + | |
| 6284 | + | |
| 6285 | + | |
| 6286 | + | |
| 6287 | + | |
| 6288 | + | |
| 6289 | + | |
| 6290 | + | |
| 6291 | + | |
| 6292 | + | |
6265 | 6293 | | |
6266 | 6294 | | |
6267 | 6295 | | |
| |||
6393 | 6421 | | |
6394 | 6422 | | |
6395 | 6423 | | |
6396 | | - | |
| 6424 | + | |
6397 | 6425 | | |
6398 | 6426 | | |
6399 | 6427 | | |
| |||
6543 | 6571 | | |
6544 | 6572 | | |
6545 | 6573 | | |
| 6574 | + | |
| 6575 | + | |
| 6576 | + | |
6546 | 6577 | | |
6547 | 6578 | | |
6548 | 6579 | | |
| |||
7136 | 7167 | | |
7137 | 7168 | | |
7138 | 7169 | | |
| 7170 | + | |
| 7171 | + | |
| 7172 | + | |
| 7173 | + | |
| 7174 | + | |
| 7175 | + | |
| 7176 | + | |
| 7177 | + | |
| 7178 | + | |
| 7179 | + | |
| 7180 | + | |
| 7181 | + | |
| 7182 | + | |
| 7183 | + | |
| 7184 | + | |
| 7185 | + | |
| 7186 | + | |
| 7187 | + | |
| 7188 | + | |
| 7189 | + | |
| 7190 | + | |
| 7191 | + | |
| 7192 | + | |
| 7193 | + | |
7139 | 7194 | | |
7140 | 7195 | | |
7141 | 7196 | | |
| |||
0 commit comments