[CONTROLLER-1310] Clustering: Dynamically update PrimaryShardInfo cache in ActorContext when leader changes Created: 13/May/15  Updated: 26/May/15  Resolved: 26/May/15

Status: Resolved
Project: controller
Component/s: mdsal
Affects Version/s: Post-Helium
Fix Version/s: None

Type: Bug
Reporter: Tom Pantelis Assignee: Tom Pantelis
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 3194
Priority: Normal

 Description   

Currently the PrimaryShardInfo cache in ActorContext for findPrimaryAsync is purged after the leader election timeout. However since leadership shouldn't change often, we can maintain the cache longer by purging when leadership changes.

We'll need an actor to listen for LeaderStateChange messages and update the cache. We could create a new one and register it with every shard in some manner, it would be simpler to utilize the ShardManager which already listens for LeaderStateChange messages. We can encapsulate the map in a PrimaryShardCache instance that is published to the ShardManager actor and the ActorContext.



 Comments   
Comment by Tom Pantelis [ 15/May/15 ]

Submitted https://git.opendaylight.org/gerrit/#/c/20571/

Generated at Wed Feb 07 19:55:12 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.