Documentation ¶
Index ¶
- Constants
- func ScannerEmitMetricsActivity(activityCtx context.Context, params ScannerEmitMetricsActivityParams) error
- type AggregateFixReportResult
- type AggregateScanReportResult
- type Context
- type ControlFlowFailure
- type CorruptedKeysEntry
- type CustomScannerConfig
- type DynamicParams
- type FixKeys
- type FixReport
- type FixReportError
- type FixResult
- type FixShardActivityParams
- type FixShardHeartbeatDetails
- type FixStats
- type Fixer
- type FixerContext
- type FixerCorruptedKeysActivityParams
- type FixerCorruptedKeysActivityResult
- type FixerHooks
- type FixerIteratorCB
- type FixerManagerCB
- type FixerWorkflow
- type FixerWorkflowConfigOverwrites
- type FixerWorkflowParams
- type GenericScannerConfig
- type GenericScannerConfigOverwrites
- type IteratorCB
- type ManagerCB
- type PaginatedShardQueryRequest
- type ResolvedFixerWorkflowConfig
- type ResolvedScannerWorkflowConfig
- type ScanKeys
- type ScanReport
- type ScanReportError
- type ScanResult
- type ScanShardActivityParams
- type ScanShardHeartbeatDetails
- type ScanStats
- type Scanner
- type ScannerConfig
- type ScannerConfigActivityParams
- type ScannerContextKey
- type ScannerEmitMetricsActivityParams
- type ScannerHooks
- type ScannerWorkflow
- type ScannerWorkflowConfigOverwrites
- type ScannerWorkflowParams
- type ShardCorruptKeysQueryResult
- type ShardCorruptKeysResult
- type ShardDistributionStats
- type ShardFixResultAggregator
- func (a *ShardFixResultAggregator) AddReport(report FixReport)
- func (a *ShardFixResultAggregator) GetAggregation() AggregateFixReportResult
- func (a *ShardFixResultAggregator) GetReport(shardID int) (*FixReport, error)
- func (a *ShardFixResultAggregator) GetStatusResult(req PaginatedShardQueryRequest) (*ShardStatusQueryResult, error)
- func (a *ShardFixResultAggregator) GetStatusSummary() ShardStatusSummaryResult
- type ShardFixer
- type ShardQueryPaginationToken
- type ShardRange
- type ShardScanResultAggregator
- func (a *ShardScanResultAggregator) AddReport(report ScanReport)
- func (a *ShardScanResultAggregator) GetAggregateReport() AggregateScanReportResult
- func (a *ShardScanResultAggregator) GetCorruptionKeys(req PaginatedShardQueryRequest) (*ShardCorruptKeysQueryResult, error)
- func (a *ShardScanResultAggregator) GetReport(shardID int) (*ScanReport, error)
- func (a *ShardScanResultAggregator) GetShardDistributionStats() ShardDistributionStats
- func (a *ShardScanResultAggregator) GetShardSizeQueryResult(req ShardSizeQueryRequest) (ShardSizeQueryResult, error)
- func (a *ShardScanResultAggregator) GetStatusResult(req PaginatedShardQueryRequest) (*ShardStatusQueryResult, error)
- func (a *ShardScanResultAggregator) GetStatusSummary() ShardStatusSummaryResult
- type ShardScanner
- type ShardSizeQueryRequest
- type ShardSizeQueryResult
- type ShardSizeTuple
- type ShardStatus
- type ShardStatusQueryResult
- type ShardStatusResult
- type ShardStatusSummaryResult
- type Shards
Constants ¶
const ( // ActivityScannerEmitMetrics is the activity name for ScannerEmitMetricsActivity ActivityScannerEmitMetrics = "cadence-sys-shardscanner-emit-metrics-activity" // ActivityScannerConfig is the activity name ScannerConfigActivity ActivityScannerConfig = "cadence-sys-shardscanner-config-activity" // ActivityScanShard is the activity name for ScanShardActivity ActivityScanShard = "cadence-sys-shardscanner-scanshard-activity" // ActivityFixerCorruptedKeys is the activity name for FixerCorruptedKeysActivity ActivityFixerCorruptedKeys = "cadence-sys-shardscanner-corruptedkeys-activity" // ActivityFixShard is the activity name for FixShardActivity ActivityFixShard = "cadence-sys-shardscanner-fixshard-activity" // ShardCorruptKeysQuery is the query name for the query used to get all completed shards with at least one corruption ShardCorruptKeysQuery = "shard_corrupt_keys" )
const ( // ShardReportQuery is the query name for the query used to get a single shard's report ShardReportQuery = "shard_report" // ShardStatusQuery is the query name for the query used to get the status of all shards ShardStatusQuery = "shard_status" // ShardStatusSummaryQuery is the query name for the query used to get the shard status -> counts map ShardStatusSummaryQuery = "shard_status_summary" // AggregateReportQuery is the query name for the query used to get the aggregate result of all finished shards AggregateReportQuery = "aggregate_report" // ShardSizeQuery is the query name for the query used to get the number of executions per shard in sorted order ShardSizeQuery = "shard_size" )
const ( // ErrScanWorkflowNotClosed indicates fix was attempted on scan workflow which was not finished ErrScanWorkflowNotClosed = "scan workflow is not closed, only can run fix on output of finished scan workflow" // ErrSerialization indicates a serialization or deserialization error occurred ErrSerialization = "encountered serialization error" // ErrMissingHooks indicates scanner is not providing hooks to Invariant manager or Iterator ErrMissingHooks = "hooks are not provided for this scanner" )
Variables ¶
This section is empty.
Functions ¶
func ScannerEmitMetricsActivity ¶
func ScannerEmitMetricsActivity( activityCtx context.Context, params ScannerEmitMetricsActivityParams, ) error
ScannerEmitMetricsActivity will emit metrics for a complete run of ShardScanner
Types ¶
type AggregateFixReportResult ¶
type AggregateFixReportResult FixStats
AggregateFixReportResult indicates the result of summing together all shard reports that have finished for fix.
type AggregateScanReportResult ¶
type AggregateScanReportResult ScanStats
AggregateScanReportResult indicates the result of summing together all shard reports which have finished scan.
type Context ¶
type Context struct { Resource resource.Resource Hooks *ScannerHooks Scope metrics.Scope Config *ScannerConfig ContextKey ScannerContextKey }
Context is the resource that is available in activities under ShardScanner context key
type ControlFlowFailure ¶
ControlFlowFailure indicates an error occurred which makes it impossible to even attempt to check or fix one or more execution(s). Note that it is not a ControlFlowFailure if a check or fix fails, it is only a ControlFlowFailure if an error is encountered which makes even attempting to check or fix impossible.
type CorruptedKeysEntry ¶
CorruptedKeysEntry is a pair of shardID and corrupted keys
type CustomScannerConfig ¶
CustomScannerConfig is used to pass key/value parameters between shardscanner activity and scanner implementation this is used to have activities with better determinism
type DynamicParams ¶
type DynamicParams struct { Enabled dynamicconfig.BoolPropertyFn Concurrency dynamicconfig.IntPropertyFn PageSize dynamicconfig.IntPropertyFn BlobstoreFlushThreshold dynamicconfig.IntPropertyFn ActivityBatchSize dynamicconfig.IntPropertyFn }
DynamicParams is the dynamic config for scanner workflow.
type FixKeys ¶
FixKeys are the keys to the blobs that were uploaded during fix. Keys can be nil if there were no uploads.
type FixReport ¶
FixReport is the report of running Fix on a single shard
func FixShardActivity ¶
func FixShardActivity( activityCtx context.Context, params FixShardActivityParams, ) ([]FixReport, error)
FixShardActivity will fix a collection of shards.
type FixReportError ¶
FixReportError is a type that is used to send either error or report on a channel. Exactly one of Report and ErrorStr should be non-nil.
type FixResult ¶
type FixResult struct { ShardFixKeys *FixKeys ControlFlowFailure *ControlFlowFailure }
FixResult indicates the result of running fix on a shard. Exactly one of ControlFlowFailure or FixKeys will be non-nil.
type FixShardActivityParams ¶
type FixShardActivityParams struct { CorruptedKeysEntries []CorruptedKeysEntry ResolvedFixerWorkflowConfig ResolvedFixerWorkflowConfig ContextKey ScannerContextKey }
FixShardActivityParams is the parameter for FixShardActivity
type FixShardHeartbeatDetails ¶
FixShardHeartbeatDetails is the heartbeat details for the fix shard
type Fixer ¶
type Fixer interface {
Fix() FixReport
}
Fixer is used to fix entities in a shard. It is responsible for three things: 1. Confirming that each entity it scans is corrupted. 2. Attempting to fix any confirmed corrupted executions. 3. Recording skipped entities, failed to fix entities and successfully fix entities to durable store. 4. Producing a FixReport
type FixerContext ¶
type FixerContext struct { Resource resource.Resource Hooks *FixerHooks Scope metrics.Scope Config *ScannerConfig ContextKey ScannerContextKey }
FixerContext is the resource that is available to activities under ShardFixer key
type FixerCorruptedKeysActivityParams ¶
type FixerCorruptedKeysActivityParams struct { ContextKey ScannerContextKey ScannerWorkflowWorkflowID string ScannerWorkflowRunID string StartingShardID *int }
FixerCorruptedKeysActivityParams is the parameter for FixerCorruptedKeysActivity
type FixerCorruptedKeysActivityResult ¶
type FixerCorruptedKeysActivityResult struct { CorruptedKeys []CorruptedKeysEntry MinShard *int MaxShard *int ShardQueryPaginationToken ShardQueryPaginationToken }
FixerCorruptedKeysActivityResult is the result of FixerCorruptedKeysActivity
func FixerCorruptedKeysActivity ¶
func FixerCorruptedKeysActivity( activityCtx context.Context, params FixerCorruptedKeysActivityParams, ) (*FixerCorruptedKeysActivityResult, error)
FixerCorruptedKeysActivity will fetch the keys of blobs from shards with corruptions from a completed scan workflow. If scan workflow is not closed or if query fails activity will return an error. Accepts as input the shard to start query at and returns a next page token, therefore this activity can be used to do pagination.
func GetCorruptedKeys ¶
func GetCorruptedKeys( ctx workflow.Context, params FixerWorkflowParams, ) (*FixerCorruptedKeysActivityResult, error)
GetCorruptedKeys is a workflow which is used to retrieve keys for fixer workflow.
type FixerHooks ¶
type FixerHooks struct { InvariantManager FixerManagerCB Iterator FixerIteratorCB }
FixerHooks holds callback functions for shard scanner workflow implementation.
func NewFixerHooks ¶
func NewFixerHooks(manager FixerManagerCB, iterator FixerIteratorCB) (*FixerHooks, error)
NewFixerHooks returns initialized callbacks for shard scanner workflow implementation.
type FixerIteratorCB ¶
type FixerIteratorCB func( blobstore.Client, store.Keys, FixShardActivityParams, ScannerConfig, ) store.ScanOutputIterator
FixerIteratorCB is a function which returns ScanOutputIterator for fixer.
type FixerManagerCB ¶
type FixerManagerCB func( persistence.Retryer, FixShardActivityParams, ScannerConfig, ) invariant.Manager
FixerManagerCB is a function which returns invariant manager for fixer.
type FixerWorkflow ¶
type FixerWorkflow struct { Aggregator *ShardFixResultAggregator Params FixerWorkflowParams Keys *FixerCorruptedKeysActivityResult }
FixerWorkflow is the workflow that fixes all entities from a scan output.
func NewFixerWorkflow ¶
func NewFixerWorkflow( ctx workflow.Context, name string, params FixerWorkflowParams, ) (*FixerWorkflow, error)
NewFixerWorkflow returns a new instance of fixer workflow
type FixerWorkflowConfigOverwrites ¶
type FixerWorkflowConfigOverwrites struct { Concurrency *int BlobstoreFlushThreshold *int ActivityBatchSize *int }
FixerWorkflowConfigOverwrites enables overwriting the default values. If provided workflow will favor overwrites over defaults. Any overwrites that are left as nil will fall back to defaults.
type FixerWorkflowParams ¶
type FixerWorkflowParams struct { ScannerWorkflowWorkflowID string ScannerWorkflowRunID string ContextKey ScannerContextKey FixerWorkflowConfigOverwrites FixerWorkflowConfigOverwrites }
FixerWorkflowParams are the parameters to the fix workflow
type GenericScannerConfig ¶
type GenericScannerConfig struct { Enabled bool Concurrency int PageSize int BlobstoreFlushThreshold int ActivityBatchSize int }
GenericScannerConfig is a generic params for all shard scanners
type GenericScannerConfigOverwrites ¶
type GenericScannerConfigOverwrites struct { Enabled *bool Concurrency *int PageSize *int BlobstoreFlushThreshold *int ActivityBatchSize *int }
GenericScannerConfigOverwrites allows to override generic params
type IteratorCB ¶
type IteratorCB func( persistence.Retryer, ScanShardActivityParams, ScannerConfig, ) pagination.Iterator
IteratorCB is a function which returns iterator for scanner.
type ManagerCB ¶
type ManagerCB func( persistence.Retryer, ScanShardActivityParams, ScannerConfig, ) invariant.Manager
ManagerCB is a function which returns invariant manager for scanner.
type PaginatedShardQueryRequest ¶
type PaginatedShardQueryRequest struct { // StartingShardID is the first shard to start iteration from. // Setting to nil will start iteration from the beginning of the shards. StartingShardID *int // LimitShards indicates the maximum number of results that can be returned. // If nil or larger than allowed maximum, will default to maximum allowed. LimitShards *int }
PaginatedShardQueryRequest is the request used for queries which return results over all shards
type ResolvedFixerWorkflowConfig ¶
type ResolvedFixerWorkflowConfig struct { Concurrency int BlobstoreFlushThreshold int ActivityBatchSize int }
ResolvedFixerWorkflowConfig is the resolved config after reading defaults and applying overwrites.
type ResolvedScannerWorkflowConfig ¶
type ResolvedScannerWorkflowConfig struct { GenericScannerConfig GenericScannerConfig CustomScannerConfig CustomScannerConfig }
ResolvedScannerWorkflowConfig is the resolved config after reading dynamic config and applying overwrites.
func ScannerConfigActivity ¶
func ScannerConfigActivity( activityCtx context.Context, params ScannerConfigActivityParams, ) (ResolvedScannerWorkflowConfig, error)
ScannerConfigActivity will read dynamic config, apply overwrites and return a resolved config.
type ScanKeys ¶
ScanKeys are the keys to the blobs that were uploaded during scan. Keys can be nil if there were no uploads.
type ScanReport ¶
type ScanReport struct { ShardID int Stats ScanStats Result ScanResult }
ScanReport is the report of running Scan on a single shard.
func ScanShardActivity ¶
func ScanShardActivity( activityCtx context.Context, params ScanShardActivityParams, ) ([]ScanReport, error)
ScanShardActivity will scan a collection of shards for invariant violations.
type ScanReportError ¶
type ScanReportError struct { Reports []ScanReport ErrorStr *string }
ScanReportError is a type that is used to send either error or report on a channel. Exactly one of Report and ErrorStr should be non-nil.
type ScanResult ¶
type ScanResult struct { ShardScanKeys *ScanKeys ControlFlowFailure *ControlFlowFailure }
ScanResult indicates the result of running scan on a shard. Exactly one of ControlFlowFailure or ScanKeys will be non-nil
type ScanShardActivityParams ¶
type ScanShardActivityParams struct { Shards []int PageSize int BlobstoreFlushThreshold int ContextKey ScannerContextKey ScannerConfig CustomScannerConfig }
ScanShardActivityParams is the parameter for ScanShardActivity
type ScanShardHeartbeatDetails ¶
type ScanShardHeartbeatDetails struct { LastShardIndexHandled int Reports []ScanReport }
ScanShardHeartbeatDetails is the heartbeat details for scan shard
type ScanStats ¶
type ScanStats struct { EntitiesCount int64 CorruptedCount int64 CheckFailedCount int64 CorruptionByType map[invariant.Name]int64 }
ScanStats indicates the stats of entities which were handled by shard Scan.
type Scanner ¶
type Scanner interface {
Scan() ScanReport
}
Scanner is used to scan over given iterator. It is responsible for three things: 1. Checking invariants for each entity. 2. Recording corruption and failures to durable store. 3. Producing a ScanReport
type ScannerConfig ¶
type ScannerConfig struct { FixerTLName string ScannerWFTypeName string FixerWFTypeName string ScannerHooks func() *ScannerHooks FixerHooks func() *FixerHooks DynamicParams DynamicParams DynamicCollection *dynamicconfig.Collection StartWorkflowOptions cclient.StartWorkflowOptions }
ScannerConfig is the config for ShardScanner workflow
type ScannerConfigActivityParams ¶
type ScannerConfigActivityParams struct { ContextKey ScannerContextKey Overwrites ScannerWorkflowConfigOverwrites }
ScannerConfigActivityParams is the parameter for ScannerConfigActivity
type ScannerContextKey ¶
type ScannerContextKey string
ScannerContextKey is type used for identifying context
func (ScannerContextKey) String ¶
func (c ScannerContextKey) String() string
type ScannerEmitMetricsActivityParams ¶
type ScannerEmitMetricsActivityParams struct { ShardSuccessCount int ShardControlFlowFailureCount int AggregateReportResult AggregateScanReportResult ShardDistributionStats ShardDistributionStats ContextKey ScannerContextKey }
ScannerEmitMetricsActivityParams is the parameter for ScannerEmitMetricsActivity
type ScannerHooks ¶
type ScannerHooks struct { Manager ManagerCB Iterator IteratorCB GetScannerConfig func(scanner Context) CustomScannerConfig }
ScannerHooks allows provide manager and iterator for different types of scanners.
func NewScannerHooks ¶
func NewScannerHooks(manager ManagerCB, iterator IteratorCB) (*ScannerHooks, error)
NewScannerHooks is used to have per scanner iterator and invariant manager
func (*ScannerHooks) SetConfig ¶
func (sh *ScannerHooks) SetConfig(config func(scanner Context) CustomScannerConfig)
SetConfig allow to pass optional config resolver hook
type ScannerWorkflow ¶
type ScannerWorkflow struct { Aggregator *ShardScanResultAggregator Params ScannerWorkflowParams Name string Shards []int }
ScannerWorkflow is a workflow which scans and checks entities in a shard.
func NewScannerWorkflow ¶
func NewScannerWorkflow( ctx workflow.Context, name string, params ScannerWorkflowParams, ) (*ScannerWorkflow, error)
NewScannerWorkflow creates instance of shard scanner
type ScannerWorkflowConfigOverwrites ¶
type ScannerWorkflowConfigOverwrites struct { GenericScannerConfig GenericScannerConfigOverwrites CustomScannerConfig *CustomScannerConfig }
ScannerWorkflowConfigOverwrites enables overwriting the values in dynamic config. If provided workflow will favor overwrites over dynamic config. Any overwrites that are left as nil will fall back to using dynamic config.
type ScannerWorkflowParams ¶
type ScannerWorkflowParams struct { Shards Shards ScannerWorkflowConfigOverwrites ScannerWorkflowConfigOverwrites }
ScannerWorkflowParams are the parameters to the scan workflow
type ShardCorruptKeysQueryResult ¶
type ShardCorruptKeysQueryResult struct { Result ShardCorruptKeysResult ShardQueryPaginationToken ShardQueryPaginationToken }
ShardCorruptKeysQueryResult is the query result for ShardCorruptKeysQuery
type ShardCorruptKeysResult ¶
ShardCorruptKeysResult is a map of all shards which have finished scan successfully and have at least one corruption
type ShardDistributionStats ¶
type ShardDistributionStats struct { Max int64 Median int64 Min int64 P90 int64 P75 int64 P25 int64 P10 int64 }
ShardDistributionStats contains stats on the distribution of executions in shards. It is used by the ScannerEmitMetricsActivityParams.
type ShardFixResultAggregator ¶
type ShardFixResultAggregator struct {
// contains filtered or unexported fields
}
ShardFixResultAggregator is used to keep aggregated fix metrics
func NewShardFixResultAggregator ¶
func NewShardFixResultAggregator( corruptKeys []CorruptedKeysEntry, minShard int, maxShard int, ) *ShardFixResultAggregator
NewShardFixResultAggregator returns an instance of ShardFixResultAggregator
func (*ShardFixResultAggregator) AddReport ¶
func (a *ShardFixResultAggregator) AddReport(report FixReport)
AddReport adds fix report for a shard.
func (*ShardFixResultAggregator) GetAggregation ¶
func (a *ShardFixResultAggregator) GetAggregation() AggregateFixReportResult
GetAggregation returns scan aggregation.
func (*ShardFixResultAggregator) GetReport ¶
func (a *ShardFixResultAggregator) GetReport(shardID int) (*FixReport, error)
GetReport returns fix report for a shard.
func (*ShardFixResultAggregator) GetStatusResult ¶
func (a *ShardFixResultAggregator) GetStatusResult(req PaginatedShardQueryRequest) (*ShardStatusQueryResult, error)
GetStatusResult returns paginated results for a range of shards
func (*ShardFixResultAggregator) GetStatusSummary ¶
func (a *ShardFixResultAggregator) GetStatusSummary() ShardStatusSummaryResult
GetStatusSummary returns fix status summary.
type ShardFixer ¶
type ShardFixer struct {
// contains filtered or unexported fields
}
ShardFixer is a generic fixer which iterates over entities provided by iterator implementations of this fixer have to provided invariant manager and iterator.
type ShardQueryPaginationToken ¶
type ShardQueryPaginationToken struct { // NextShardID is one greater than the highest shard returned in the current query. // NextShardID is nil if IsDone is true. // It is possible to get NextShardID != nil and on the next call to get an empty result with IsDone = true. NextShardID *int IsDone bool }
ShardQueryPaginationToken is used to return information used to make the next query
type ShardRange ¶
ShardRange identifies a set of shards based on min (inclusive) and max (exclusive)
type ShardScanResultAggregator ¶
type ShardScanResultAggregator struct {
// contains filtered or unexported fields
}
ShardScanResultAggregator is used to keep aggregated scan metrics
func NewShardScanResultAggregator ¶
func NewShardScanResultAggregator( shards []int, minShard int, maxShard int, ) *ShardScanResultAggregator
NewShardScanResultAggregator returns aggregator for a scan result.
func (*ShardScanResultAggregator) AddReport ¶
func (a *ShardScanResultAggregator) AddReport(report ScanReport)
AddReport adds scan report for a shard.
func (*ShardScanResultAggregator) GetAggregateReport ¶
func (a *ShardScanResultAggregator) GetAggregateReport() AggregateScanReportResult
GetAggregateReport returns aggregated scan report.
func (*ShardScanResultAggregator) GetCorruptionKeys ¶
func (a *ShardScanResultAggregator) GetCorruptionKeys(req PaginatedShardQueryRequest) (*ShardCorruptKeysQueryResult, error)
GetCorruptionKeys returns a list of corrupt keys
func (*ShardScanResultAggregator) GetReport ¶
func (a *ShardScanResultAggregator) GetReport(shardID int) (*ScanReport, error)
GetReport returns a report for a single shard.
func (*ShardScanResultAggregator) GetShardDistributionStats ¶
func (a *ShardScanResultAggregator) GetShardDistributionStats() ShardDistributionStats
GetShardDistributionStats returns aggregated size statistics
func (*ShardScanResultAggregator) GetShardSizeQueryResult ¶
func (a *ShardScanResultAggregator) GetShardSizeQueryResult(req ShardSizeQueryRequest) (ShardSizeQueryResult, error)
GetShardSizeQueryResult returns shard size statistics.
func (*ShardScanResultAggregator) GetStatusResult ¶
func (a *ShardScanResultAggregator) GetStatusResult(req PaginatedShardQueryRequest) (*ShardStatusQueryResult, error)
GetStatusResult returns scan status for a range of shards.
func (*ShardScanResultAggregator) GetStatusSummary ¶
func (a *ShardScanResultAggregator) GetStatusSummary() ShardStatusSummaryResult
GetStatusSummary returns scan status summary.
type ShardScanner ¶
type ShardScanner struct {
// contains filtered or unexported fields
}
ShardScanner is a generic scanner which iterates over entities provided by iterator implementations of this scanner have to provided invariant manager and iterator
func NewScanner ¶
func NewScanner( shardID int, iterator pagination.Iterator, blobstoreClient blobstore.Client, blobstoreFlushThreshold int, manager invariant.Manager, progressReportFn func(), ) *ShardScanner
NewScanner constructs a new ShardScanner
func (*ShardScanner) Scan ¶
func (s *ShardScanner) Scan(ctx context.Context) ScanReport
Scan scans over all executions in shard and runs invariant checks per execution.
type ShardSizeQueryRequest ¶
ShardSizeQueryRequest is the request used for ShardSizeQuery. The following must be true: 0 <= StartIndex < EndIndex <= len(shards successfully finished) The following must be true: EndIndex - StartIndex <= maxShardQueryResult. StartIndex is inclusive, EndIndex is exclusive.
type ShardSizeQueryResult ¶
type ShardSizeQueryResult []ShardSizeTuple
ShardSizeQueryResult is the result from ShardSizeQuery. Contains sorted list of shards, sorted by the number of executions per shard.
type ShardSizeTuple ¶
ShardSizeTuple indicates the size and sorted index of a single shard
type ShardStatus ¶
type ShardStatus string
ShardStatus is the type which indicates the status of a shard scan.
const ( // ShardStatusSuccess indicates the scan on the shard ran successfully ShardStatusSuccess ShardStatus = "success" // ShardStatusControlFlowFailure indicates the scan on the shard failed ShardStatusControlFlowFailure ShardStatus = "control_flow_failure" // ShardStatusRunning indicates the shard has not completed yet ShardStatusRunning ShardStatus = "running" )
type ShardStatusQueryResult ¶
type ShardStatusQueryResult struct { Result ShardStatusResult ShardQueryPaginationToken ShardQueryPaginationToken }
ShardStatusQueryResult is the query result for ShardStatusQuery
type ShardStatusResult ¶
type ShardStatusResult map[int]ShardStatus
ShardStatusResult indicates the status for all shards
type ShardStatusSummaryResult ¶
type ShardStatusSummaryResult map[ShardStatus]int
ShardStatusSummaryResult indicates the counts of shards in each status