elementary-data / elementary

The dbt-native data observability solution for data & analytics engineers. Monitor your data pipelines in minutes. Available as self-hosted or cloud service with premium features.
https://www.elementary-data.com/
Apache License 2.0
1.94k stars 165 forks source link

on-run-end hook failed on Spark for concurrent dbt runs #1718

Open tinolyuu opened 1 month ago

tinolyuu commented 1 month ago

Describe the bug

Got this error when running multiple dbt models at the same time

Conflicting commit: {"timestamp":1727626311790,"operation":"DELETE","operationParameters":{"predicate":["true"]},"readVersion":21941,"isolationLevel":"Serializable","isBlindAppend":false,"operationMetrics":{"numRemovedFiles":"1","numRemovedBytes":"93969","numCopiedRows":"0","numDeletionVectorsAdded":"0","numDeletionVectorsRemoved":"0","numAddedChangeFiles":"0","executionTimeMs":"1736","numDeletionVectorsUpdated":"0","numDeletedRows":"2151","scanTimeMs":"1735","numAddedFiles":"0","numAddedBytes":"0","rewriteTimeMs":"0"},"engineInfo":"Apache-Spark/3.5.1 Delta-Lake/3.1.0","txnId":"4df3ddeb-e2ff-4653-86ed-a58a9d632eff"}

The error came from this query

delete from elementary.dbt_models where 1=1

To Reproduce

Run multiple dbt jobs in parallel