Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7593 Supporting HSync and lease recovery
  3. HDDS-10077

Add hsync metadata to hsync'ed keys in OpenKeyTable as well

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.0.0
    • None

    Description

      Currently, only those keys in KeyTable/FileTable would have metadata HSYNC_CLIENT_ID when those keys have been hsync'ed (and not closed yet). The problem with this is that it makes getExpiredOpenKeys() and listOpenKeys (HDDS-8830) very inefficient by forcing them to look up KeyTable/FileTable while they could have just used OpenKeyTable/OpenFileTable solely to determine whether an open key is hsync'ed or not.

      Proposal:
      1. during an hsync(), persist metadata HSYNC_CLIENT_ID to OmKeyInfo in OpenKeyTable as well (in addition to KeyTable). Only write when the client ID changes so it doesn't cause write amplifications. Ideally only the first hsync() of a key would cause a write to OpenKeyTable.
      2. during key close/commit, remove HSYNC_CLIENT_ID from OpenKeyTable if necessary so that HSYNC_CLIENT_ID isn't written to the final key.

      Attachments

        Issue Links

          Activity

            People

              smeng Siyao Meng
              smeng Siyao Meng
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: