Reset locks
This commit is contained in:
parent
78266267c6
commit
eeb7999d76
3 changed files with 12 additions and 2 deletions
|
|
@ -47,4 +47,9 @@ export class DocumentLocks {
|
|||
this.locked.delete(relativePath);
|
||||
}
|
||||
}
|
||||
|
||||
public reset(): void {
|
||||
this.locked.clear();
|
||||
this.waiters.clear();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -157,6 +157,7 @@ export class Syncer {
|
|||
this.remainingOperationsListeners.forEach((listener) => {
|
||||
listener(0);
|
||||
});
|
||||
this.internalSyncer.reset();
|
||||
}
|
||||
|
||||
private async syncRemotelyUpdatedFile(
|
||||
|
|
@ -214,7 +215,7 @@ export class Syncer {
|
|||
);
|
||||
|
||||
this.logger.debug(
|
||||
`Document ${relativePath} was not found under its current path in the database but was found under a different path ${originalFile[0]}, scheduling sync to move it`
|
||||
`Document '${originalFile[0]}' was not found under its current path in the database but was found under a different path (${relativePath}), scheduling sync to move it`
|
||||
);
|
||||
return this.internalSyncer.unrestrictedSyncLocallyUpdatedFile(
|
||||
{
|
||||
|
|
|
|||
|
|
@ -527,7 +527,11 @@ export class UnrestrictedSyncer {
|
|||
}
|
||||
}
|
||||
|
||||
public async tryIncrementVaultUpdateId(
|
||||
public reset(): void {
|
||||
this.locks.reset();
|
||||
}
|
||||
|
||||
private async tryIncrementVaultUpdateId(
|
||||
responseVaultUpdateId: number
|
||||
): Promise<void> {
|
||||
if (this.database.getLastSeenUpdateId() === responseVaultUpdateId - 1) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue