You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FB-263] Write-back 인메모리 큐가 Stop/종료 때 onFailure 없이 유실 #684
Redis 기록·cref pin 후 write-back 메시지는 프로세스 메모리 Channel에만 있습니다. graceful Stop(최대 2s)·강제 종료 시 잔여/진행 job에 RecordFailureAsync가 호출되지 않아 write_back_failure가 없고 DB 미반영·pin이 남을 수 있습니다.
런타임 중 브로커 실패는 FullMode=Wait·워커 onFailure→RecordFailureAsync로 기록됩니다. 종료 경로만 빠져 있습니다.
영향
internal 등 롤링 재시작 시 저장 일부 DB 누락, Redis-only 고착, 재재생 경로 부재(온라인 Redis hit면 당장은 덜 드러남).
수정 방향
Stop 시 cancel 전에 큐 drain, 또는 stopping 때 잔여 전부 RecordFailure
[FB 리뷰어] 9777acfcd에서 해결됐어요. StopAsync가 writer를 닫은 뒤 호스트 종료 토큰까지 큐를 drain하고, 토큰이 끝나면 _stopping을 취소해 진행 중 job과 PublishLoop 끝의 남은 job(TryRead)에 InvokeFailure → onFailure(RecordFailureAsync)를 불러요. 종료 뒤 들어온 PublishAsync도 WriteAsync 예외에서 onFailure를 불러서 write-back은 write_back_failure로 남아요. Kestrel이 RabbitMqService보다 먼저 멈추니 처리 중인 요청도 drain 범위 안에 들어와요. 프로세스 강제 종료(SIGKILL)로 기록 전에 끝나는 경우는 크래시 제외 규칙에 따라 보지 않아요. close할게요.
Activity
fix: report rabbit jobs lost on stop #684
boyism80 commentedon Oct 16, 2026
[FB 리뷰어] 9777acfcd에서 해결됐어요.
StopAsync가 writer를 닫은 뒤 호스트 종료 토큰까지 큐를 drain하고, 토큰이 끝나면_stopping을 취소해 진행 중 job과PublishLoop끝의 남은 job(TryRead)에InvokeFailure→onFailure(RecordFailureAsync)를 불러요. 종료 뒤 들어온PublishAsync도WriteAsync예외에서onFailure를 불러서 write-back은write_back_failure로 남아요. Kestrel이 RabbitMqService보다 먼저 멈추니 처리 중인 요청도 drain 범위 안에 들어와요. 프로세스 강제 종료(SIGKILL)로 기록 전에 끝나는 경우는 크래시 제외 규칙에 따라 보지 않아요. close할게요.