diff --git a/apis/python/src/tiledb/vector_search/index.py b/apis/python/src/tiledb/vector_search/index.py index e99765b0b..a4495fb1b 100644 --- a/apis/python/src/tiledb/vector_search/index.py +++ b/apis/python/src/tiledb/vector_search/index.py @@ -2,6 +2,7 @@ import json import os import time +import warnings from abc import ABCMeta from abc import abstractmethod from typing import Any, Mapping, Optional @@ -800,6 +801,17 @@ def _set_has_updates(self, has_updates: bool = True): self.group = tiledb.Group(self.uri, "r", ctx=tiledb.Ctx(self.config)) def _consolidate_update_fragments(self): + # Disable update fragment consolidation for TileDB Cloud URIs + # as this is not supported. + if self.uri.startswith("tiledb://"): + warnings.warn( + "Update fragment consolidation is not supported for `tiledb://` URIs. " + "Executing multiple updates without consolidating the update fragments can " + "result in poor search performance. Please make sure that you periodically " + "execute `_consolidate_update_fragments` using the storage filesystem URI.", + stacklevel=2, + ) + return with tiledb.scope_ctx(ctx_or_config=self.config): fragments_info = tiledb.array_fragments(self.updates_array_uri) count_fragments = 0