-
Notifications
You must be signed in to change notification settings - Fork 40
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
Set pessimistic connection #80
Comments
Hi! Weir use TiDB default transaction mode, and starting from v3.0.8, newly created TiDB clusters use the pessimistic transaction mode by default. https://docs.pingcap.com/tidb/stable/pessimistic-transaction However, Weir does not support modify session scope transaction mode by |
Hi, Here is a log from our Weir proxy: Here is the configuration of our tidb : We're using tidb 5.4. Why is our Weir is using optimisitic when our cluster is set to pessimistic ? |
What's the result of |
Pessimistic ... But again this morning : |
This is a bug, func (cc *clientConn) Run(ctx context.Context) {
...
var txnMode string
if cc.ctx != nil {
txnMode = cc.ctx.GetSessionVars().GetReadableTxnMode()
}
...
} However, this method use func (s *SessionVars) GetReadableTxnMode() string {
txnMode := s.TxnMode
if txnMode == "" {
txnMode = ast.Optimistic
}
return txnMode
} Please DO NOT depend on txn mode in log. Execute |
Thank you for your reactivity and your reliability. Regards, |
Hi,
Is it possible to set connection and querying to pessimistic instead of optimistic? I don't find where to set this option.
regards,
YM
The text was updated successfully, but these errors were encountered: