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

Applications that use the MD-SAL Datastore should properly handle OptimisticLock and ConflictingModification exceptions

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Resolution: Done
    • Helium
    • None
    • mdsal
    • None
    • Operating System: Mac OS
      Platform: PC

    Description

      Many applications that use the MD-SAL Datastore do not properly handle commit failures that may happen due to conflicting modifications or optimistic lock exceptions. Many applications were written pre-hydrogen when these exceptions did not exist. These applications need to be modified to ensure one of two things,

      a. Minimizing the occurrences of conflicts by using some of the new APIs in the datstore.

      b. Properly handling any exceptions that happen to ensure that data is not lost.

      Here are some initial thoughts from Ed,

      1) Mitigation Strategies (reduce incidence):
      a) Can you use merge instead of put?
      b) If you are doing an ordered set of things, are you using a TransactionChain?
      c) Are you doing a write in response to a Notification? Is anyone else… if so, probably only one of you should do the write, and the others use DataChangeListeners

      2) In spite of Mitigation, you still need to handle it so:
      a) Register a Callback for the Future to handle the failure
      b) At the very minimum: Log

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              moraja@cisco.com Moiz Raja
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: