mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-13 04:48:53 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user