Skip to content

Commit b9cadd5

Browse files
authored
feat: Set optional full-scan for deletion (#4189)
1 parent ff429c9 commit b9cadd5

File tree

1 file changed

+9
-2
lines changed
  • sdk/python/feast/infra/online_stores

1 file changed

+9
-2
lines changed

sdk/python/feast/infra/online_stores/redis.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ class RedisOnlineStoreConfig(FeastConfigBaseModel):
7777
key_ttl_seconds: Optional[int] = None
7878
"""(Optional) redis key bin ttl (in seconds) for expiring entities"""
7979

80+
full_scan_for_deletion: Optional[bool] = True
81+
"""(Optional) whether to scan for deletion of features"""
82+
8083

8184
class RedisOnlineStore(OnlineStore):
8285
"""
@@ -162,9 +165,13 @@ def update(
162165
entities_to_keep: Entities to keep
163166
partial: Whether to do a partial update
164167
"""
168+
online_store_config = config.online_store
169+
170+
assert isinstance(online_store_config, RedisOnlineStoreConfig)
165171

166-
for table in tables_to_delete:
167-
self.delete_table(config, table)
172+
if online_store_config.full_scan_for_deletion:
173+
for table in tables_to_delete:
174+
self.delete_table(config, table)
168175

169176
def teardown(
170177
self,

0 commit comments

Comments
 (0)