Description
We have seen 2 main issues with the Purgatory.
1. There is no atomic checkAndWatch functionality. So, a client typically first checks whether a request is satisfied or not and then register the watcher. However, by the time the watcher is registered, the registered item could already be satisfied. This item won't be satisfied until the next update happens or the delayed time expires, which means the watched item could be delayed.
2. FetchRequestPurgatory doesn't quite work. This is because the current design tries to incrementally maintain the accumulated bytes ready for fetch. However, this is difficult since the right time to check whether a fetch (for regular consumer) request is satisfied is when the high watermark moves. At that point, it's hard to figure out how many bytes we should incrementally add to each pending fetch request.
The problem has been reported in KAFKA-1150 and KAFKA-703.
Attachments
Attachments
Issue Links
- contains
-
KAFKA-703 A fetch request in Fetch Purgatory can double count the bytes from the same delayed produce request
- Resolved
-
KAFKA-1150 Fetch on a replicated topic does not return as soon as possible
- Resolved
-
KAFKA-1441 Purgatory purge causes latency spikes
- Resolved
- is duplicated by
-
KAFKA-1150 Fetch on a replicated topic does not return as soon as possible
- Resolved
- supercedes
-
KAFKA-1016 Broker should limit purgatory size
- Resolved