question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken `.with_transaction_options` and `.with_retry_options` on `AsyncIOPool`

See original GitHub issue

I’m on the latest edgedb-python (0.14.0) with EdgeDB 1-beta2 running in Docker

I’ve tried to call with_retry_options method on AsyncIOPool instance, but it fails with:

        ...
        result = self._shallow_clone()
>      result._options = self._options.with_retry_options(options)
E      AttributeError: 'NoneType' object has no attribute '_options'

I’ve also noticed that AsyncIOPool doesn’t implement _shallow_clone required by _OptionsMixin.

Also, is there is any specific reason why _OptionsMixin doesn’t inherit from abc.ABC but still uses abstractmethod decorator?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
1st1commented, Jun 28, 2021

cc @tailhook

Not yet; we’ll take a look soon.

0reactions
unmadecommented, Sep 1, 2021

I’m sorry, I oversimplified my example a little bit. In real life I’m using FOR...IN to bulk update and it seems like this causes my issues with concurrent updates.

What did your retrying_transaction solution look like?

I prepared a gist with my example: https://gist.github.com/unmade/135cb59092202750b953b3285cc6851d

(And it worked when we were using repeatable read?)

Yes, the example from gist works with no problem when isolation level is REPEATABLE READ, however it fails with SERIALIZABLE

Read more comments on GitHub >

github_iconTop Results From Across the Web

gistart/asyncio-pool - GitHub
Creates pool of size concurrent tasks. Supports async context manager interface. spawn(coro, cb=None, ctx=None). Waits for pool space, then ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found