apache / apache/pulsar-client-go
Seek fails on non-partitioned topics due to partition check in Go client
- Dominant language
- Go
- Stars
- 745
- Forks
- 389
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 3
Description
### Expected behavior
The `Seek` method should not check for partition-specific logic when working with non-partitioned topics. It should simply seek to the specified message ID without involving partition indices.
### Actual behavior
The `Seek` method fails with an error related to partition indices when called on a non-partitioned topic. The error message suggests that the `Seek` command should be performed on individual partitions, even though the topic is not partitioned.
Error: `invalid partition index -1 expected a partition between [0-1]"`
### Steps to reproduce
1. Create a non-partitioned topic.
2. Use the `Seek` method with `pulsar.EarliestMessageID()` on this topic.
3. Observe that an error is returned due to partition-specific logic being applied, even though the topic is non-partitioned.
### System configuration
**Pulsar version**: 3.3.2
**Pulsar Go client version**: v0.13.1
Contributor guide
Research direction
Start by locating the Go client's Seek method and trace how it handles non-partitioned topics and partition indices. Reproduce the issue with a non-partitioned topic and pulsar.EarliestMessageID(), then verify that seeking succeeds without the invalid partition index error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, distributed-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100