From 434c6fe786b1f551d180d8af9a577125867e1253 Mon Sep 17 00:00:00 2001 From: harryhawwy69 Date: Sun, 22 Nov 2026 17:32:31 +0300 Subject: [PATCH] =?UTF-8?q?[ISSUE=20#12899]=E2=99=BB=EF=B8=8FUse=20async?= =?UTF-8?q?=20fn=20for=20QueryMessageStore::query=5Fmessage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rocketmq-broker/src/processor/query_message_processor.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/rocketmq-broker/src/processor/query_message_processor.rs b/rocketmq-broker/src/processor/query_message_processor.rs index 5b837688f0..96e339d2fb 100644 --- a/rocketmq-broker/src/processor/query_message_processor.rs +++ b/rocketmq-broker/src/processor/query_message_processor.rs @@ -12,7 +12,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -use std::future::Future; use std::sync::Arc; use std::sync::Weak; @@ -67,11 +66,9 @@ fn query_store_unavailable() -> StoreError { } /// Narrow storage operations required by [`QueryMessageProcessor`]. -pub trait QueryMessageStore: Send + Sync { - fn query_message( - &self, - request: &QueryMessageRequest, - ) -> impl Future, StoreError>> + Send; +#[trait_variant::make(Send)] +pub trait QueryMessageStore: Sync { + async fn query_message(&self, request: &QueryMessageRequest) -> Result, StoreError>; fn select_message_by_offset(&self, offset: i64) -> Result, StoreError>; }