cockroach: github.com/cockroachdb/cockroach/pkg/storage/txnrecovery Index | Files

package txnrecovery

import "github.com/cockroachdb/cockroach/pkg/storage/txnrecovery"

Index

Package Files

manager.go metrics.go

type Manager Uses

type Manager interface {
    // ResolveIndeterminateCommit attempts to resolve the status of transactions
    // that have been abandoned while in the STAGING state, attempting to commit.
    // Unlike most transitions in the transaction state machine, moving from the
    // STAGING state to any other state requires global coordination instead of
    // localized coordination. This method performs this coordination with the
    // goal of finalizing the transaction as either COMMITTED or ABORTED.
    //
    // The method may also return a transaction in any other state if it is
    // discovered to still be live and undergoing state transitions.
    ResolveIndeterminateCommit(
        context.Context, *roachpb.IndeterminateCommitError,
    ) (*roachpb.Transaction, error)

    // Metrics returns the Manager's metrics struct.
    Metrics() Metrics
}

Manager organizes the recovery of transactions whose states require global (as opposed to local) coordination to transition away from.

func NewManager Uses

func NewManager(
    ac log.AmbientContext, clock *hlc.Clock, db *client.DB, stopper *stop.Stopper,
) Manager

NewManager returns an implementation of a transaction recovery Manager.

type Metrics Uses

type Metrics struct {
    AttemptsPending      *metric.Gauge
    Attempts             *metric.Counter
    SuccessesAsCommitted *metric.Counter
    SuccessesAsAborted   *metric.Counter
    SuccessesAsPending   *metric.Counter
    Failures             *metric.Counter
}

Metrics holds all metrics relating to a transaction recovery Manager.

Package txnrecovery imports 10 packages (graph) and is imported by 1 packages. Updated 2019-08-01. Refresh now. Tools for package owners.