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
RuntimeError: INTERNAL Error: INTERNAL Error: Could not find node in column segment tree #3789
Comments
I can confirm that this issue appears on my installation, too. Its clearly a bug. |
There seem to be also problems around UPDATE queries. But the UPDATE query causes corrupt data. Let me try to come up with a script to reproduce. |
Not entirely sure in which version it's fixed, but I just checked duckdb-0.4.1.dev2356 and it's working corrently for the INSERT/DELETE use case. Still getting corrupt data on UPDATE within transaction. Will try to reproduce it in isolated script. |
Hey all, I had a dbt-duckdb user who ran into this one on the 0.7.1 release and I created a simple script that can reproduce it locally for me:
yields the following:
Note that this is specific to using the |
So I think whatever is going wrong is going wrong around here: https://github.com/duckdb/duckdb/blob/master/src/storage/data_table.cpp#L1112 like, we should be trying to do the update against the data in the transaction local storage based on the value of the row_number, but we're falling back to the underlying storage index instead. 🤔 |
K so I'm thinking that fixing this will require updating the We will need to iterate through the row identifiers and route the operation to either the local storage for @Mytherin does that sound right? I think I can take a crack at it, but I don't know if there any unseen performance/transaction dragons down in here that I should be aware of. 🙇 |
Yes that sounds right, see this commit that made the same change for the DELETE for the same reason/bug. |
Alright perfect, thank you so much! As it so happens I found a good workaround for this use case (instead of doing the INSERT and then the UPDATE, do the UPDATE and then the INSERT!) but I will come back around to it when I have time! |
I've run into this same issue now, I believe.
Is there any fix for this on an existing database. Or do I need to rebuild from source data? |
I'm not sure if it's related, but I have seen the same error message in connection with a different issue: #8420 (comment)
|
I believe I just had this issue even with different duckdb Connections. |
Managed to reproduce this with @jwills' script above, thanks! |
Fix for #3789, separate updates into storage backends individually
Here is a pure sql test case.
Error:
|
@marhar I can't reproduce this on the latest |
@hannes I must have made a build mistake... I did "git pull; make" which gave me this version which exhibited the error.
But when I deleted and redownloaded the repot, I can confirm everything works, and the version reports
I will download the equivalent python and try to reproduce the original code, but from my perspective it seems the problem is fixed. Conclusion: https://imgs.xkcd.com/comics/git.png Cheers |
same problem i meet, "Attempting to find row number "0" in 0 node" |
Can you try this in the latest DuckDB version? |
@Mytherin Upgrading version is hard in production environment. however, I will still try latest DuckDB, thanks |
EDIT: I filed #11924 as a separate issue, @Stongtong perhaps you want to see that issue I just ran into this on 0.10.1. Error:
Sorry, I'm not gonna be able to reduce my flow into a simpler reproducer. But perhaps some generalities will be helpful still: The offending SQL was CREATE TABLE addresses(
address__id UUID PRIMARY KEY NOT NULL,
person__id UUID NOT NULL,
street1 VARCHAR,
street2 VARCHAR,
city VARCHAR,
state VARCHAR,
zipcode VARCHAR,
country VARCHAR,
mailing_status VARCHAR,
is_mailing BOOLEAN,
is_voting BOOLEAN,
latitude DOUBLE,
longitude DOUBLE,
last_updated DATE,
source VARCHAR,
); This is consistent, if I delete the whole db and run everything again, it happens 2 out of 2 times. |
What happens?
Inserting and deleting same rows in transaction give 'INTERNAL Error' (seems related to #1091 ). This error does not occur when I only execute "Step 2"
To Reproduce
RuntimeError: INTERNAL Error: INTERNAL Error: Could not find node in column segment tree!
Environment (please complete the following information):
Before Submitting
master
branch?pip install duckdb --upgrade --pre
install.packages("https://github.com/duckdb/duckdb/releases/download/master-builds/duckdb_r_src.tar.gz", repos = NULL)
The text was updated successfully, but these errors were encountered: