consul/agent
Matt Keeler dbc48ea3f7 Fixes race condition in Agent Cache (#5796)
* Fix race condition during a cache get

Check the entry we pulled out of the cache while holding the lock had Fetching set.
If it did then we should use the existing Waiter instead of calling fetch. The reason
this is better than just calling fetch is that fetch re-gets the entry out of the
entries map and the previous fetch may have finished. Therefore this prevents
erroneously starting a new fetch because we just missed the last update.

* Fix race condition fully

The first commit still allowed for the following scenario:

• No entry existing when checked in getWithIndex while holding the read lock
• Then by time we had reached fetch it had been created and finished.

* always use ok when returning

* comment mentioning the reading from entries.

* use cacheHit consistently
2019-05-07 11:15:49 +01:00
..
ae
cache Fixes race condition in Agent Cache (#5796) 2019-05-07 11:15:49 +01:00
cache-types Add integration test for central config; fix central config WIP (#5752) 2019-05-01 16:39:31 -07:00
checks Merge pull request #5376 from hashicorp/fix-tests 2019-04-04 17:09:32 -04:00
config Update to use a consulent build tag instead of just ent (#5759) 2019-05-01 11:11:27 -04:00
connect fix typos reported by golangci-lint:misspell (#5434) 2019-03-06 11:13:28 -06:00
consul Copy the proxy config instead of direct assignment (#5786) 2019-05-06 12:09:59 -04:00
debug
exec fix go vet issue 2017-10-25 19:30:35 +02:00
local Update alias checks on local add and remove 2019-04-24 12:17:06 -06:00
metadata
mock
pool Makes RPC handling more robust when rolling servers. (#3561) 2017-10-10 15:19:50 -07:00
proxycfg Connect: allow configuring Envoy for L7 Observability (#5558) 2019-04-29 17:27:57 +01:00
proxyprocess Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
router Call RemoveServer for reap events (#5317) 2019-03-04 09:19:35 -05:00
structs acl: a role binding rule for a role that does not exist should be ignored (#5778) 2019-05-03 14:22:44 -05:00
systemd
token ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
xds Connect: allow configuring Envoy for L7 Observability (#5558) 2019-04-29 17:27:57 +01:00
acl.go
acl_endpoint.go ACL Token ID Initialization (#5307) 2019-04-30 11:45:36 -04:00
acl_endpoint_legacy.go
acl_endpoint_legacy_test.go
acl_endpoint_test.go ACL Token ID Initialization (#5307) 2019-04-30 11:45:36 -04:00
acl_test.go ACL Token Persistence and Reloading (#5328) 2019-02-27 14:28:31 -05:00
agent.go acl: adding Roles to Tokens (#5514) 2019-04-26 14:49:12 -05:00
agent_endpoint.go Ensure ServiceName is populated correctly for agent service checks 2019-04-30 19:00:57 -04:00
agent_endpoint_test.go Ensure ServiceName is populated correctly for agent service checks 2019-04-30 19:00:57 -04:00
agent_test.go Merge pull request #5376 from hashicorp/fix-tests 2019-04-04 17:09:32 -04:00
bindata_assetfs.go Remove old UI, option to use it, and its build processes 2019-04-12 09:02:27 -06:00
blacklist.go
blacklist_test.go
catalog_endpoint.go
catalog_endpoint_test.go Implement data filtering of some endpoints (#5579) 2019-04-16 12:00:15 -04:00
check.go
config.go Make a few config entry endpoints return 404s and allow for snake_case and lowercase key names. (#5748) 2019-04-30 18:19:19 -04:00
config_endpoint.go Centralized Config CLI (#5731) 2019-04-30 16:27:16 -07:00
config_endpoint_test.go Centralized Config CLI (#5731) 2019-04-30 16:27:16 -07:00
connect_auth.go fix typos reported by golangci-lint:misspell (#5434) 2019-03-06 11:13:28 -06:00
connect_ca_endpoint.go
connect_ca_endpoint_test.go
coordinate_endpoint.go
coordinate_endpoint_test.go
dns.go Add support for DNS config hot-reload (#4875) 2019-04-24 14:11:54 -04:00
dns_test.go Add fmt and vet (#5671) 2019-04-25 12:26:33 -04:00
enterprise_delegate_oss.go Update to use a consulent build tag instead of just ent (#5759) 2019-05-01 11:11:27 -04:00
event_endpoint.go
event_endpoint_test.go Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
health_endpoint.go Filter non-passing nodes without modifying cache 2019-04-16 10:29:34 -06:00
health_endpoint_test.go Implement data filtering of some endpoints (#5579) 2019-04-16 12:00:15 -04:00
http.go Make a few config entry endpoints return 404s and allow for snake_case and lowercase key names. (#5748) 2019-04-30 18:19:19 -04:00
http_oss.go Add HTTP endpoints for config entry management (#5718) 2019-04-29 18:08:09 -04:00
http_oss_test.go
http_test.go Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
intentions_endpoint.go Deferred updating response meta with consul headers (#5355) 2019-02-19 11:45:36 +00:00
intentions_endpoint_test.go
keyring.go
keyring_test.go Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
kvs_endpoint.go
kvs_endpoint_test.go
notify.go
notify_test.go
operator_endpoint.go
operator_endpoint_test.go Merge pull request #5376 from hashicorp/fix-tests 2019-04-04 17:09:32 -04:00
prepared_query_endpoint.go
prepared_query_endpoint_test.go
remote_exec.go
remote_exec_test.go Add fmt and vet (#5671) 2019-04-25 12:26:33 -04:00
retry_join.go
retry_join_test.go fix remaining CI failures after Go 1.12.1 Upgrade (#5576) 2019-03-29 16:29:27 +01:00
service_manager.go Add integration test for central config; fix central config WIP (#5752) 2019-05-01 16:39:31 -07:00
service_manager_test.go Add integration test for central config; fix central config WIP (#5752) 2019-05-01 16:39:31 -07:00
session_endpoint.go
session_endpoint_test.go tests: actually have TestSessionTTLRenew sleep during execution (#5669) 2019-04-17 15:52:23 -05:00
sidecar_service.go fix typos reported by golangci-lint:misspell (#5434) 2019-03-06 11:13:28 -06:00
sidecar_service_test.go
signal_unix.go
signal_windows.go
snapshot_endpoint.go
snapshot_endpoint_test.go add wait to TestSnapshot 2019-02-22 17:34:45 -05:00
status_endpoint.go
status_endpoint_test.go
testagent.go Ensure ServiceName is populated correctly for agent service checks 2019-04-30 19:00:57 -04:00
testagent_test.go
translate_addr.go
txn_endpoint.go Add fmt and vet (#5671) 2019-04-25 12:26:33 -04:00
txn_endpoint_test.go Add fmt and vet (#5671) 2019-04-25 12:26:33 -04:00
ui_endpoint.go Implement data filtering of some endpoints (#5579) 2019-04-16 12:00:15 -04:00
ui_endpoint_test.go Implement data filtering of some endpoints (#5579) 2019-04-16 12:00:15 -04:00
user_event.go
user_event_test.go Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
util.go
util_test.go Move internal/ to sdk/ (#5568) 2019-03-27 08:54:56 -04:00
watch_handler.go Move the watch package into the api module (#5664) 2019-04-26 12:33:01 -04:00
watch_handler_test.go Move the watch package into the api module (#5664) 2019-04-26 12:33:01 -04:00