MCPcopy
hub / github.com/uber/aresdb / DeleteTableShard

Method DeleteTableShard

utils/metrics.go:1106–1111  ·  view source on GitHub ↗

DeleteTableShard deletes the reporter for the given table and shards. It should be called when the table shard no longer belongs to current node.

(tableName string, shardID int)

Source from the content-addressed store, hash-verified

1104// DeleteTableShard deletes the reporter for the given table and shards. It should
1105// be called when the table shard no longer belongs to current node.
1106func (f *ReporterFactory) DeleteTableShard(tableName string, shardID int) {
1107 f.Lock()
1108 defer f.Unlock()
1109 key := fmt.Sprintf("%s_%d", tableName, shardID)
1110 delete(f.reporters, key)
1111}
1112
1113// GetReporter returns reporter given tableName and shardID. If the corresponding
1114// reporter cannot be found. It will return the root scope.

Callers

nothing calls this directly

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected