mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
Use bulk calls for checking which entries are not in remote (#10923)
Co-authored-by: Sami Jawhar <[email protected]> Co-authored-by: skshetry <[email protected]>
This commit is contained in:
co-authored by
Sami Jawhar
skshetry
parent
796903a14b
commit
a6594e0cc9
+5
-3
@@ -456,15 +456,17 @@ def _get_entries_not_in_remote(
|
||||
n += 1
|
||||
cb.set_size(n)
|
||||
|
||||
results = storage_map.bulk_remote_exists(
|
||||
list(entries.values()), refresh=remote_refresh, callback=cb
|
||||
)
|
||||
for key, entry in entries.items():
|
||||
k = (*key, "") if entry.meta and entry.meta.isdir else key
|
||||
try:
|
||||
if not storage_map.remote_exists(entry, refresh=remote_refresh):
|
||||
if not results.get(entry, False):
|
||||
missing_entries.append(os.path.sep.join(k))
|
||||
except StorageKeyError:
|
||||
pass
|
||||
finally:
|
||||
cb.relative_update()
|
||||
|
||||
data_index.onerror = orig_data_index_onerror
|
||||
return missing_entries
|
||||
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ dependencies = [
|
||||
"distro>=1.3",
|
||||
"dpath<3,>=2.1.0",
|
||||
"dulwich",
|
||||
"dvc-data>=3.16.2,<3.17",
|
||||
"dvc-data>=3.17.0,<3.18",
|
||||
"dvc-http>=2.29.0",
|
||||
"dvc-objects",
|
||||
"dvc-render>=1.0.1,<2",
|
||||
|
||||
Reference in New Issue
Block a user