Skip to content

Commit 7b6f892

Browse files
committed
fix(failsafe): Reduce threshold to 20% OR 1k bookmarks
see #1870 Signed-off-by: Marcel Klehr <[email protected]>
1 parent 174b5e2 commit 7b6f892

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib/strategies/Default.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ export default class SyncProcess {
365365
const localCountDeleted = removals.getActions().reduce((count, action) => count + action.payload.count(), 0)
366366

367367
Logger.log('Checking failsafe: ' + localCountDeleted + '/' + localCountTotal + '=' + (localCountDeleted / localCountTotal))
368-
if (localCountTotal > 5 && localCountDeleted / localCountTotal > 0.5) {
368+
// Failsafe kicks in if more than 20% is deleted or more than 1k bookmarks
369+
if ((localCountTotal > 5 && localCountDeleted / localCountTotal > 0.2) || localCountDeleted > 1000) {
369370
const failsafe = this.server.getData().failsafe
370371
if (failsafe !== false || typeof failsafe === 'undefined') {
371372
throw new FailsafeError(Math.ceil((localCountDeleted / localCountTotal) * 100))

0 commit comments

Comments
 (0)