From dfb8d1c8f9487db0372bd27a9f04a803ab792f8b Mon Sep 17 00:00:00 2001 From: ClSlaid Date: Thu, 16 Mar 2023 17:47:31 +0800 Subject: [PATCH] chore(operator): apply max_batch_limit for async operator (#1641) Signed-off-by: ClSlaid Co-authored-by: Xuanwo --- src/types/operator/operator.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/types/operator/operator.rs b/src/types/operator/operator.rs index 0eaa453df91..d114de8c950 100644 --- a/src/types/operator/operator.rs +++ b/src/types/operator/operator.rs @@ -73,10 +73,8 @@ impl Operator { } pub(crate) fn from_inner(accessor: FusedAccessor) -> Self { - Self { - accessor, - limit: 1000, - } + let limit = accessor.info().max_batch_operations().unwrap_or(1000); + Self { accessor, limit } } pub(super) fn into_inner(self) -> FusedAccessor {