From 8281301cbd2a7ca8f908e24d54d41c461cbd4d84 Mon Sep 17 00:00:00 2001 From: GraceWalk Date: Thu, 1 Sep 2022 19:50:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20Consumer=20?= =?UTF-8?q?=E7=82=B9=E5=87=BB=20Stop=20=E4=B8=8D=E5=8F=91=E5=81=9C?= =?UTF-8?q?=E6=AD=A2=E6=A3=80=E7=B4=A2=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/TestingConsumer/Consume.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/km-console/packages/layout-clusters-fe/src/pages/TestingConsumer/Consume.tsx b/km-console/packages/layout-clusters-fe/src/pages/TestingConsumer/Consume.tsx index 274f7de4..5ec957a6 100644 --- a/km-console/packages/layout-clusters-fe/src/pages/TestingConsumer/Consume.tsx +++ b/km-console/packages/layout-clusters-fe/src/pages/TestingConsumer/Consume.tsx @@ -192,8 +192,10 @@ const ConsumeClientTest = () => { // 过滤出消费数量不足设定值的partition const filtersPartition = _partitionList.filter((item: any) => item.recordCount < untilMsgNum); curPartitionList.current = filtersPartition; // 用作下一次请求的入参 - setIsStop(filtersPartition.length < 1); - isStopStatus.current = filtersPartition.length < 1; + if (!isStop) { + setIsStop(filtersPartition.length < 1); + isStopStatus.current = filtersPartition.length < 1; + } break; case 'max size': setIsStop(+recordSizeCur.current >= unitMsgSize); @@ -202,8 +204,10 @@ const ConsumeClientTest = () => { case 'max size per partition': // 过滤出消费size不足设定值的partition const filters = partitionConsumedList.filter((item: any) => item.recordSizeUnitB < unitMsgSize); - setIsStop(filters.length < 1); - isStopStatus.current = filters.length < 1; + if (!isStop) { + setIsStop(filters.length < 1); + isStopStatus.current = filters.length < 1; + } curPartitionList.current = filters; break; }