Skip to content

CREATE vertex fails #7

@zhanglei1949

Description

@zhanglei1949

When inserting nodes into a single node table via sequential CREATE statements, the operation consistently fails at exactly 4096 nodes with error code 1012 (ERR_INTERNAL_ERROR: Failed to add vertex). This appears to be a WAL/buffer pool capacity limit rather than a hard schema constraint, because:

Executing CHECKPOINT after hitting the limit allows inserting ~1000 more nodes
Closing and reopening the database also allows further inserts

Failed at i=4096: ... ERR_INTERNAL_ERROR: Execution failed at operator: [CreateVertexOpr], Failed to add vertex ...
Total nodes: 4096
import neug
import tempfile, os

d = tempfile.mkdtemp()
db = neug.Database(os.path.join(d, 'test.db'))
conn = db.connect()
conn.execute('CREATE NODE TABLE Test (id STRING, PRIMARY KEY(id))')

for i in range(5000):
    try:
        conn.execute(f"CREATE (t:Test {{id: 'n{i}'}})")
    except RuntimeError as e:
        print(f'Failed at i={i}: {e}')
        break

count = list(conn.execute('MATCH (t:Test) RETURN count(t)'))[0][0]
print(f'Total nodes: {count}')  # Always prints 4096

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions