From f21f91a99917ce0c36a47f1f17b102e6de29e9ef Mon Sep 17 00:00:00 2001 From: abdosi <58047199+abdosi@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:44:12 -0700 Subject: [PATCH] Update values_store.cpp --- tlm_teamd/values_store.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tlm_teamd/values_store.cpp b/tlm_teamd/values_store.cpp index f883d22fd3..a955d36be7 100644 --- a/tlm_teamd/values_store.cpp +++ b/tlm_teamd/values_store.cpp @@ -366,7 +366,13 @@ void ValuesStore::update(const std::vector & dumps) { const auto & storage = from_json(dumps); const auto & old_keys = get_old_keys(storage); - remove_keys_db(old_keys); + // Do not delete te key from State Db. State DB LAB_TABLE entry is created/deleted + // from teamsyncd on detecting netlink of teamd dev as up/down. For some reason + // if we do not get state dump from teamdctl it might be transient issue. If it is + // persistent issue then teamsyncd might be able to catch it and delete state db entry + // or we can keep entry in it's current state as best effort. Similar to try_add_lag which is best effort + // to connect to teamdctl and if it fails we do not delete State Db entry. + //remove_keys_db(old_keys); remove_keys_storage(old_keys); const auto & keys_to_refresh = update_storage(storage); update_db(storage, keys_to_refresh);