delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.62k stars 1.71k forks source link

[BUG] : Exception of class ConcurrentDeleteDeleteException not raised by OPTIMIZE command #2759

Open Jigar191089 opened 8 months ago

Jigar191089 commented 8 months ago

Description

when 2 jobs run OPTIMIZE command on same delta table, one of them throws Py4JJavaError exception. I was expecting ConcurrentDeleteDeleteException exception.

Steps to reproduce

Run OPTIMIZE command concurrently on same delta table

Observed results

Exception of Py4JJavaError is raised image

Expected results

Exception of ConcurrentDeleteDeleteException

Further details

Environment information

Willingness to contribute

The Delta Lake Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the Delta Lake code base?

tlm365 commented 8 months ago

@Jigar191089 "Exception of Py4JJavaError is raised" it's not directly related to Delta, it comes from Spark (particular Py4j module). I'm not sure about why you wanna catch ConcurrentDeleteDeleteException, but perhaps you need accept current problem or using Delta lib instead of Spark (ref: oss docs / db docs). Hope it's useful to you.

Jigar191089 commented 5 months ago

I am running OPTIMIZE command which is related to Delta. So I was expecting ConcurrentDeleteDeleteException Exception instead of Py4JJavaError