func (c CommitterProbe) CheckAsyncCommit() bool {
	return c.checkAsyncCommit()
}
CheckAsyncCommit returns if async commit is available.
package transaction
import (
	"bytes"
	"context"
	"sync/atomic"
	"time"
	"github.com/tikv/client-go/v2/internal/locate"
	"github.com/tikv/client-go/v2/internal/retry"
	"github.com/tikv/client-go/v2/internal/unionstore"
	"github.com/tikv/client-go/v2/tikvrpc"
	"github.com/tikv/client-go/v2/txnkv/txnsnapshot"
)
type TxnProbe struct {
	*KVTxn
}
func (txn TxnProbe) SetStartTS(ts uint64) {
	txn.startTS = ts
}
func (txn TxnProbe) GetCommitTS() uint64 {
	return txn.commitTS
}
func (txn TxnProbe) GetUnionStore() *unionstore.KVUnionStore {
	return txn.us
}
func (txn TxnProbe) IsAsyncCommit() bool {
	return txn.committer.isAsyncCommit()
}
func (txn TxnProbe) NewCommitter(sessionID uint64) (CommitterProbe, error) {
	committer, err := newTwoPhaseCommitterWithInit(txn.KVTxn, sessionID)
	return CommitterProbe{twoPhaseCommitter: committer}, err
}
func (txn TxnProbe) GetCommitter() CommitterProbe {
	return CommitterProbe{txn.committer}
}
func (txn TxnProbe) SetCommitter(committer CommitterProbe) {
	txn.committer = committer.twoPhaseCommitter
}
func (txn TxnProbe) CollectLockedKeys() [][]byte {
	return txn.collectLockedKeys()
}
func (txn TxnProbe) BatchGetSingleRegion(bo *retry.Backoffer, region locate.RegionVerID, keys [][]byte, collect func([]byte, []byte)) error {
	snapshot := txnsnapshot.SnapshotProbe{KVSnapshot: txn.GetSnapshot()}
	return snapshot.BatchGetSingleRegion(bo, region, keys, collect)
}
func (txn TxnProbe) NewScanner(start, end []byte, batchSize int, reverse bool) (*txnsnapshot.Scanner, error) {
	snapshot := txnsnapshot.SnapshotProbe{KVSnapshot: txn.GetSnapshot()}
	return snapshot.NewScanner(start, end, batchSize, reverse)
}
func (txn TxnProbe) GetStartTime() time.Time {
	return txn.startTime
}
func newTwoPhaseCommitterWithInit(txn *KVTxn, sessionID uint64) (*twoPhaseCommitter, error) {
	c, err := newTwoPhaseCommitter(txn, sessionID)
	if err != nil {
		return nil, err
	}
	if err = c.initKeysAndMutations(); err != nil {
		return nil, err
	}
	return c, nil
}
type CommitterProbe struct {
	*twoPhaseCommitter
}
func (c CommitterProbe) InitKeysAndMutations() error {
	return c.initKeysAndMutations()
}
func (c CommitterProbe) SetPrimaryKey(key []byte) {
	c.primaryKey = key
}
func (c CommitterProbe) GetPrimaryKey() []byte {
	return c.primaryKey
}
func (c CommitterProbe) GetMutations() CommitterMutations {
	return c.mutations
}
func (c CommitterProbe) SetMutations(muts CommitterMutations) {
	c.mutations = muts.(*memBufferMutations)
}
func (c CommitterProbe) SetCommitTS(ts uint64) {
	atomic.StoreUint64(&c.commitTS, ts)
}
func (c CommitterProbe) GetCommitTS() uint64 {
	return atomic.LoadUint64(&c.commitTS)
}
func (c CommitterProbe) GetMinCommitTS() uint64 {
	return c.minCommitTS
}
func (c CommitterProbe) SetMinCommitTS(ts uint64) {
	c.minCommitTS = ts
}
func (c CommitterProbe) SetMaxCommitTS(ts uint64) {
	c.maxCommitTS = ts
}
func (c CommitterProbe) SetSessionID(id uint64) {
	c.sessionID = id
}
func (c CommitterProbe) GetForUpdateTS() uint64 {
	return c.forUpdateTS
}
func (c CommitterProbe) SetForUpdateTS(ts uint64) {
	c.forUpdateTS = ts
}
func (c CommitterProbe) GetStartTS() uint64 {
	return c.startTS
}
func (c CommitterProbe) GetLockTTL() uint64 {
	return c.lockTTL
}
func (c CommitterProbe) SetLockTTL(ttl uint64) {
	c.lockTTL = ttl
}
func (c CommitterProbe) SetLockTTLByTimeAndSize(start time.Time, size int) {
	c.lockTTL = txnLockTTL(start, size)
}
func (c CommitterProbe) SetTxnSize(sz int) {
	c.txnSize = sz
	c.lockTTL = txnLockTTL(c.txn.startTime, sz)
}
func (c CommitterProbe) SetUseAsyncCommit() {
	c.useAsyncCommit = 1
}
func (c CommitterProbe) Execute(ctx context.Context) error {
	return c.execute(ctx)
}
func (c CommitterProbe) PrewriteAllMutations(ctx context.Context) error {
	return c.PrewriteMutations(ctx, c.mutations)
}
func (c CommitterProbe) PrewriteMutations(ctx context.Context, mutations CommitterMutations) error {
	return c.prewriteMutations(retry.NewBackofferWithVars(ctx, PrewriteMaxBackoff, nil), mutations)
}
func (c CommitterProbe) CommitMutations(ctx context.Context) error {
	return c.commitMutations(retry.NewBackofferWithVars(ctx, int(atomic.LoadUint64(&CommitMaxBackoff)), nil), c.mutationsOfKeys([][]byte{c.primaryKey}))
}
func (c CommitterProbe) MutationsOfKeys(keys [][]byte) CommitterMutations {
	return c.mutationsOfKeys(keys)
}
func (c CommitterProbe) PessimisticRollbackMutations(ctx context.Context, muts CommitterMutations) error {
	return c.pessimisticRollbackMutations(retry.NewBackofferWithVars(ctx, pessimisticRollbackMaxBackoff, nil), muts)
}
func (c CommitterProbe) Cleanup(ctx context.Context) {
	c.cleanup(ctx)
	c.cleanWg.Wait()
}
func (c CommitterProbe) WaitCleanup() {
	c.cleanWg.Wait()
}
func (c CommitterProbe) IsOnePC() bool {
	return c.isOnePC()
}
func (c CommitterProbe) BuildPrewriteRequest(regionID, regionConf, regionVersion uint64, mutations CommitterMutations, txnSize uint64) *tikvrpc.Request {
	var batch batchMutations
	batch.mutations = mutations
	batch.region = locate.NewRegionVerID(regionID, regionConf, regionVersion)
	for _, key := range mutations.GetKeys() {
		if bytes.Equal(key, c.primary()) {
			batch.isPrimary = true
			break
		}
	}
	return c.buildPrewriteRequest(batch, txnSize)
}
func (c CommitterProbe) IsAsyncCommit() bool {
	return c.isAsyncCommit()
}