-
Notifications
You must be signed in to change notification settings - Fork 19
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
Transaction Read Conflict During CREATE Operation #136
Comments
Hey @SergioKingOne Thank you for using surrealkv. SurrealKV by default works in a Snapshot Isolation mode, so the conflict error means that if two concurrent transactions (modifying common set of keys) are being executed at the same time, it would lead to conflict. You can find a simple example of that here. Could you confirm if these queries are being executed concurrently? |
I have thoroughly reviewed our codebase to identify any instances of concurrent modifications to the same key, specifically within the That said, it's possible that concurrent modifications are occurring in areas we haven't yet identified. We will continue investigating to uncover any hidden instances of concurrent transactions. |
Noted @SergioKingOne In case you have a test case through which you can reproduce it deterministically, would be easier to discuss around it. |
In my case I get the same error but from live queries. So I'm not making transactions but I perform multiple live query on single item or different items. I guess it is because live queries are stored in a table and that causes a transaction that fails? The error message I get is:
This is also a problem witch rockdb but the error message is different, but same issue. |
…transaction store conflict Refs: surrealdb/surrealkv#136 Refs: surrealdb/surrealdb#4898
…transaction store conflict Refs: surrealdb/surrealkv#136 Refs: surrealdb/surrealdb#4898
I have created a minimal example to reproduce the issue here: surrealdb-live-resource-panic |
Thanks @johansmitsnl, is the error in rocksdb "resource busy error"? |
@arriqaaq yes, that is the error with |
Happened to me as well recently with one of my The live query looks like this: And I get the error:
|
Just to keep you updated, we are checking on this internally. Recent PR #146 on surrealkv makes the transaction guarantees for SI less strict. However, since this behaviour also occurs in RocksDB, the issue arises when a live query is created, as common keys are accessed, leading to this conflict. I'll keep you updated as this issue is related to surrealdb internals |
Transaction Read Conflict During CREATE Operation
First, I want to express my appreciation for the excellent work on SurrealKV.
Issue Description
I'm encountering intermittent transaction read conflicts when executing a creation query using the Rust SDK with SurrealKV. Specifically, the
CREATE
operation fails while the subsequentRELATE
operation succeeds.Query
Context
Record Structure
The reply record follows this structure:
Error Output
The
CREATE
operation fails with a transaction read conflict:Related Issues
There's a similar issue (#4898) in the SurrealDB repository, but it specifically mentions ANALYZER-related conflicts, which doesn't appear to be relevant in this case.
Questions
CREATE
operation?Any insights or suggestions would be greatly appreciated. Thank you!
The text was updated successfully, but these errors were encountered: