Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-56967

Metadata "DatasetFormat" is missing for datasets created without specifying storage format or with specifying storage format as row

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • Morpheus
    • Morpheus
    • analytics
    • 7.5.0-4355

    Description

      Metadata "DatasetFormat" is missing for datasets created without specifying storage format.

      Steps to reproduce -

      1. Create a cluster which has atleast 1 cbas node.
      2. Load travel-sample bucket.
      3. now change storage format to column using analytics/config/service endpoint.
      4. now created dataset as below -

      create dataset x on `travel-sample`; 

             5. Check metadata.

      [
        {
          "Dataset": {
            "DataverseName": "Default",
            "DatasetName": "x",
            "DatatypeDataverseName": "Metadata",
            "DatatypeName": "AnyObject",
            "DatasetType": "INTERNAL",
            "GroupName": "Default.x",
            "CompactionPolicy": "concurrent",
            "CompactionPolicyProperties": [
              {
                "Name": "max-component-count",
                "Value": "30"
              },
              {
                "Name": "min-merge-component-count",
                "Value": "3"
              },
              {
                "Name": "max-merge-component-count",
                "Value": "10"
              },
              {
                "Name": "size-ratio",
                "Value": "1.2"
              }
            ],
            "InternalDetails": {
              "FileStructure": "BTREE",
              "PartitioningStrategy": "HASH",
              "PartitioningKey": [
                [
                  "id"
                ]
              ],
              "PrimaryKey": [
                [
                  "id"
                ]
              ],
              "Autogenerated": false,
              "KeySourceIndicator": [
                1
              ]
            },
            "Hints": [],
            "Timestamp": "Wed May 17 08:04:58 UTC 2023",
            "DatasetId": 107,
            "PendingOp": 0,
            "MetatypeDataverseName": "Metadata",
            "MetatypeName": "DCPMeta",
            "BlockLevelStorageCompression": {
              "DatasetCompressionScheme": "snappy"
            },
            "BucketDataverseName": "Default",
            "LinkName": "Local",
            "BucketName": "travel-sample",
            "ScopeName": "_default",
            "CollectionName": "_default",
            "CollectionId": "0"
          }
        }
      ] 

             6. But if we create dataset as below -

      CREATE ANALYTICS COLLECTION airport_col
      WITH { "storage-format": {"format" : "column"} }
      ON `travel-sample`.inventory.airport; 

             7.  Check metadata.

      [
        {
          "Dataset": {
            "DataverseName": "Default",
            "DatasetName": "airport_col",
            "DatatypeDataverseName": "Metadata",
            "DatatypeName": "AnyObject",
            "DatasetType": "INTERNAL",
            "GroupName": "Default.airport_col",
            "CompactionPolicy": "concurrent",
            "CompactionPolicyProperties": [
              {
                "Name": "max-component-count",
                "Value": "30"
              },
              {
                "Name": "min-merge-component-count",
                "Value": "3"
              },
              {
                "Name": "max-merge-component-count",
                "Value": "10"
              },
              {
                "Name": "size-ratio",
                "Value": "1.2"
              }
            ],
            "InternalDetails": {
              "FileStructure": "BTREE",
              "PartitioningStrategy": "HASH",
              "PartitioningKey": [
                [
                  "id"
                ]
              ],
              "PrimaryKey": [
                [
                  "id"
                ]
              ],
              "Autogenerated": false,
              "KeySourceIndicator": [
                1
              ]
            },
            "Hints": [],
            "Timestamp": "Wed May 17 08:02:05 UTC 2023",
            "DatasetId": 106,
            "PendingOp": 0,
            "MetatypeDataverseName": "Metadata",
            "MetatypeName": "DCPMeta",
            "BlockLevelStorageCompression": {
              "DatasetCompressionScheme": "snappy"
            },
            "DatasetFormat": {
              "Format": "COLUMN",
              "MaxTupleCount": 15000,
              "FreeSpaceTolerance": 0.15000000596046448
            },
            "BucketDataverseName": "Default",
            "LinkName": "Local",
            "BucketName": "travel-sample",
            "ScopeName": "inventory",
            "CollectionName": "airport",
            "CollectionId": "13"
          }
        }
      ] 

             8. Also creating dataset with storage format as row.

      CREATE ANALYTICS COLLECTION airport_row WITH { "storage-format": {"format" : "row"} } ON `travel-sample`.inventory.airport; 

             9. DatasetFormat is missing from Metadata.

      {
          "Dataset": {
            "DataverseName": "Default",
            "DatasetName": "airport_row",
            "DatatypeDataverseName": "Metadata",
            "DatatypeName": "AnyObject",
            "DatasetType": "INTERNAL",
            "GroupName": "Default.airport_row",
            "CompactionPolicy": "concurrent",
            "CompactionPolicyProperties": [
              {
                "Name": "max-component-count",
                "Value": "30"
              },
              {
                "Name": "min-merge-component-count",
                "Value": "3"
              },
              {
                "Name": "max-merge-component-count",
                "Value": "10"
              },
              {
                "Name": "size-ratio",
                "Value": "1.2"
              }
            ],
            "InternalDetails": {
              "FileStructure": "BTREE",
              "PartitioningStrategy": "HASH",
              "PartitioningKey": [
                [
                  "id"
                ]
              ],
              "PrimaryKey": [
                [
                  "id"
                ]
              ],
              "Autogenerated": false,
              "KeySourceIndicator": [
                1
              ]
            },
            "Hints": [],
            "Timestamp": "Wed May 17 08:17:20 UTC 2023",
            "DatasetId": 108,
            "PendingOp": 0,
            "MetatypeDataverseName": "Metadata",
            "MetatypeName": "DCPMeta",
            "BlockLevelStorageCompression": {
              "DatasetCompressionScheme": "snappy"
            },
            "BucketDataverseName": "Default",
            "LinkName": "Local",
            "BucketName": "travel-sample",
            "ScopeName": "inventory",
            "CollectionName": "airport",
            "CollectionId": "13"
          }
        } 

        

      Suggestion - 

      Metadata should be consistent.

      Attachments

        Issue Links

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

          Activity

            People

              wail.alkowaileet Wail Alkowaileet
              umang.agrawal Umang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty