Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-47511

Prevent comparison of member indexes from different config versions

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Replication
    • Replication

      SERVER-46667 and other bugs are the result of comparing member indexes from different replica set configs, or using a member index from one config as an array index in a different config.

      Devise a way to avoid repeating these sorts of bugs. Two ideas:

      1. Minimize all use of member indexes from configs, ReplSetMetadata, OplogQueryMetadata, etc. Try to find alternative means of accomplishing the same goals.
      2. Anywhere that member indexes are compared, include the config version and term. Perhaps create a MemberIndex class that has an index, version, and term. Two MemberIndexes cannot be compared unless their versions and terms agree. The name MemberIndex may be too similar to MemberId, so let's ponder the name.
      3. Hide member indexes behind safe interfaces. E.g., instead of using OplogQueryMetadata.getSyncSourceIndex() directly, create safer methods like hasSyncSourceIndex() or isSameSyncSourceIndex(MemberIndex i).

            Assignee:
            backlog-server-repl [DO NOT USE] Backlog - Replication Team
            Reporter:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: