open-consul/agent/consul/state
Chris Piraino baad708929
Fix bug in usage metrics when multiple service instances are changed in a single transaction (#9440)
* Fix bug in usage metrics that caused a negative count to occur

There were a couple of instances were usage metrics would do the wrong
thing and result in incorrect counts, causing the count to attempt to
decrement below zero and return an error. The usage metrics did not
account for various places where a single transaction could
delete/update/add multiple service instances at once.

We also remove the error when attempting to decrement below zero, and
instead just make sure we do not accidentally underflow the unsigned
integer. This is a more graceful failure than returning an error and not
allowing a transaction to commit.

* Add changelog
2021-01-12 15:31:47 -06:00
..
acl.go acl: global tokens created by auth methods now correctly replicate to secondary datacenters (#9351) 2020-12-09 15:22:29 -06:00
acl_events.go
acl_events_test.go acl: global tokens created by auth methods now correctly replicate to secondary datacenters (#9351) 2020-12-09 15:22:29 -06:00
acl_oss.go
acl_test.go acl: global tokens created by auth methods now correctly replicate to secondary datacenters (#9351) 2020-12-09 15:22:29 -06:00
autopilot.go Switch to using the external autopilot module 2020-11-09 09:22:11 -05:00
autopilot_test.go Switch to using the external autopilot module 2020-11-09 09:22:11 -05:00
catalog.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
catalog_events.go stream: document that Payload must be immutable 2020-11-06 13:00:33 -05:00
catalog_events_test.go Merge pull request #9114 from hashicorp/dnephin/filtering-in-stream 2020-11-16 14:20:07 -05:00
catalog_oss.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
catalog_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
config_entry.go structs: Fix printing of IDs 2021-01-07 18:47:38 -05:00
config_entry_intention.go
config_entry_intention_oss.go
config_entry_oss.go
config_entry_test.go
connect_ca.go
connect_ca_test.go
coordinate.go
coordinate_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
delay_oss.go
delay_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
federation_state.go
graveyard.go
graveyard_oss.go
graveyard_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
index_connect.go
index_connect_test.go
index_service_kind.go
intention.go server: remove config entry CAS in legacy intention API bridge code (#9151) 2020-11-13 14:42:21 -06:00
intention_oss.go
intention_test.go server: remove config entry CAS in legacy intention API bridge code (#9151) 2020-11-13 14:42:21 -06:00
kvs.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
kvs_oss.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
kvs_test.go
memdb.go
operations_oss.go
prepared_query.go
prepared_query_index.go
prepared_query_index_test.go
prepared_query_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
schema.go
schema_test.go
session.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
session_oss.go Add a paramter in state store methods to indicate whether a resource insertion is from a snapshot restoration (#9156) 2020-11-11 11:21:42 -05:00
session_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
state_store.go
state_store_oss_test.go
state_store_test.go
store_integration_test.go testing: skip slow tests with -short 2020-12-07 13:42:55 -05:00
system_metadata.go
system_metadata_test.go
tombstone_gc.go
tombstone_gc_test.go
txn.go
txn_test.go
usage.go Fix bug in usage metrics when multiple service instances are changed in a single transaction (#9440) 2021-01-12 15:31:47 -06:00
usage_oss.go Fix bug in usage metrics when multiple service instances are changed in a single transaction (#9440) 2021-01-12 15:31:47 -06:00
usage_oss_test.go
usage_test.go Fix bug in usage metrics when multiple service instances are changed in a single transaction (#9440) 2021-01-12 15:31:47 -06:00