In CTS the notifiersFor() was causing a race condition detected by the go race
detector which points to the usage of w.tracker in notifersFor():
WARNING: DATA RACE
Read at 0x00c000268488 by goroutine 46:
github.com/hashicorp/hcat.(*tracker).notifiersFor()
/Users/lornasong/go/src/github.com/hashicorp/consul-terraform-sync/vendor/github.com/hashicorp/hcat/watcher.go:685 +0x9c
...
Previous write at 0x00c000268488 by goroutine 45:
github.com/hashicorp/hcat.(*tracker).sweep()
/Users/lornasong/go/src/github.com/hashicorp/consul-terraform-sync/vendor/github.com/hashicorp/hcat/watcher.go:736 +0x1e4
Also pre-emptively added locks to complete() since it also accesses w.tracker.
In CTS the notifiersFor() was causing a race condition detected by the go race detector which points to the usage of
w.tracker
in notifersFor():Also pre-emptively added locks to complete() since it also accesses
w.tracker
.