duckdb: RuntimeError: INTERNAL Error: INTERNAL Error: Could not find node in column segment tree

What happens?

Inserting and deleting same rows in transaction give ‘INTERNAL Error’ (seems related to https://github.com/duckdb/duckdb/issues/1091 ). This error does not occur when I only execute “Step 2”

To Reproduce

con = duckdb.connect("test.duckdb")
con.execute("""CREATE TABLE table1 (
          column1 varchar(36) NOT NULL,
          column2 varchar(250) NOT NULL PRIMARY KEY,
        );""")

# Step 1: insert data
con.execute(
    "INSERT INTO table1(column1, column2) values(?, ?)",
    [
        "bla",
        "1",
    ],
)
con.close()

con = duckdb.connect("test.duckdb")
con.begin()
# Step 2: insert and remove data in transaction
con.execute(
    "INSERT INTO table1(column1, column2) values(?, ?)",
    [
        "bla",
        "2",
    ],
)
con.execute(
    "DELETE FROM table1 WHERE column1 = ?",
    ["bla"],
)

RuntimeError: INTERNAL Error: INTERNAL Error: Could not find node in column segment tree!

Environment (please complete the following information):

  • OS: macOS Montery M1
  • DuckDB Version: 0.3.3 / 0.3.4 / 0.3.5
  • DuckDB Client: Python

Before Submitting

  • Have you tried this on the latest master branch?
  • Python: pip install duckdb --upgrade --pre
  • R: install.packages("https://github.com/duckdb/duckdb/releases/download/master-builds/duckdb_r_src.tar.gz", repos = NULL)
  • Other Platforms: You can find binaries here or compile from source.
  • Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 19 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@hannes I must have made a build mistake… I did “git pull; make” which gave me this version which exhibited the error.

v0.8.2-dev2842 6421a36e94

But when I deleted and redownloaded the repot, I can confirm everything works, and the version reports

v0.8.2-dev4376 312b995450

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

Yes that sounds right, see this commit that made the same change for the DELETE for the same reason/bug.