Merge pull request #812 from wzl12356/windows

kafka: fix endless loop when fetch message from empty topic partition (Windows)
This commit is contained in:
xiehan
2022-03-18 19:38:54 +08:00
committed by GitHub
+1 -1
View File
@@ -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);