apache / apache/apisix

discuss: data lost on worker shut down

Open
#12,627 1 comment 0 reactions 0 assignees View on GitHub
enhancement
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.