File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
packages/firestore/src/local Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ export abstract class RemoteDocumentChangeBuffer {
47
47
MaybeDocument | null
48
48
> = new ObjectMap ( key => key . toString ( ) ) ;
49
49
50
+ // The read time to use for all added documents in this change buffer.
50
51
protected readTime : SnapshotVersion | undefined ;
51
52
52
53
private changesApplied = false ;
@@ -74,8 +75,9 @@ export abstract class RemoteDocumentChangeBuffer {
74
75
addEntry ( maybeDocument : MaybeDocument , readTime : SnapshotVersion ) : void {
75
76
this . assertNotApplied ( ) ;
76
77
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.
79
81
assert (
80
82
this . readTime === undefined || this . readTime . isEqual ( readTime ) ,
81
83
'All changes in a RemoteDocumentChangeBuffer must have the same read time'
You can’t perform that action at this time.
0 commit comments