RockteMQ-AI commented on issue #1331: URL: https://github.com/apache/rocketmq-clients/issues/1331#issuecomment-5267920667
**Issue Evaluation** Category: `bug` | Status: **Confirmed — Critical** The reported issue has been verified. This is a critical stability bug in the Python PushConsumer. **Root Cause:** `__execute_receive` and `__execute_receive_later` form synchronous mutual recursion when the process queue cache is full. Each cycle adds a stack frame: ``` __execute_receive -> is_cache_full() == True -> __execute_receive_later -> sleep(1s) -> __execute_receive -> ... ``` After approximately 800-1000 seconds, Python's default recursion limit of 1000 is exceeded and the process crashes with `RecursionError`. **Impact:** Any Python PushConsumer running under sustained high throughput with slow message processing will crash after 13-16 minutes. This is a production-blocking issue. **Severity:** Critical — process crash with data loss risk. **Suggested Fix:** The reporter's proposed solution is correct: replace the recursive call in `__execute_receive_later` with an iterative `while` loop that uses O(1) stack space. This preserves identical behavior while eliminating the recursion. An automated fix proposal can be generated. Reply `/approve` to proceed with PR generation. --- *Automated evaluation by github-manager* -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
