Skip to content

Commit

Permalink
remove unnecessary updates which are deadlock prone
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Leszczynski <[email protected]>
  • Loading branch information
pawel-big-lebowski committed Jun 29, 2023
1 parent 1ce9aca commit d8c1383
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Changelog

## [Unreleased](https://github.com/MarquezProject/marquez/compare/0.36.0...HEAD)
### Fixed
* API: remove unnecessary DB updates [`#2531`](https://github.com/MarquezProject/marquez/pull/2531)[@pawel-big-lebowski]( https://github.com/pawel-big-lebowski)
*Prevent updates that are not needed and are deadlock prone.*

## [0.36.0](https://github.com/MarquezProject/marquez/compare/0.35.0...0.36.0) - 2023-06-27
### Added
Expand Down
2 changes: 0 additions & 2 deletions api/src/main/java/marquez/db/SourceDao.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public interface SourceDao {
+ ") ON CONFLICT(name) DO UPDATE SET "
+ "type = EXCLUDED.type, "
+ "updated_at = EXCLUDED.updated_at, "
+ "name = EXCLUDED.name, "
+ "connection_url = EXCLUDED.connection_url "
+ "RETURNING *")
SourceRow upsert(UUID uuid, String type, Instant now, String name, String connectionUrl);
Expand All @@ -75,7 +74,6 @@ public interface SourceDao {
+ ") ON CONFLICT(name) DO UPDATE SET "
+ "type = EXCLUDED.type, "
+ "updated_at = EXCLUDED.updated_at, "
+ "name = EXCLUDED.name, "
+ "connection_url = EXCLUDED.connection_url, "
+ "description = EXCLUDED.description "
+ "RETURNING *")
Expand Down

0 comments on commit d8c1383

Please sign in to comment.