From b8a9c37af5ec32f67154fc96fc68a4ff85a34c42 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Fri, 17 Feb 2023 21:25:08 +0200 Subject: [PATCH] Revert "config: enable data index caching by default" This reverts commit 1af63acae59729327cf0839d573d17990d630ac7. --- dvc/config_schema.py | 2 +- dvc/repo/__init__.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dvc/config_schema.py b/dvc/config_schema.py index f90ef8f58..96c20995c 100644 --- a/dvc/config_schema.py +++ b/dvc/config_schema.py @@ -264,8 +264,8 @@ SCHEMA = { # section for experimental features "feature": { Optional("machine", default=False): Bool, - # enabled by default. It's of no use, kept for backward compatibility. Optional("data_index_cache", default=False): Bool, + # enabled by default. It's of no use, kept for backward compatibility. Optional("parametrization", default=True): Bool, }, "plots": { diff --git a/dvc/repo/__init__.py b/dvc/repo/__init__.py index 9e0c7b150..dee85d6db 100644 --- a/dvc/repo/__init__.py +++ b/dvc/repo/__init__.py @@ -381,6 +381,9 @@ class Repo: def data_index(self) -> Optional["DataIndex"]: from dvc_data.index import DataIndex + if not self.config["feature"].get("data_index_cache"): + return None + if not self.index_db_dir: return None