@@ -70,11 +70,6 @@ def _drop_sql_index_if_exists(store: OracleDocumentStore, index_name: str) -> No
7070 raise
7171
7272
73- def _skip_if_vector_memory_exhausted (exc : oracledb .DatabaseError ) -> None :
74- if "ORA-51962" in str (exc ):
75- pytest .skip ("Oracle vector memory area is exhausted; live vector index creation is unavailable" )
76-
77-
7873@contextmanager
7974def _temporary_store (
8075 connection_config , embedding_dim : int = 4 , * , prefix : str = "HS_IT"
@@ -154,20 +149,16 @@ def test_hnsw_vector_index_creation_live(connection_config) -> None:
154149 policy = DuplicatePolicy .NONE ,
155150 )
156151 try :
157- try :
158- hnsw_store .create_vector_index (
159- index_type = "HNSW" ,
160- params = {
161- "idx_name" : hnsw_index_name ,
162- "neighbors" : 2 ,
163- "efConstruction" : 16 ,
164- "accuracy" : 80 ,
165- "parallel" : 1 ,
166- },
167- )
168- except oracledb .DatabaseError as exc :
169- _skip_if_vector_memory_exhausted (exc )
170- raise
152+ hnsw_store .create_vector_index (
153+ index_type = "HNSW" ,
154+ params = {
155+ "idx_name" : hnsw_index_name ,
156+ "neighbors" : 2 ,
157+ "efConstruction" : 16 ,
158+ "accuracy" : 80 ,
159+ "parallel" : 1 ,
160+ },
161+ )
171162 finally :
172163 _drop_sql_index_if_exists (hnsw_store , hnsw_index_name )
173164
@@ -180,19 +171,15 @@ def test_ivf_vector_index_creation_live(connection_config) -> None:
180171 policy = DuplicatePolicy .NONE ,
181172 )
182173 try :
183- try :
184- ivf_store .create_vector_index (
185- index_type = "IVF" ,
186- params = {
187- "idx_name" : ivf_index_name ,
188- "neighbor_partitions" : 1 ,
189- "accuracy" : 90 ,
190- "parallel" : 1 ,
191- },
192- )
193- except oracledb .DatabaseError as exc :
194- _skip_if_vector_memory_exhausted (exc )
195- raise
174+ ivf_store .create_vector_index (
175+ index_type = "IVF" ,
176+ params = {
177+ "idx_name" : ivf_index_name ,
178+ "neighbor_partitions" : 1 ,
179+ "accuracy" : 90 ,
180+ "parallel" : 1 ,
181+ },
182+ )
196183 finally :
197184 _drop_sql_index_if_exists (ivf_store , ivf_index_name )
198185
@@ -206,19 +193,15 @@ async def test_async_ivf_vector_index_creation_live(connection_config) -> None:
206193 policy = DuplicatePolicy .NONE ,
207194 )
208195 try :
209- try :
210- await store .create_vector_index_async (
211- index_type = "IVF" ,
212- params = {
213- "idx_name" : index_name ,
214- "neighbor_partitions" : 1 ,
215- "accuracy" : 90 ,
216- "parallel" : 1 ,
217- },
218- )
219- except oracledb .DatabaseError as exc :
220- _skip_if_vector_memory_exhausted (exc )
221- raise
196+ await store .create_vector_index_async (
197+ index_type = "IVF" ,
198+ params = {
199+ "idx_name" : index_name ,
200+ "neighbor_partitions" : 1 ,
201+ "accuracy" : 90 ,
202+ "parallel" : 1 ,
203+ },
204+ )
222205 finally :
223206 _drop_sql_index_if_exists (store , index_name )
224207
0 commit comments