Comments (10)
Hmmmm, I had thought that TransactionSerializationError
was marked as SHOULD_RETRY
also, but it is not: https://github.com/edgedb/edgedb/blob/b9b4177d8c0080235e46b7e825384224fbe5923c/edb/api/errors.txt#L128C18-L128C47
Maybe we need to change that
Doing synchronous locking should work great if you only have one client, but it doesn't help you in a distributed situation.
from edgedb.
Is it possible to configure EdgeDB to work with postgres in READ COMMITTED
mode? What are benefits/drawbacks, since I'm not planning to distrubute my db across servers so far
from edgedb.
I workaround this by using RwLock on client, so I can have select/insert/delete concurrent queries and sequential update queries. But I guess EdgeDB should handle it itself, as underlying postgres does?
from edgedb.
I think part of the reason for the difference with postgres is that we are using postgres's SERIALIZABLE isolation level, which is stricter than the default of READ COMMITTED.
When I try it with postgres natively using SERIALIZABLE or REPEATABLE READ, I get the same results.
Another part of this is that the CLI doesn't retry on fails, though I think all of our language clients do.
from edgedb.
Another part of this is that the CLI doesn't retry on fails, though I think all of our language clients do.
My observation is completely opposite. I was getting this error on NodeJS separate workers and in multi-threaded Rust app too. I believe you're confusing it with TransactionConflictError
https://github.com/edgedb/edgedb-rust/blob/093729876737738a559e35c2ec3f0ae27efd2f69/edgedb-tokio/src/options.rs#L26
Anyway, do you think retrying is correct way to workaround this? First time I tried to implement retries, and then I compared to RwLock implementation. I observed better results with manual locking on UPDATE operations. I guess receiving error and retrying multiple times is more expensive than synchronous locking.
from edgedb.
SHOULD_RETRY
should be inherited, and it's set on the parent TransactionConflictError
. The bindings might not be reflecting that faithfully, though.
from edgedb.
Oh, good point. It looks like the rust bindings do reflect that faithfully: https://github.com/edgedb/edgedb-rust/blob/093729876737738a559e35c2ec3f0ae27efd2f69/edgedb-errors/src/kinds.rs#L139.
This sort of counter workload is not a great fit for SERIALIZED/REPEATABLE READ, perhaps.
from edgedb.
Oh, good point. It looks like the rust bindings do reflect that faithfully:
@msullivan Can you double check js/py/go bindings?
from edgedb.
I changed global and database default_transaction_isolation
to 'read committed' but TransactionSerializationError still happens
from edgedb.
EdgeDB sets the mode in the connection settings when it connects to postgres, I think.
Changing it to read committed
there does fix this problem, though I don't think there is a way to do it as a user.
Which is fine, because a bunch of weird stuff can happen in that mode in edgedb. (Exclusive constraints not enforced properly, for one)
from edgedb.
Related Issues (20)
- Bad SQL adapter introspection of an empty database HOT 1
- Query performance differs between a computed property of a link's ID and selecting the link
- asserts in `order by` could make the query slower HOT 3
- Update on object with a mutation rewrite returns previous values instead of updated values
- Results are repeated when using ext::ai::to_context on multiple objects.
- Allow Nested Inserts Via Computed Columns
- ai::to_context doesn't respect overloads HOT 1
- Allow wildcard subdomains for allowed_redirect_urls HOT 1
- Easy DX++ : Have current schema be downloadable as single file for scalability and testing HOT 1
- SQL adapter: unexpected message type 'Z' in IDLE state HOT 1
- Syntax error message changes in with
- Add visibility to auth extension interactions with third-party services HOT 1
- Allow disabling new sign-ups on a provider HOT 1
- Allow verifying email from different device than sign-up
- Send webhook during authentication lifecycle
- Provide visibility into migration progress
- repl implicit limit wrecks user specified limit/offset HOT 1
- Computed pointers and pg_dump via SQL adapter
- When an object global contains a shape, the introspected `name` contains extraneous `__` before the module name
- Support stopping compilation tasks on connection close or timeouts
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from edgedb.