Uploaded image for project: 'Apache Ozone'
  1. Apache Ozone
  2. HDDS-7871

Fix false positive in KeyManagerImpl#createFakeDirIfShould()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 1.4.0
    • None

    Description

      Background

      KeyManagerImpl#createFakeDirIfShould is intended to return a "fake" OmKeyInfo entry for a directory to the client in the case of OBS or LEGACY bucket. It is called from getOzoneFileStatus from KeyManagerImpl#getFileStatus. This was added in HDDS-7253.

      Discovery

      However, due to RockDB prefix seek using a bloom filter, leading to keyValue returning non-null even if such volume+bucket+key prefix doesn't exist at all at times, it appears that the current prefix check logic in createFakeDirIfShould is not sufficient in verification.

      This is discovered by hemantk while debugging HDDS-7861, a snapshot test, while the issue itself does not appear to be related to snapshot code additions.

      Potential Solution

      Check volume and bucket names as well inside if (keyValue != null). We may or may not need to iterate over the iterator based on the expectations of KeyManagerImpl#createFakeDirIfShould.

      cc hemantk
      cc XiChen] ckj duongnguyen that authored/reviewed patch HDDS-7253
      cc erose the OBS/FSO bucket expert

      Attachments

        Issue Links

          Activity

            People

              ckj Kaijie Chen
              smeng Siyao Meng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: