Comments (10)
Thanks! I presume this is also related to garbage collection but between tests now. #569 may resolve.
I will check this next.
from databases.
* `i686` in 5/5 builds
I should not have tested this architecture; it is excluded in the Fedora package, which is why the build failed every time.
from databases.
Thanks for raising! This test as added as part of #561 — I believe an operational error should be raised there because a new database should be created on the second connection. I'm not certain of the details of how the shared in-memory database is cleared when its reference is dropped, we'll probably need to investigate that.
from databases.
Can you give 1d30e39 a try?
from databases.
Can you give 1d30e39 a try?
When applied as a patch to 0.8.0, that commit seemed to fix the failure reported in this bug in local testing. However, I’m now encountering the following on the real builders:
=================================== FAILURES ===================================
_____________________ test_should_remove_ref_on_disconnect _____________________
@async_adapter
async def test_should_remove_ref_on_disconnect():
async with Database("sqlite:///file::memory:?cache=shared", uri=True) as database:
query = sqlalchemy.schema.CreateTable(notes)
> await database.execute(query)
tests/test_databases.py:1582:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
databases/core.py:199: in execute
return await connection.execute(query, values)
databases/core.py:318: in execute
return await self._connection.execute(built_query)
databases/backends/sqlite.py:145: in execute
await cursor.execute(query_str, args)
/usr/lib/python3.12/site-packages/aiosqlite/cursor.py:48: in execute
await self._execute(self._cursor.execute, sql, parameters)
/usr/lib/python3.12/site-packages/aiosqlite/cursor.py:40: in _execute
return await self._conn._execute(fn, *args, **kwargs)
/usr/lib/python3.12/site-packages/aiosqlite/core.py:133: in _execute
return await future
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Connection(Thread-142, started 281473458041216)>
def run(self) -> None:
"""
Execute function calls on a separate thread.
:meta private:
"""
while True:
# Continues running until all queue items are processed,
# even after connection is closed (so we can finalize all
# futures)
try:
future, function = self._tx.get(timeout=0.1)
except Empty:
if self._running:
continue
break
try:
LOG.debug("executing %s", function)
> result = function()
E sqlite3.OperationalError: table notes already exists
/usr/lib/python3.12/site-packages/aiosqlite/core.py:106: OperationalError
I don’t see this in every build; I haven’t yet established whether it is flaky (racy) or arch-dependent, and I don’t understand why I haven’t been able to reproduce it locally.
from databases.
Thanks! I presume this is also related to garbage collection but between tests now. #569 may resolve.
from databases.
I don’t see this in every build; I haven’t yet established whether it is flaky (racy) or arch-dependent, and I don’t understand why I haven’t been able to reproduce it locally.
In five scratch-builds for Fedora Rawhide across all architectures, I saw the above failure on:
x86_64
in 1/5 buildsi686
in 5/5 buildsppc64le
in 0/5 buildss390x
in 1/5 buildsaarch64
in 3/5 builds
So it looks like this is present on all architectures but perhaps with different probability.
from databases.
Thanks! I presume this is also related to garbage collection but between tests now. #569 may resolve.
I will check this next.
#569 worked in an initial scratch build. I’ll try it a few more times to make sure there aren’t any other (frequent) flaky failures.
from databases.
#569 looks good to me. No failures in five builds on each architecture. Thanks for investigating this.
from databases.
Thanks for your help!
from databases.
Related Issues (20)
- Unable to retrieve foreignkey relation object from select statement HOT 2
- Password containing `/` cannot be used (MySQL)
- Support for UNIX domain socket for MySQL
- No module named 'asyncmy.connection' on python 3.11.3
- Warn for open transactions when a connection is garbage collected
- Unable to connect to database in docker
- MySQL Connection Pool Doesn't Seem to Work HOT 3
- Drop support for python 3.7 HOT 1
- `IndexError` on force_rollback of Transaction in tests. HOT 13
- ImportError Postgresql HOT 1
- Transaction and gather HOT 2
- session manager/ session maker
- Allow passing string values for ssl query string in PostgreSQL URL HOT 1
- Version not match (0.8.0) depends on sqlalchemy (>=1.4.42,<1.5) HOT 2
- mypy's "has no attribute" error
- create table does not create unique keys and indexes
- new 0.8 version for sqlite connection with '?mode=ro' not working, Error can't open database
- Caching disabled in sqlalchemy queries HOT 1
- Potential Inefficiency in Connection Management Leading to "Too Many Connections" Error HOT 2
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 databases.