apache / apache/pulsar

[Bug] When querying a newly created topic with Pulsar SQL, the query will be blocked.

Open
#20,910 3 comments 0 reactions 1 assignee Claimed by @crossoverJie View on GitHub
Stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Version

master

### Minimal reproduce step

1. Create a new topic: `admin.topics().createPartitionedTopic(topic, 2);`
2. Query with `Pulsar-SQL`: `select * from pulsar."public/default"."topic1";`

### What did you expect to see?

Return an empty query result.

### What did you see instead?

The query will be blocked.

### Anything else?

![image](https://github.com/apache/pulsar/assets/15684156/74c5ea8d-7c77-47f5-9801-030c6cd4a5b6)
![image](https://github.com/apache/pulsar/assets/15684156/27c35d2e-fb28-43c7-ade4-6fcdc638b32a)

The blocking happened here, line: 475
https://github.com/apache/pulsar/blob/001b134653b89103089b1429b9058d987cd0485c/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedLedgerFactoryImpl.java#L460-L476

Thread stack:
image
image

### Are you willing to submit a PR?

- [X] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.