Skip to content

Commit 3426035

Browse files
Comments
1 parent 97f98a2 commit 3426035

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/firestore/src/local/remote_document_change_buffer.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export abstract class RemoteDocumentChangeBuffer {
4747
MaybeDocument | null
4848
> = new ObjectMap(key => key.toString());
4949

50+
// The read time to use for all added documents in this change buffer.
5051
protected readTime: SnapshotVersion | undefined;
5152

5253
private changesApplied = false;
@@ -74,8 +75,9 @@ export abstract class RemoteDocumentChangeBuffer {
7475
addEntry(maybeDocument: MaybeDocument, readTime: SnapshotVersion): void {
7576
this.assertNotApplied();
7677

77-
// Assert that every read time matches since we only track a single read
78-
// time per document change set.
78+
// Right now (for simplicity) we just track a single readTime for all the
79+
// added entries since we expect them to all be the same, but we could
80+
// rework to store per-entry readTimes if necessary.
7981
assert(
8082
this.readTime === undefined || this.readTime.isEqual(readTime),
8183
'All changes in a RemoteDocumentChangeBuffer must have the same read time'

0 commit comments

Comments
 (0)