admin管理员组文章数量:1024592
While going through the official documentation I found out that transactions are automatically re-run a finite number of times by the SDK on failure, however in case of Batch Writes it is not explicitly mentioned.
The documentation does mention that batch writes are atomic just like transactions but that does not necessarily implies that they get re-run also on failure.
While going through the official documentation I found out that transactions are automatically re-run a finite number of times by the SDK on failure, however in case of Batch Writes it is not explicitly mentioned.
The documentation does mention that batch writes are atomic just like transactions but that does not necessarily implies that they get re-run also on failure.
Share Improve this question asked May 27, 2019 at 19:10 Maaz Bin KhawarMaaz Bin Khawar 4603 silver badges13 bronze badges1 Answer
Reset to default 8Batch writes are not retried if there is a failure. The entire thing is just rolled back, and you have to figure out for yourself if you want to retry.
Transactions are retried because they are explicitly trying to make a change based on the contents of existing document. Since those documents could change between the round trip between the client and server, the retry is necessary to automatically handle that case, if it happens. Batch writes don't have this problem, since they are atomic, but not really transactional in nature.
While going through the official documentation I found out that transactions are automatically re-run a finite number of times by the SDK on failure, however in case of Batch Writes it is not explicitly mentioned.
The documentation does mention that batch writes are atomic just like transactions but that does not necessarily implies that they get re-run also on failure.
While going through the official documentation I found out that transactions are automatically re-run a finite number of times by the SDK on failure, however in case of Batch Writes it is not explicitly mentioned.
The documentation does mention that batch writes are atomic just like transactions but that does not necessarily implies that they get re-run also on failure.
Share Improve this question asked May 27, 2019 at 19:10 Maaz Bin KhawarMaaz Bin Khawar 4603 silver badges13 bronze badges1 Answer
Reset to default 8Batch writes are not retried if there is a failure. The entire thing is just rolled back, and you have to figure out for yourself if you want to retry.
Transactions are retried because they are explicitly trying to make a change based on the contents of existing document. Since those documents could change between the round trip between the client and server, the retry is necessary to automatically handle that case, if it happens. Batch writes don't have this problem, since they are atomic, but not really transactional in nature.
本文标签: javascriptDo firestore batch writes get rerun automatically on failureStack Overflow
版权声明:本文标题:javascript - Do firestore batch writes get re-run automatically on failure? - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745612670a2159097.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论