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

ListKeys Iterator doesn't terminate when prefix contains "/" at the end

    XMLWordPrintableJSON

Details

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

    Description

      listKeys iterator doesn't terminate when prefix contains "/" at the end of keyName.

      If we have a FSO key like vol1/bucket1/dir1/key1

      And we do listKeys by passing prefix as dir1/key1/

      In this case the iterator never terminates and keeps returning the same keyName.

      We can check using key list shell command also.

       

      ozone sh key list  o3://localhost:9862/s3v/fso/ --prefix dir1/1/
      [ {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, {
        "volumeName" : "s3v",
        "bucketName" : "fso",
        "name" : "dir1/1/",
        "dataSize" : 5,
        "creationTime" : "2023-12-04T09:14:13.261Z",
        "modificationTime" : "2023-12-04T09:14:14.396Z",
        "replicationConfig" : {
          "replicationFactor" : "THREE",
          "requiredNodes" : 3,
          "replicationType" : "RATIS"
        },
        "metadata" : { },
        "file" : true
      }, { 
      
      
      ......
      ......

       

       

      Attachments

        Issue Links

          Activity

            People

              ashishk Ashish Kumar
              ashishk Ashish Kumar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: