Describe the bug
-
Our broker is highly busy

-
Our business uses Reader for consumption, in which seek operations are often performed.
-
In the seek operation of pulsar, there will be a process of actively disconnecting the consumer and canceling the currently reading operation.

- Next, whether the
seek operation is completed or not, the client has the right to subscribe the subscription.

- Because the server thread pool is busy, the
seek operation is delayed. The client first subscribed a subscription and initiates a FLOW request, causing the broker to start reading data.

- Next, the seek operation is completed, and the positions of
md position and rd position are reset to the seek position.

- Then, the read operation is completed, after the data is sent to the client, the client executes ack, and md and rd are set to a certain position of the message read by the client.

- Next, the seek operation is completed, and the positions of
md position and rd position are reset to the seek position.

- Then, the read operation is completed, after the data is sent to the client, the client executes ack, and md and rd are set to a certain position of the message read by the client.

The entire execution flow is shown in the following figure:

Describe the bug
Our broker is highly busy

Our business uses
Readerfor consumption, in whichseekoperations are often performed.In the
seekoperation of pulsar, there will be a process of actively disconnecting the consumer and canceling the currently reading operation.seekoperation is completed or not, the client has the right to subscribe the subscription.seekoperation is delayed. The client first subscribed a subscription and initiates aFLOWrequest, causing the broker to start reading data.md positionandrd positionare reset to the seek position.md positionandrd positionare reset to the seek position.The entire execution flow is shown in the following figure:
