4 ms·
I have a design question that I didn't see answered in the docs. What's your consistency/atomicity model for secondary indexes? It seems like it would be hard
by teraflop 13y ago
I have a design question that I didn't see answered in the docs. What's your consistency/atomicity model for secondary indexes?
It seems like it would be hard to guarantee that the document and its index entries are always in the same shard, and since RethinkDB doesn't seem to support general multi-document transactions, I'm curious how you go about updating them simultaneously.
- coffeemug 13y agoGreat question. In Rethink we guarantee that the document and its index entries are always in the same shard, so any change to the document that affects secondary indexes is consistent and atomic. There are tradeoffs to this approach -- to read a secondary index the db has to go to every master/shard for the table, but there are lots of tricks we use to minimize the impact of this tradeoff.
- andrewcooke 13y ago[apropos nothing, but since you're official, the linked page uses "unilaterally" in an odd way (to mean "uniformly"). imho. afaict. etc.]
- mglukhovsky 13y agoGreat catch, we'll update the blog post!
- robert-zaremba 13y agoI will really love to see information about time complexity of DB operations
- coffeemug 13y agoI'm actually working on this right now. We should get the updated api docs in about two weeks.