- 
                Notifications
    You must be signed in to change notification settings 
- Fork 48
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
- 你遇到了什么问题?
当OFFSET_OUT_OF_RANGE时,调用ListOffsetRequest时 currentLeaderEpoch没有设定,导致响应的数据是错的
- Kafka 环境是自建还是云服务?
自建
- 请执行下面的命令获取环境信息。
php -v & php --ri swoole & composer info | grep longlang/phpkafka
# 粘贴到这里
[1] 26314
[2] 26315
swoole
Swoole => enabled
Author => Swoole Team <[email protected]>
Version => 4.4.15
Built => May 31 2021 05:59:33
coroutine => enabled
epoll => enabled
eventfd => enabled
signalfd => enabled
cpu_affinity => enabled
spinlock => enabled
rwlock => enabled
sockets => enabled
openssl => OpenSSL 1.0.2k-fips  26 Jan 2017
http2 => enabled
pcre => enabled
zlib => 1.2.7
mutex_timedlock => enabled
pthread_barrier => enabled
futex => enabled
async_redis => enabled
Directive => Local Value => Master Value
swoole.enable_coroutine => On => On
swoole.enable_library => On => On
swoole.enable_preemptive_scheduler => Off => Off
swoole.display_errors => On => On
swoole.use_shortname => On => On
swoole.unixsock_buffer_size => 8388608 => 8388608
PHP 7.4.19 (cli) (built: May 31 2021 04:55:16) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Yasd v0.3.8, Our Copyright, by codinghuang
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? 
longlang/phpkafka                  v1.1.4  A kafka client. Support php-fpm and Swoole.
- 提供最小可复现代码:
// 你的代码
ListOffsetPartition类的$currentLeaderEpoch属性默认是0 ,请求是没有指定,返回的offset是错误的

//在OffsetManager的updateListOffsets方法里指定后 返回是正常的:
 $listOffsetPartition->setPartitionIndex($partition)->setTimestamp(-1)->setCurrentLeaderEpoch($leaderEpoch[$partition]);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working