fix: narrow ValueError catch in _create_table and increase test timeout

This commit is contained in:
Greyson LaLonde
2026-03-11 09:28:35 -04:00
parent 7ac3e66d31
commit e0dc25c757
2 changed files with 3 additions and 2 deletions

View File

@@ -210,9 +210,10 @@ class LanceDBStorage:
]
try:
table = self._db.create_table(self._table_name, placeholder)
table.delete("id = '__schema_placeholder__'")
except ValueError:
table = self._db.open_table(self._table_name)
else:
table.delete("id = '__schema_placeholder__'")
return table
def _ensure_scope_index(self) -> None:

View File

@@ -13,7 +13,6 @@ import multiprocessing
import os
import sqlite3
import tempfile
from pathlib import Path
import pytest
@@ -166,6 +165,7 @@ def _run_workers(target, args_fn, n_workers=N_WORKERS, timeout=120):
return successes, errors
@pytest.mark.timeout(120)
class TestConcurrentLanceDB:
"""Concurrent multi-process writes to LanceDB."""