diff --git a/CHANGELOG.md b/CHANGELOG.md index be25a530a892d..8a9db259aea85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ The corresponding JWT config can be: **NOTE:** If you have event triggers with names greater than 42 chars, then you should update their names to avoid running into Postgres identifier limit bug (#5786) - server: fix issue with tracking custom functions that return `SETOF` materialized view (close #5294) (#5945) - server: allow remote relationships with union, interface and enum type fields as well (fixes #5875) (#6080) +- cli: fix bug in metadata apply which made the server aquire some redundant and unnecessary locks (close #6115) ### Breaking change diff --git a/cli/migrate/database/hasuradb/metadata.go b/cli/migrate/database/hasuradb/metadata.go index 01e48632a4b76..1d8ad654ef06d 100644 --- a/cli/migrate/database/hasuradb/metadata.go +++ b/cli/migrate/database/hasuradb/metadata.go @@ -180,18 +180,9 @@ func (h *HasuraDB) ApplyMetadata() error { if err != nil { return err } - query := HasuraInterfaceBulk{ - Type: "bulk", - Args: []interface{}{ - HasuraInterfaceQuery{ - Type: "clear_metadata", - Args: HasuraArgs{}, - }, - HasuraInterfaceQuery{ - Type: "replace_metadata", - Args: obj, - }, - }, + query := HasuraInterfaceQuery{ + Type: "replace_metadata", + Args: obj, } resp, body, err := h.sendv1Query(query) if err != nil {