Share via


MULTI_STATEMENT_TRANSACTION_CONTEXT_MISMATCH error condition

SQLSTATE: 25000

Transaction context inconsistency was detected between the current thread and the Spark session. This typically occurs when a Spark session is shared across multiple threads. Please use a dedicated session and thread for each transaction, and commit/rollback the transaction in its thread before reusing the session and thread for a new transaction. Details:

ACTIVE_IN_SPARK_SESSION_BUT_NOT_IN_THREAD

A transaction is active in the Spark session but not in the current thread.

ACTIVE_IN_THREAD_BUT_NOT_IN_SPARK_SESSION

A transaction is active in the current thread but not in the Spark session.

ID_MISMATCH

Transaction IDs do not match between the current thread and the Spark session.

INITIALIZATION_CONFLICT

There is a race condition when attempting to start multiple transactions on the same Spark session from different threads.