wenbingshen opened a new issue #14559: URL: https://github.com/apache/pulsar/issues/14559
**Describe the bug** 1. Our broker is highly busy  2. Our business uses `Reader` for consumption, in which `seek` operations are often performed. 3. In the `seek` operation of pulsar, there will be a process of actively disconnecting the consumer and canceling the currently reading operation. <img width="1437" alt="image" src="https://user-images.githubusercontent.com/35599757/156738988-ee032278-7c84-4346-9126-3ef43f665226.png"> 4. Next, whether the `seek` operation is completed or not, the client has the right to subscribe the subscription. <img width="1439" alt="image" src="https://user-images.githubusercontent.com/35599757/156739047-05bea0f0-7d06-436c-ab3a-f593aa339f94.png"> 5. 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. <img width="1439" alt="image" src="https://user-images.githubusercontent.com/35599757/156739353-10d9701f-3df4-4573-aa18-e4f4349b874c.png"> 6. Next, the seek operation is completed, and the positions of `md position` and `rd position` are reset to the seek position. <img width="1439" alt="image" src="https://user-images.githubusercontent.com/35599757/156739594-e36b57d2-1f6d-4bb2-b292-b035f594d293.png"> 7. 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. <img width="1439" alt="image" src="https://user-images.githubusercontent.com/35599757/156739816-f7bad25a-ad94-40d5-83b5-cc4b5ff35cac.png"> 8. Next, the seek operation is completed, and the positions of `md position` and `rd position` are reset to the seek position. <img width="1439" alt="image" src="https://user-images.githubusercontent.com/35599757/156740044-fbb730cf-1070-4431-9add-fd9ec0efe5ec.png"> 9. 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. <img width="1438" alt="image" src="https://user-images.githubusercontent.com/35599757/156739952-aa9dbf29-0a2e-487a-b5af-189d029cd0bf.png"> The entire execution flow is shown in the following figure:  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
