-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Firestore replication: parallel writes instead batch #6743
Comments
Did you do performance tests for this? I do not see a reason why parallel writes should be faster. |
About the performance, you can check one test here https://stackoverflow.com/a/58897275/5328683. And even Firestore recommend that.
Currently, I'm having an issue with attachment if the attachment is big enough, Firestore will reject it because of 1MB limit of a single object. I know it's better to fix the error and not workaround, but it's confusing at the same time that 1 error doc can break the whole app (no write is applied because all writes are put into single |
Ah I see. EDIT: Setting batch-size to 1 would mean we do serialized writes, not parallel writes. So this must be changed in the push-handler, not the batchSize option. |
So what is your call? Do you like the idea? I can start drafting a PR and we can continue discussing on that |
Yes you can make a PR for single parallel writes. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed soon. Please update it or it may be closed to keep our repository organized. The best way is to add some more information or make a pull request with a test case. Also you might get help in fixing it at the RxDB Community Chat If you know you will continue working on this, just write any message to the issue (like "ping") to remove the stale tag. |
Currently, firestore replication uses
batch
for insert and update. One drawback is that if there is an error from any doc, no doc will be committed to Firestore. Moreover, batch isn't faster than parallel writes.I propose to change from batch write to parallel write, the change is small and doesn't break the compatibility.
So what do you think? Is it a good approach?
The text was updated successfully, but these errors were encountered: