FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix: Fixed IntegrityError on SqlRegistry by ntkathole · Pull Request #6047 · feast-dev/feast · GitHub

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 10 additions & 2 deletions sdk/python/feast/infra/registry/sql.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
update,
)
from sqlalchemy.engine import Engine
from sqlalchemy.exc import IntegrityError

from feast import utils
from feast.base_feature_view import BaseFeatureView
Expand Down Expand Up @@ -1028,8 +1029,15 @@ def _maybe_init_project_metadata(self, project):
"last_updated_timestamp": update_time,
"project_id": project,
}
insert_stmt = insert(feast_metadata).values(values)
conn.execute(insert_stmt)
try:
with conn.begin_nested():
conn.execute(insert(feast_metadata).values(values))
except IntegrityError:
logger.info(
"Project metadata for %s already initialized by "
"another process.",
project,
)
Comment thread
devin-ai-integration[bot] marked this conversation as resolved.

def _delete_object(
self,
Expand Down
Loading

Back | FazBrowse Home | New Git URL