fix(nbstore): fix doc clock comparison (#10296)
This commit is contained in:
@@ -246,7 +246,8 @@ export class DocSyncPeer {
|
|||||||
if (
|
if (
|
||||||
!this.remote.isReadonly &&
|
!this.remote.isReadonly &&
|
||||||
clock &&
|
clock &&
|
||||||
(pushedClock === null || pushedClock !== clock.timestamp)
|
(pushedClock === null ||
|
||||||
|
pushedClock.getTime() !== clock.timestamp.getTime())
|
||||||
) {
|
) {
|
||||||
await this.jobs.pullAndPush(docId, signal);
|
await this.jobs.pullAndPush(docId, signal);
|
||||||
} else {
|
} else {
|
||||||
@@ -254,7 +255,10 @@ export class DocSyncPeer {
|
|||||||
const pulled =
|
const pulled =
|
||||||
(await this.syncMetadata.getPeerPulledRemoteClock(this.peerId, docId))
|
(await this.syncMetadata.getPeerPulledRemoteClock(this.peerId, docId))
|
||||||
?.timestamp ?? null;
|
?.timestamp ?? null;
|
||||||
if (pulled === null || pulled !== this.status.remoteClocks.get(docId)) {
|
if (
|
||||||
|
pulled === null ||
|
||||||
|
pulled.getTime() !== this.status.remoteClocks.get(docId)?.getTime()
|
||||||
|
) {
|
||||||
await this.jobs.pull(docId, signal);
|
await this.jobs.pull(docId, signal);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user