-
Notifications
You must be signed in to change notification settings - Fork 581
Transaction support #975
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Usage(as of 0.3.2-patch11):
Performance penalty for transaction support is acceptable(on client side): |
Hello, can you provide an example of transactional data insertion using PreparedStatement about JDBC Driver? |
Hi @hantaoliulinux, did you run into any issue using above examples? The usage is same for Statement and PreparedStatement. FYI, transaction won't start in 0.4.0 and 0.4.1, please use v0.3.2-patch11(or wait for 0.4.2) for transaction support. |
Транзакции пока не поддерживаются ClickHouse. Ref: ClickHouse/clickhouse-java#975 Ref: ClickHouse/clickhouse-java#1008 (comment)
Транзакции пока не поддерживаются ClickHouse. Ref: ClickHouse/clickhouse-java#975 Ref: ClickHouse/clickhouse-java#1008 (comment)
Server
Tuple(snapshot_version UInt64, local_txid_counter UInt64, host_id UUID)
transactionID()
,transactionLatestSnapshot()
,transactionOldestSnapshot()
throw_on_unsupported_query_inside_transaction
,wait_changes_become_visible_after_commit_mode
,implicit_transaction
begin transaction
,commit
,rollback
,set transaction snapshot <snapshot id>
,kill transaction where tid=<transaction id>
Java Client
transaction_timeout
, defaults tosession_timeout
ClickHouseTransaction
with methods for begin/commit/rollback transaction and snapshotClickHouseRequestManager
for generating query id and session id as well as transaction creationClickHouseRequest
by adding methods getTransaction and setTransaction - multiple requests can take part in one transactionClickHouseTransactionException
forCode: 649. DB::Exception: Cannot execute query because current transaction failed. Expecting ROLLBACK statement. (INVALID_TRANSACTION)
- server will rollback automatically but still needs client to explicitly to acknowledge that by issuerollback
(usingconnection.rollback()
)begin transaction
and enforcesession_check
until transaction completedretry
andfailover
(avoid node switching)JDBC Driver
transactionSupport
(defaults tofalse
)implicit_transaction
in auto commit mode, fallback to TCL when it's not supportedFakeTransaction
when transaction support is enabledThe text was updated successfully, but these errors were encountered: