Add DAO layer in resharding coordinator to ensure we always persist the document

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • 0
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We are currently making changes the ReshardingCoordinatorService to always rely on a DAO (Data Access Object) abstraction that facilitates all of the on disk updates needed for the resharding operation state, and remove the private _coordinatorDoc member variable. This will prevent future issues where we have out of sync in-memory and on-disk state documents and will simplify the readability and writeability of the code. The ReshardingCoordinatorService now only needs to work with the DAO abstraction and we no longer have to deal with managing the intracacies of properly managing the state document. This also improves our testing, as we can now write unit tests for the just the DAO and we are able to test that we always write the state document to disk correctly. We can also update our ReshardingCoordinatorService unit tests to use this new DAO so that we prevent any future race conditions from occuring as seen in BF-36645.

          1.
          Refactor DAO methods to not need storage clients SERVER-105456 Sub-task Closed Ben Gawel 8.2.0-rc0
          2.
          Refactor DAO to make resharding uuid a private member variable of the class SERVER-105572 Sub-task Closed Ben Gawel 8.2.0-rc0
          3.
          Create DAO method for inserting the initial state document SERVER-103233 Sub-task Backlog Ben Gawel  
          4.
          Create DAO method for deleting the state document SERVER-103234 Sub-task Backlog Unassigned  
          5.
          Create DAO method for updating state document for done phase SERVER-103235 Sub-task Backlog Unassigned  
          6.
          Create DAO method for updating state document for preparing to donate phase SERVER-103236 Sub-task Closed Kruti Shah 8.2.0-rc0
          7.
          Create DAO method for updating state document for committing phase SERVER-103237 Sub-task Backlog Unassigned  
          8.
          Create DAO method for updating state document for aborting phase SERVER-103238 Sub-task In Code Review Brett Nawrocki  
          9.
          Create DAO method for updating state document for cloning phase SERVER-103239 Sub-task Closed Ben Gawel 8.2.0-rc0
          10.
          Create DAO method for updating state document for applying phase SERVER-103240 Sub-task Closed Kruti Shah 8.2.0-rc0
          11.
          Create DAO method for updating state document for blocking writes phase SERVER-103241 Sub-task Closed Brett Nawrocki 8.2.0-rc0
          12.
          Create DAO method for updating donor shards entries num documents to copy SERVER-103242 Sub-task In Code Review Ben Gawel  
          13.
          Update the resharding coordinator service to start using DAO instead of the state document SERVER-103243 Sub-task Backlog Unassigned  
          14.
          Create a DAO test fixture SERVER-105441 Sub-task Closed Kruti Shah 8.2.0-rc0

              Assignee:
              Ben Gawel
              Reporter:
              Ben Gawel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: