Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-1310

Clustering: Dynamically update PrimaryShardInfo cache in ActorContext when leader changes

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • Post-Helium
    • None
    • mdsal
    • None
    • Operating System: All
      Platform: All

    • 3194
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            tpantelis Tom Pantelis
            tpantelis Tom Pantelis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: