@@ -38,6 +38,11 @@ message DataPoint {
3838 }
3939 // fields contains fields selected in the projection
4040 repeated Field fields = 3 ;
41+ // sid is the series id of the data point
42+ uint64 sid = 4 ;
43+ // version is the version of the data point in a series
44+ // sid, timestamp and version are used to identify a data point
45+ int64 version = 5 ;
4146}
4247
4348// QueryResponse is the response for a query to the Query module.
@@ -125,6 +130,8 @@ message TopNResponse {
125130 // lists contain a series topN lists ranked by timestamp
126131 // if agg_func in query request is specified, lists' size should be one.
127132 repeated TopNList lists = 1 ;
133+ // trace contains the trace information of the query when trace is enabled
134+ common.v1.Trace trace = 2 ;
128135}
129136
130137// TopNRequest is the request contract for query.
@@ -138,22 +145,27 @@ message TopNRequest {
138145 // top_n set the how many items should be returned in each list.
139146 int32 top_n = 4 [(validate.rules ) .int32.gt = 0 ];
140147 // agg aggregates lists grouped by field names in the time_range
141- // TODO validate enum defined_only
142148 model.v1.AggregationFunction agg = 5 ;
143149 // criteria select counters. Only equals are acceptable.
144150 repeated model.v1.Condition conditions = 6 ;
145151 // field_value_sort indicates how to sort fields
146152 model.v1.Sort field_value_sort = 7 ;
153+ // trace is used to enable trace for the query
154+ bool trace = 8 ;
155+ // stages is used to specify the stage of the data points in the lifecycle
156+ repeated string stages = 9 ;
147157}
148158
149- //DataPointValue is the data point for writing. It only contains values.
159+ // DataPointValue is the data point for writing. It only contains values.
150160message DataPointValue {
151161 // timestamp is in the timeunit of milliseconds.
152162 google.protobuf.Timestamp timestamp = 1 [(validate.rules ) .timestamp.required = true ];
153163 // the order of tag_families' items match the measure schema
154164 repeated model.v1.TagFamilyForWrite tag_families = 2 [(validate.rules ) .repeated.min_items = 1 ];
155165 // the order of fields match the measure schema
156166 repeated model.v1.FieldValue fields = 3 ;
167+ // the version of the data point
168+ int64 version = 4 ;
157169}
158170
159171// WriteRequest is the request contract for write
0 commit comments