Skip to content

[Bug] Broker could take 30+ seconds to close with extensible load manager #22569

@BewareMyPower

Description

@BewareMyPower

Search before asking

  • I searched in the issues and found nothing similar.

Read release policy

  • I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

Version

master (89b201e)

Minimal reproduce step

public class ExtensibleLoadManagerCloseTest extends MultiBrokerBaseTest {

    @Override
    protected void startBroker() throws Exception {
        addCustomConfigs(conf);
        super.startBroker();
    }

    @Override
    protected ServiceConfiguration createConfForAdditionalBroker(int additionalBrokerIndex) {
        return addCustomConfigs(getDefaultConf());
    }

    private static ServiceConfiguration addCustomConfigs(ServiceConfiguration config) {
        config.setLoadManagerClassName(ExtensibleLoadManagerImpl.class.getName());
        config.setDefaultNumberOfNamespaceBundles(16);
        config.setLoadBalancerAutoBundleSplitEnabled(false);
        config.setLoadBalancerDebugModeEnabled(true);
        return config;
    }

    @Test
    public void test() throws Exception {
        final var topic = "test";
        admin.topics().createPartitionedTopic(topic, 20);
        admin.lookups().lookupPartitionedTopic(topic);
        @Cleanup final var client = PulsarClient.builder().serviceUrl(pulsar.getBrokerServiceUrl()).build();
        @Cleanup final var producer = (PartitionedProducerImpl<byte[]>) client.newProducer().topic(topic).create();
    }
}

What did you expect to see?

It should not takes too long to complete.

What did you see instead?

It sometimes took about 54 seconds to complete and sometimes 22 seconds.

Anything else?

With the default load manager, it only takes about 15 seconds to complete.

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

type/bugThe PR fixed a bug or issue reported a bug

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions