apache / apache/pulsar

[Bug] Topic compaction task can't stop when topic closed lead to compactionDurationTimeInMills mistake of statistics

Open
#21,172 2 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/3.1

### Minimal reproduce step

1. Trigger compaction on topic
> admin topics compact persistent://public/default/test

3. Unload this topic before the compaction task finish
> admin topics unload persistent://public/default/test

5. Query compaction status
> admin topics stats persistent://public/default/test

### What did you expect to see?

`lastCompactionDurationTimeInMills` is a normal value.

### What did you see instead?

`lastCompactionDurationTimeInMills` is equal to `lastCompactionSucceedTimestamp`.

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] 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.