Skip to content
This repository has been archived by the owner on Mar 31, 2023. It is now read-only.

[Enhancement] Improve locking for router and routing rule processing #129

Open
er1cthe0ne opened this issue Sep 17, 2020 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@er1cthe0ne
Copy link
Contributor

er1cthe0ne commented Sep 17, 2020

In aca_ovs_l3_programmer.cpp, we are using a global level mutex to lock the access to our routers_tables:

  // -----critical section starts-----
  _routers_table_mutex.lock();
  _routers_table.emplace(router_id, new_subnet_routing_tables);
  _routers_table_mutex.unlock();
  // -----critical section ends-----

We can improve the locking the use read/write locks, and also add locks into lower level table entries like subnet_routing_tables and routing_rules to avoid multiple threading issues.

References:

https://en.cppreference.com/w/cpp/container#Thread_safety
https://github.com/kshk123/hashMap

@er1cthe0ne er1cthe0ne added the enhancement New feature or request label Sep 17, 2020
@er1cthe0ne er1cthe0ne self-assigned this Sep 17, 2020
zhangml pushed a commit to zhangml/alcor-control-agent that referenced this issue Dec 7, 2020
…i-cloud#129)

* Add ignite cache

* Add db modue

* Fix test case failure

* Add transaction for db cahche and SSL for ignite connection

* SSL for ignite connection is optional

* Set the default value of ignite's SSL configuration to null

* Rename the directory cache.repo to db.repo
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant