MCPcopy Index your code
hub / github.com/uber/aresdb / startTableAdditionWatch

Method startTableAdditionWatch

datanode/datanode.go:273–292  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

271}
272
273func (d *dataNode) startTableAdditionWatch() {
274 shardOwnershipEvents, done, err := d.metaStore.WatchShardOwnershipEvents()
275 if err != nil {
276 utils.GetLogger().With("error", err.Error()).Fatal("failed to watch schema addition")
277 }
278
279 for {
280 select {
281 case <-d.close:
282 return
283 case event, ok := <-shardOwnershipEvents:
284 if !ok {
285 close(done)
286 return
287 }
288 d.addTable(event.TableName)
289 done <- struct{}{}
290 }
291 }
292}
293
294func (d *dataNode) startActiveTopologyWatch() {
295 for {

Callers 1

OpenMethod · 0.95

Calls 6

addTableMethod · 0.95
GetLoggerFunction · 0.92
FatalMethod · 0.65
WithMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected