enhance: performance for CleanRemoteNotesProcessorService (#16404)

* enhance: performance for CleanRemoteNotesProcessorService

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* suggestions

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* docs

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* change initial limit to 100

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* robustness for transient race conditions

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* handle cursors in postgres

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* robustness: transient errors and timeout handling

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

* use '0' as initial cursor

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>

---------

Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
饺子w (Yumechi)
2025-08-14 07:54:28 +00:00
committed by GitHub
parent c25a922928
commit 90b9609341
2 changed files with 181 additions and 94 deletions

View File

@@ -158,6 +158,7 @@ describe('CleanRemoteNotesProcessorService', () => {
oldest: null,
newest: null,
skipped: true,
transientErrors: 0,
});
});
@@ -172,6 +173,7 @@ describe('CleanRemoteNotesProcessorService', () => {
oldest: null,
newest: null,
skipped: false,
transientErrors: 0,
});
}, 3000);
@@ -199,6 +201,7 @@ describe('CleanRemoteNotesProcessorService', () => {
oldest: expect.any(Number),
newest: expect.any(Number),
skipped: false,
transientErrors: 0,
});
// Check side-by-side from all notes