-
Notifications
You must be signed in to change notification settings - Fork 78
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
Resource contention on Windows using the Python API #3399
Comments
Just noticed that this doesn't happen if I make the relation name unique, eg f"rel{i+1}" instead of "rel1". |
Hi @ZmeiGorynych, relationship tables reference the underlying node table's primary keys in the Just clarifying the intent behind this snippet, which doesn't seem right (or safe) to me: sleep_time = 0
for i in range(10):
print(i + 1)
create_entity(f"entity{i+1}")
sleep(sleep_time)
create_relation("entity1", f"entity{i+1}", "rel1")
sleep(sleep_time) When you just create |
Thanks a lot for the quick answer! Secondly, the above is a very natural calling pattern, think of it as having a function Finally, I find it very alarming that you appear to say that a collision between subsequent |
Thanks for reporting the bug. Just to weigh in: I don't see anything wrong with the query. Each of your calls to |
Thanks @semihsalihoglu-uw! Relieved to have you agree that this is indeed a bug :) |
Just got a very similar error in a different context: Is intermittent, sometimes it arises when I call the above query and sometimes not in exactly the same code. Is there any ETA on resolving the above and hopefully also this one? :) Thanks a lot! |
Hey @ZmeiGorynych , we will take a look into it today and get back to u on the ETA. prioritizing this now. |
I haven't been able to reproduce this, but it could just be from another program accessing the wal file when it is being removed after committing. Is it possible that it's caused by Dropbox accessing the files? Have you tried disabling anti-virus scanning for the database directory? |
Ah, nice catch! After moving the disk location to a non-Dropbox directory, the error disappeared (or at least hasn't appeared after a dozen or so runs). |
That might work, though I think a more reliable alternative would be to avoid removing the WAL files at all and to just empty them instead. |
When I try to insert nodes and relations in a loop, like below, sooner or later I get the following exception:
(<class 'RuntimeError'>, RuntimeError('remove: The process cannot access the file because it is being used by another process.: "C:\\Users\\Egor\\Dropbox\\Code\\motleycrew\\examples\\bug_db\\nodes.statistics_and_deleted.ids.wal"'), <traceback object at 0x000001E21B6AB280>)
This only happens on Windows (at least not on a Mac), but on Windows it always does :(.
Sleeping between inserts makes the problem less likely, but it still appears sometimes.
Running kuzu==0.3.2 installed with pip, on Python 3.11 on Window.s
The text was updated successfully, but these errors were encountered: