Skip to content

Commit 144f25c

Browse files
author
DvirDukhan
authored
avoid using transactions on redis-py (#2296)
Signed-off-by: DvirDukhan <[email protected]>
1 parent b86a99b commit 144f25c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • sdk/python/feast/infra/online_stores

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class RedisOnlineStore(OnlineStore):
7575
def delete_entity_values(self, config: RepoConfig, join_keys: List[str]):
7676
client = self._get_client(config.online_store)
7777
deleted_count = 0
78-
pipeline = client.pipeline()
78+
pipeline = client.pipeline(transaction=False)
7979
prefix = _redis_key_prefix(join_keys)
8080

8181
for _k in client.scan_iter(
@@ -188,7 +188,7 @@ def online_write_batch(
188188
ts_key = f"_ts:{feature_view}"
189189
keys = []
190190
# redis pipelining optimization: send multiple commands to redis server without waiting for every reply
191-
with client.pipeline() as pipe:
191+
with client.pipeline(transaction=False) as pipe:
192192
# check if a previous record under the key bin exists
193193
# TODO: investigate if check and set is a better approach rather than pulling all entity ts and then setting
194194
# it may be significantly slower but avoids potential (rare) race conditions
@@ -262,7 +262,7 @@ def online_read(
262262
for entity_key in entity_keys:
263263
redis_key_bin = _redis_key(project, entity_key)
264264
keys.append(redis_key_bin)
265-
with client.pipeline() as pipe:
265+
with client.pipeline(transaction=False) as pipe:
266266
for redis_key_bin in keys:
267267
pipe.hmget(redis_key_bin, hset_keys)
268268
with tracing_span(name="remote_call"):

0 commit comments

Comments
 (0)