open-consul/agent/consul/state
Dhia Ayachi 825663b38a
Memdb Txn Commit race condition fix (#16871)
* Add a test to reproduce the race condition

* Fix race condition by publishing the event after the commit and adding a lock to prevent out of order events.

* split publish to generate the list of events before committing the transaction.

* add changelog

* remove extra func

* Apply suggestions from code review

Co-authored-by: Dan Upton <daniel@floppy.co>

* add comment to explain test

---------

Co-authored-by: Dan Upton <daniel@floppy.co>
2023-04-12 13:18:01 -04:00
..
acl.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_events.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_events_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_schema.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
acl_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
autopilot.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
autopilot_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_events.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_events_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_events_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_events_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_schema.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
catalog_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry.go Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
config_entry_events.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_events_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_exported_services.go Add sameness-group to exported-services config entries (#16836) 2023-03-31 12:36:44 -05:00
config_entry_exported_services_oss.go Add sameness-group to exported-services config entries (#16836) 2023-03-31 12:36:44 -05:00
config_entry_intention.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_intention_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_sameness_group_oss.go Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
config_entry_sameness_group_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
config_entry_schema.go Add default resolvers to disco chains based on the default sameness group (#16837) 2023-03-31 14:35:56 -04:00
config_entry_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_events.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_events_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
connect_ca_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
coordinate_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
delay_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
delay_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
events.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
events_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
federation_state.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
graveyard.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
graveyard_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
graveyard_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
index_connect_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
indexer.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intention.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intention_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
intention_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
kvs_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
memdb.go Memdb Txn Commit race condition fix (#16871) 2023-04-12 13:18:01 -04:00
memdb_test.go Memdb Txn Commit race condition fix (#16871) 2023-04-12 13:18:01 -04:00
mock_publishFuncType.go Memdb Txn Commit race condition fix (#16871) 2023-04-12 13:18:01 -04:00
operations_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering.go Add sameness-group to exported-services config entries (#16836) 2023-03-31 12:36:44 -05:00
peering_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
peering_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_index.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_index_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
prepared_query_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
query.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
query_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
schema.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
schema_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
schema_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
schema_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
session_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
state_store.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
state_store_oss_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
state_store_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
store_integration_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
system_metadata.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
system_metadata_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
tombstone_gc.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
tombstone_gc_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
txn.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
txn_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
usage.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
usage_oss.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00
usage_test.go copyright headers for agent folder (#16704) 2023-03-28 14:39:22 -04:00