sync
ReQL command: sync
Command syntax
table.sync() → object
Description
Ensure that writes on a given table are written to permanent storage. Queries that specify soft durability do not wait for writes to be committed to disk; a call to sync
on a table will not return until all previous writes to the table are completed, guaranteeing the data’s persistence.
If successful, the operation returns an object: {"synced":1}
.
Example: After having updated multiple heroes with soft durability, we now want to wait until these changes are persisted.
r.table("marvel").sync().run(conn);
Related commands
Get more help
Couldn't find what you were looking for?
- Ask a question on Stack Overflow
- Chat with us and our community on Slack
- Talk to the team on IRC on #rethinkdb@freenode.net — via Webchat
- Ping @rethinkdb on Twitter
- Post an issue on the documentation issue tracker on GitHub
© RethinkDB contributors
Licensed under the Creative Commons Attribution-ShareAlike 3.0 Unported License.
https://rethinkdb.com/api/java/sync/