Skip to content

Commit 748848c

Browse files
author
Nikos Papailiou
committed
Delete updates array after consolidation
1 parent 45e0ca9 commit 748848c

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

apis/python/src/tiledb/vector_search/index.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ def delete_batch(self, external_ids: np.array):
104104
def get_updates_uri(self):
105105
return self.update_arrays_uri
106106

107-
def print_updates(self):
108-
updates_array = tiledb.open(self.update_arrays_uri, mode="r")
109-
print(updates_array[:])
110-
111107
def read_additions(self) -> (np.ndarray, np.array):
112108
if self.update_arrays_uri is None:
113109
return None, None
@@ -152,11 +148,13 @@ def open_updates_array(self):
152148

153149
def consolidate_updates(self):
154150
from tiledb.vector_search.ingestion import ingest
155-
return ingest(
151+
new_index = ingest(
156152
index_type=self.index_type,
157153
index_uri=self.uri,
158154
size=self.size,
159155
source_uri=self.db_uri,
160156
external_ids_uri=self.ids_uri,
161157
updates_uri=self.update_arrays_uri
162158
)
159+
tiledb.Array.delete_array(self.update_arrays_uri)
160+
return new_index

0 commit comments

Comments
 (0)