diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d52ca4e6f7..035c106294 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -600,7 +600,7 @@ jobs: contents: read services: postgres: - image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 + image: tensorchord/vchord-postgres:pg14-v0.3.0 env: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres diff --git a/e2e/docker-compose.yml b/e2e/docker-compose.yml index 48c17c828b..294bdcc5a2 100644 --- a/e2e/docker-compose.yml +++ b/e2e/docker-compose.yml @@ -37,8 +37,8 @@ services: image: redis:6.2-alpine@sha256:3211c33a618c457e5d241922c975dbc4f446d0bdb2dc75694f5573ef8e2d01fa database: - image: tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:739cdd626151ff1f796dc95a6591b55a714f341c737e27f045019ceabf8e8c52 - command: -c fsync=off -c shared_preload_libraries=vectors.so + image: tensorchord/vchord-postgres:pg14-v0.3.0 + command: -c fsync=off -c shared_preload_libraries=vchord.so environment: POSTGRES_PASSWORD: postgres POSTGRES_USER: postgres diff --git a/server/src/queries/search.repository.sql b/server/src/queries/search.repository.sql index 818c6d0d4a..4df068fe61 100644 --- a/server/src/queries/search.repository.sql +++ b/server/src/queries/search.repository.sql @@ -84,7 +84,7 @@ limit $7 offset $8 -rollback +commit -- SearchRepository.searchDuplicates begin @@ -115,7 +115,7 @@ from "cte" where "cte"."distance" <= $7 -rollback +commit -- SearchRepository.searchFaces begin diff --git a/server/test/medium.factory.ts b/server/test/medium.factory.ts index 6f4f46c075..8b730c2b41 100644 --- a/server/test/medium.factory.ts +++ b/server/test/medium.factory.ts @@ -170,7 +170,7 @@ export const getRepository = (key: K, db: Kys } case 'search': { - return new SearchRepository(db, new ConfigRepository()); + return new SearchRepository(db); } case 'session': { diff --git a/server/test/medium/globalSetup.ts b/server/test/medium/globalSetup.ts index 4398da5c0a..8164df74a3 100644 --- a/server/test/medium/globalSetup.ts +++ b/server/test/medium/globalSetup.ts @@ -7,7 +7,7 @@ import { getKyselyConfig } from 'src/utils/database'; import { GenericContainer, Wait } from 'testcontainers'; const globalSetup = async () => { - const postgresContainer = await new GenericContainer('tensorchord/pgvecto-rs:pg14-v0.2.0') + const postgresContainer = await new GenericContainer('tensorchord/vchord-postgres:pg14-v0.3.0') .withExposedPorts(5432) .withEnvironment({ POSTGRES_PASSWORD: 'postgres', @@ -17,9 +17,7 @@ const globalSetup = async () => { .withCommand([ 'postgres', '-c', - 'shared_preload_libraries=vectors.so', - '-c', - 'search_path="$$user", public, vectors', + 'shared_preload_libraries=vchord.so', '-c', 'max_wal_size=2GB', '-c', diff --git a/server/test/repositories/database.repository.mock.ts b/server/test/repositories/database.repository.mock.ts index 7933bd8188..171e04fe33 100644 --- a/server/test/repositories/database.repository.mock.ts +++ b/server/test/repositories/database.repository.mock.ts @@ -13,6 +13,9 @@ export const newDatabaseRepositoryMock = (): Mocked() => Promise) => function_()),