Skip to content

Commit 5e89ccf

Browse files
Increase efficiency of Registry updates (#1698)
* Modify Registry to allow for delayed persistence of changes Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Increase efficiency of Registry updates Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Registry tests Signed-off-by: Felix Wang <wangfelix98@gmail.com> * Change copyright date Signed-off-by: Felix Wang <wangfelix98@gmail.com>
1 parent 20e0783 commit 5e89ccf

4 files changed

Lines changed: 509 additions & 153 deletions

File tree

sdk/python/feast/feature_store.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,6 @@ def apply(
217217
"""
218218

219219
# TODO: Add locking
220-
# TODO: Optimize by only making a single call (read/write)
221220

222221
if isinstance(objects, Entity) or isinstance(objects, FeatureView):
223222
objects = [objects]
@@ -242,9 +241,10 @@ def apply(
242241
raise ValueError("Unknown object type provided as part of apply() call")
243242

244243
for view in views_to_update:
245-
self._registry.apply_feature_view(view, project=self.project)
244+
self._registry.apply_feature_view(view, project=self.project, commit=False)
246245
for ent in entities_to_update:
247-
self._registry.apply_entity(ent, project=self.project)
246+
self._registry.apply_entity(ent, project=self.project, commit=False)
247+
self._registry.commit()
248248

249249
self._get_provider().update_infra(
250250
project=self.project,

0 commit comments

Comments
 (0)