ovis icon indicating copy to clipboard operation
ovis copied to clipboard

List data types should probably be declared in the ldms schema

Open morrone opened this issue 2 years ago • 4 comments

The way that array types were added to ldms, we have no way to declare the data type(s) that the list will contain. The data type is only assigned at metric set creation time. So this essentially means that the schema no longer expresses the full schema of a metric set. In the worst case, we could have two different metric sets that share a common schema, but have different data types in their lists.

If we restricted lists to only containing a single data type and making that declaration in the schema, that would address this issue.

morrone avatar Jan 31 '23 19:01 morrone

@morrone, @nichamon I believe that this is the way it works now. @nichamon please confirm and if true please close this issue.

tom95858 avatar May 05 '23 02:05 tom95858

I do not think so. We can only tell the schema from the metric set where lists are concerned. Two metric sets that declare they are using the same schema can, in fact have different schemas. This is why we need to make the data type of the array contents part of the schema.

morrone avatar May 05 '23 03:05 morrone

@tom95858 No, the current code does not work as @morrone's suggestion yet.

We discussed and planned to add the restriction that all list entries must be of the same value type. By doing this, we could add the value type of the list entries to the schema. However, we have not gotten to this item yet.

nichamon avatar May 05 '23 15:05 nichamon