async def check_mget(self) -> CheckResult:
        res = CheckResult(0, 0, 0, 0)
        for keys in AioRedisClusterClient.group_by_slot(self.kvs):
            try:
                values, address = await self.client.mget(*keys)
            except Exception as e:
                logger.error("REDIS_TEST: failed to mget {}: {} {}", keys, e,
                             type(e))
                res.failed_count += 1
                continue

            res.success_count += 1
            for k, v in zip(keys, values):
                if k != v:
                    logger.error(
                        "INCONSISTENT: key: {}, expected {}, got {}, address {}",
                        k,
                        k,
                        v,
                        address,
                    )
                    res.not_consistent_count += 1
                    self.kvs.discard(k)
                else:
                    res.consistent_count += 1

        for keys in AioRedisClusterClient.group_by_slot(self.deleted_kvs):
            try:
                values, address = await self.client.mget(*keys)
            except Exception as e:
                logger.error("REDIS_TEST: failed to get {}: {} {}", keys, e,
                             type(e))
                res.failed_count += 1
                continue
            res.success_count += 1
            for k, v in zip(keys, values):
                if v is not None:
                    logger.error(
                        "INCONSISTENT: key: {}, expected {}, got {}, address {}",
                        k,
                        None,
                        v,
                        address,
                    )
                    res.not_consistent_count += 1
                    self.deleted_kvs.discard(k)
                    self.kvs.add(k)
                else:
                    res.consistent_count += 1

        return res
 async def run_one_checker(self, checker_name):
     client = AioRedisClusterClient(self.startup_nodes, timeout=3)
     await client.init_pool()
     while True:
         checker = KeyValueChecker(checker_name, client)
         await checker.loop_check()
         logger.info("checker {} restart".format(checker_name))
 async def del_multi_keys(self, keys):
     for ks in AioRedisClusterClient.group_by_slot(keys):
         try:
             values, address = await self.client.delete(*ks)
         except Exception as e:
             logger.error("REDIS_TEST: failed to del {}: {} {}", ks, e,
                          type(e))
             raise
         self.kvs.difference_update(ks)
         self.deleted_kvs.update(ks)
 async def check_del_multi_keys(self, keys) -> CheckResult:
     res = CheckResult(0, 0, 0, 0)
     for ks in AioRedisClusterClient.group_by_slot(keys):
         try:
             values, address = await self.client.delete(*ks)
         except Exception as e:
             logger.error("REDIS_TEST: failed to del {}: {} {}", ks, e,
                          type(e))
             res.failed_count += 1
             continue
         res.success_count += 1
         self.kvs.difference_update(ks)
         self.deleted_kvs.update(ks)
     return res
    async def check_mget(self):
        for keys in AioRedisClusterClient.group_by_slot(self.kvs):
            try:
                values, address = await self.client.mget(*keys)
            except Exception as e:
                logger.error("REDIS_TEST: failed to mget {}: {} {}", keys, e,
                             type(e))
                raise

            for k, v in zip(keys, values):
                if k != v:
                    logger.error(
                        "INCONSISTENT: key: {}, expected {}, got {}, address {}",
                        k,
                        k,
                        v,
                        address,
                    )
                    raise CheckerError("INCONSISTENT DATA")

        for keys in AioRedisClusterClient.group_by_slot(self.deleted_kvs):
            try:
                values, address = await self.client.mget(*keys)
            except Exception as e:
                logger.error("REDIS_TEST: failed to get {}: {} {}", keys, e,
                             type(e))
                raise
            for k, v in zip(keys, values):
                if v is not None:
                    logger.error(
                        "INCONSISTENT: key: {}, expected {}, got {}, address {}",
                        k,
                        None,
                        v,
                        address,
                    )
                    raise CheckerError("INCONSISTENT DATA")