discuss: data lost on worker shut down
- Dominant language
- Lua
- Stars
- 17.1k
- Forks
- 2.9k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 63
Description
### Current Behavior
Any data in the queue is lost when the instance is shutting down or the worker reload is triggered.
1. https://github.com/apache/apisix/blob/master/docs/en/latest/batch-processor.md
### Expected Behavior
Before the APISIX instance shutting down, all left data in the queue should be processed in full and not discarded, unless critical cases (need discussion)
### Error Logs
_No response_
### Steps to Reproduce
No Steps
### Environment
- APISIX version (run `apisix version`): 3.13
Contributor guide
Research direction
Start with docs/en/latest/batch-processor.md to understand the queue and its shutdown behavior. Then trace the worker shutdown and reload lifecycle to identify where queued data is discarded. Done should be defined through the discussion: queued data is processed before shutdown or reload, with any critical-case exceptions explicitly agreed and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100