Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing doc change states on parallel docs save #313

Open
KholmatovS opened this issue Jul 25, 2024 · 0 comments
Open

Missing doc change states on parallel docs save #313

KholmatovS opened this issue Jul 25, 2024 · 0 comments

Comments

@KholmatovS
Copy link
Contributor

KholmatovS commented Jul 25, 2024

There's bug that snapshot's docChanges state doesn't contain all information when docs are saved in parallel:
Example:

    final op1 = db.collection('docs').doc('1').set(<String, dynamic>{
      'name': 'Norman',
      'age': 28,
    });

    final op2 = db.collection('docs').doc('2').set(<String, dynamic>{
      'name': 'Peter',
      'age': 19,
    });

    /// Parallel save
    await Future.wait([op1, op2]);

If we query docs with where('age', isLessThan: 30) before saving the above docs, only single added doc change event will be emitted. However, expected will be two, per each snapshot data

Please refer to the test file in the PR for the details of failing test case
PR: #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant