Skip to content

Commit 05c2a96

Browse files
committed
More logs for upload issue diagnostics.
1 parent 30c8433 commit 05c2a96

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

packages/common/src/client/sync/stream/AbstractStreamingSyncImplementation.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,11 @@ The next upload iteration will be delayed.`);
374374
});
375375
} else {
376376
// Uploading is completed
377-
this.logger.debug('Upload complete, updating write checkpoint');
378-
await this.options.adapter.updateLocalTarget(() => this.getWriteCheckpoint());
377+
this.logger.debug('Upload complete, creating write checkpoint');
378+
const neededUpdate = await this.options.adapter.updateLocalTarget(() => this.getWriteCheckpoint());
379+
if (neededUpdate == false) {
380+
this.logger.debug('No write checkpoint needed');
381+
}
379382
break;
380383
}
381384
} catch (ex) {
@@ -1078,9 +1081,10 @@ The next upload iteration will be delayed.`);
10781081
// checkpoint, which prevented this checkpoint from applying. Wait for that to complete and
10791082
// try again.
10801083
this.logger.debug(
1081-
'Could not apply checkpoint due to local data. Waiting for in-progress upload before retrying.'
1084+
`Could not apply checkpoint ${checkpoint.last_op_id} due to local data. Waiting for in-progress upload before retrying.`
10821085
);
10831086
await Promise.race([pending, onAbortPromise(abort)]);
1087+
this.logger.debug(`Pending uploads complete, retrying local checkpoint at ${checkpoint.last_op_id}`);
10841088

10851089
if (abort.aborted) {
10861090
return { applied: false, endIteration: true };

0 commit comments

Comments
 (0)