Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + const QuerySourceConsolidator + const QuerySourceMySQL + var DefaultQsConfig = TabletConfig + var ErrorStats = stats.NewCountersWithSingleLabel("Errors", "Critical errors", "error_code", vtrpcpb.Code_OK.String(), ...) + var Errorf = log.Errorf + var Infof = log.Infof + var InternalErrors = stats.NewCountersWithSingleLabel("InternalErrors", "Internal component errors", "type", "Task", ...) + var KillStats = stats.NewCountersWithSingleLabel("Kills", "Number of connections being killed", "query_type", "Transactions", ...) + var MySQLStats = stats.NewTimings("Mysql", "MySQl query time", "operation") + var QPSRates = stats.NewRates("QPS", QueryStats, 15 * 60 / 5, 5 * time.Second) + var QueryStats = stats.NewTimings("Queries", "MySQL query timings", "plan_type") + var ResultStats = stats.NewHistogram("Results", "Distribution of rows returned", []int64{ ... }) + var StatsLogger = streamlog.New("TabletServer", 50) + var TableaclAllowed = stats.NewCountersWithMultiLabels("TableACLAllowed", "ACL acceptances", []string{ ... }) + var TableaclDenied = stats.NewCountersWithMultiLabels("TableACLDenied", "ACL denials", []string{ ... }) + var TableaclPseudoDenied = stats.NewCountersWithMultiLabels("TableACLPseudoDenied", "ACL pseudodenials", []string{ ... }) + var TxLogger = streamlog.New("TxLog", 10) + var Unresolved = stats.NewGaugesWithSingleLabel("Unresolved", "Unresolved items", "item_type", "Prepares") + var UserTableQueryCount = stats.NewCountersWithMultiLabels("UserTableQueryCount", "Queries received for each CallerID/table combination", ...) + var UserTableQueryTimesNs = stats.NewCountersWithMultiLabels("UserTableQueryTimesNs", "Total latency for each CallerID/table combination", ...) + var UserTransactionCount = stats.NewCountersWithMultiLabels("UserTransactionCount", "transactions received for each CallerID", ...) + var UserTransactionTimesNs = stats.NewCountersWithMultiLabels("UserTransactionTimesNs", "Total transaction latency for each CallerID", ...) + var WaitStats = stats.NewTimings("Waits", "Wait operations", "type") + var Warningf = log.Warningf + var Warnings = stats.NewCountersWithSingleLabel("Warnings", "Warnings", "type", "ResultsExceeded") + func Init() + func IsLocalContext(ctx context.Context) bool + func LocalContext() context.Context + func LogError() + func RecordUserQuery(ctx context.Context, tableName sqlparser.TableIdent, queryType string, ...) + func VerifyConfig() error + type LogStats struct + BindVariables map[string]*querypb.BindVariable + Ctx context.Context + EndTime time.Time + Error error + Method string + MysqlResponseTime time.Duration + NumberOfQueries int + OriginalSQL string + PlanType string + QuerySources byte + Rows [][]sqltypes.Value + RowsAffected int + StartTime time.Time + Target *querypb.Target + TransactionID int64 + WaitingForConnection time.Duration + func NewLogStats(ctx context.Context, methodName string) *LogStats + func (stats *LogStats) AddRewrittenSQL(sql string, start time.Time) + func (stats *LogStats) CallInfo() (string, string) + func (stats *LogStats) Context() context.Context + func (stats *LogStats) ContextHTML() template.HTML + func (stats *LogStats) EffectiveCaller() string + func (stats *LogStats) ErrorStr() string + func (stats *LogStats) EventTime() time.Time + func (stats *LogStats) FmtQuerySources() string + func (stats *LogStats) ImmediateCaller() string + func (stats *LogStats) Logf(w io.Writer, params url.Values) error + func (stats *LogStats) RewrittenSQL() string + func (stats *LogStats) Send() + func (stats *LogStats) SizeOfResponse() int + func (stats *LogStats) TotalTime() time.Duration + type TabletConfig struct + AllowUnsafeDMLs bool + EnableConsolidator bool + EnableConsolidatorReplicas bool + EnableHotRowProtection bool + EnableHotRowProtectionDryRun bool + EnableQueryPlanFieldCaching bool + EnableTableACLDryRun bool + EnableTxThrottler bool + EnforceStrictTransTables bool + FoundRowsPoolSize int + HeartbeatEnable bool + HeartbeatInterval time.Duration + HotRowProtectionConcurrentTransactions int + HotRowProtectionMaxGlobalQueueSize int + HotRowProtectionMaxQueueSize int + IdleTimeout float64 + MaxDMLRows int + MaxResultSize int + MessagePoolSize int + MessagePostponeCap int + PassthroughDMLs bool + PoolNamePrefix string + PoolPrefillParallelism int + PoolSize int + QueryPlanCacheSize int + QueryPoolTimeout float64 + QueryPoolWaiterCap int + QueryTimeout float64 + SchemaReloadTime float64 + StreamBufferSize int + StreamPoolPrefillParallelism int + StreamPoolSize int + StrictTableACL bool + TableACLExemptACL string + TerseErrors bool + TransactionCap int + TransactionTimeout float64 + TwoPCAbandonAge float64 + TwoPCCoordinatorAddress string + TwoPCEnable bool + TxPoolPrefillParallelism int + TxPoolTimeout float64 + TxPoolWaiterCap int + TxShutDownGracePeriod float64 + TxThrottlerConfig string + TxThrottlerHealthCheckCells []string + WarnResultSize int + WatchReplication bool + var Config TabletConfig + type TransactionLimitConfig struct + EnableTransactionLimit bool + EnableTransactionLimitDryRun bool + TransactionLimitByComponent bool + TransactionLimitByPrincipal bool + TransactionLimitBySubcomponent bool + TransactionLimitByUsername bool + TransactionLimitPerUser float64