Isolation levels

hi,
I am comming from the oracle database space and i have a question about "isolaton levels"

In order of low to highest degree of isolation

  • READ UNCOMMITTED
  • READ COMMITTED
  • REPEATABLE READ
  • SERIALIZABLE

Which one(s) (plural?) supported by elastic
Regards

Jacob

1 Like

Elasticsearch does not support transactions, so I believe the answer is none.

1 Like

Thank you for answer,
One more question, so I can potentially read a partially changed document? at least document reads are atomic?

Yes, you will not get partially changed documents, but could get different version depending on which shard you query.

1 Like

Great, aslong as the read is atomic (on document level) I am happy)).
Is there an atomic "read and update"??

Example of what I want to do:
Let say you want to decrease a balance (bankaccount maybe) but it should only happen if the balance will not go below zero. I am thinking of solving the problem in 2 ways

  1. Can I create a mapping with a constraint (a type whos value must be >= 0)
  2. A way to do conditional update based on a read in one atomic action.

Cheers
Jacob.

Oh sorry, I see that constraining the values of a float cannot be part of a "type" (or maybe it can?)

Regards
Jacob

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.