fix(server): avoid infinite loop in manticoresearch (#12460)

close CLOUD-221

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->

## Summary by CodeRabbit

- **Bug Fixes**
  - Resolved an issue that could cause the document listing process to enter an infinite loop under certain conditions.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
fengmk2
2025-05-23 05:04:13 +00:00
parent 7978a2545f
commit aea45f451d

View File

@@ -191,6 +191,10 @@ export class IndexerService {
},
},
});
if (result.nextCursor && result.nextCursor === cursor) {
// NOTE(@fengmk2): avoid infinite loop bug in manticoresearch
break;
}
docIds.push(...result.nodes.map(node => node.fields.docId[0] as string));
cursor = result.nextCursor;
this.logger.debug(