-
Notifications
You must be signed in to change notification settings - Fork 343
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
Key commited in a transaction is not visible in the next transaction #1912
Comments
Hi @mitar, transactions in immudb work pretty much as you would expect from any other database. Transactions are full ACID compliant with strict isolation. I think the only issue with the code above is that the transactions options struct is built in a raw manner without a helpful constructor. Then it's not imposing any requirement for the snapshot used for the second transaction tx, err = immuStore.NewTx(context.Background(), store.DefaultTxOptions().WithMode(store.ReadOnlyTx)) Please take a look at here |
I see. Thanks. Then docs should be updated. In docs, there is:
As we see, this is not a problem in this concrete example in docs, but it leads to the error like I have made. Example should use |
I made codenotary/immudb.io#506 to update docs. Thanks. |
What happened
I made a transaction and committed a value under a key. In the next transaction that key is not visible. But it is visible outside of the transaction (when using
db.Get
).What you expected to happen
I expect that committed data is available in transactions.
How to reproduce it (as minimally and precisely as possible)
Environment
I use Go with immudb embedded at version v1.9.0-RC2.0.20231220125802-d143b42683b7.
Additional info (any other context about the problem)
It might be that transactions in immudb work differently than they do in traditional databases. But there you can fetch data committed in prior transactions when you are inside a new transaction. They behave like a snapshot (also provide isolation against changes in other parallel transactions).
The text was updated successfully, but these errors were encountered: