codenotary / immudb

immudb - immutable database based on zero trust, SQL/Key-Value/Document model, tamperproof, data change history
https://immudb.io
Other
8.55k stars 343 forks source link

concurrency sql error #1291

Closed winterpi closed 1 year ago

winterpi commented 2 years ago

What happened I use the "tools/testing/stress_tool_sql.go" to check the concurrency of SQL statement. First I encountered the problem of "value is not an integer: invalid value provided". After debugging I found it's the problem of time value. So, I omitted to insert the time value. But then, I got "tx read conflict exit status 1" error.

What you expected to happen I just test the simple SQL insert statement, there should be no read conflict.

How to reproduce it (as minimally and precisely as possible)

Environment V1.3.0 & V1.3.1 both error

# run "immu* version" and copy/paste the output here

Additional info (any other context about the problem)

jeroiraz commented 2 years ago

thanks for reporting it @winterpi

Regarding the concurrency issue, at the moment immudb support only 1 read-write transaction at a time, so it's up the application to ensure that only one read-write transaction is open at a time, or to handle read conflict error. In such case the error code returned by sdk will be 25P02 CodInFailedSqlTransaction.

Version control is still pending so to avoid this false positive detections

jeroiraz commented 1 year ago

MVCC is already in place

winterpi commented 1 year ago

MVCC is already in place

good job.
Which version is related to MVCC solution? V1.4.1 seems haven't solve it yet.

jeroiraz commented 1 year ago

MVCC is already in place

good job. Which version is related to MVCC solution? V1.4.1 seems haven't solve it yet.

upcoming release scheduled for late June will include it