Skip to content

Commit ea1fb28

Browse files
felixwang9817HeardACat
authored andcommitted
Increase efficiency of Registry updates (feast-dev#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> Signed-off-by: CS <2498638+charliec443@users.noreply.github.com>
1 parent 370afed commit ea1fb28

File tree

4 files changed

+509
-153
lines changed

4 files changed

+509
-153
lines changed

sdk/python/feast/feature_store.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ def apply(
218218
"""
219219

220220
# TODO: Add locking
221-
# TODO: Optimize by only making a single call (read/write)
222221

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

245244
for view in views_to_update:
246-
self._registry.apply_feature_view(view, project=self.project)
245+
self._registry.apply_feature_view(view, project=self.project, commit=False)
247246
for ent in entities_to_update:
248-
self._registry.apply_entity(ent, project=self.project)
247+
self._registry.apply_entity(ent, project=self.project, commit=False)
248+
self._registry.commit()
249249

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

0 commit comments

Comments
 (0)