mirror of
https://github.com/sogou/workflow.git
synced 2026-10-20 06:11:21 +08:00
Merge pull request #812 from wzl12356/windows
kafka: fix endless loop when fetch message from empty topic partition (Windows)
This commit is contained in:
@@ -515,7 +515,7 @@ bool __ComplexKafkaTask::process_fetch()
|
||||
while ((toppar = this->get_resp()->get_toppar_list()->get_next()) != NULL)
|
||||
{
|
||||
if (toppar->get_error() == KAFKA_OFFSET_OUT_OF_RANGE &&
|
||||
toppar->get_offset() >= 0)
|
||||
toppar->get_high_watermark() - toppar->get_low_watermark() > 0)
|
||||
{
|
||||
toppar->set_offset(KAFKA_OFFSET_OVERFLOW);
|
||||
toppar->set_low_watermark(KAFKA_OFFSET_UNINIT);
|
||||
|
||||
Reference in New Issue
Block a user