-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
filodb(core) include the start time for range functions such as rate. #1665
Conversation
29eb63b
to
98e5952
Compare
98e5952
to
f68b193
Compare
@@ -155,16 +155,17 @@ final case class PeriodicSamplesMapper(startMs: Long, | |||
* pronounced if [1i] notation was used and step == lookback. | |||
*/ | |||
private def extendLookback(rv: RangeVector, window: Long): Long = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we include the start time, we do not need to extend the lookback window anymore.
Here is an example, the window is 15s and no need to extend the window to 15001ms
[2023-09-12 15:47:51,816] INFO query-sched-1 default f.query.Query$ [] - functionId=Some(Rate) stepMultipleNotationUsed=false window=15000 rv=RawDataRangeVector(/shard:3/b2[schema=prom-counter _metric_=my_counter,tags={_ns_: Test-data-1694557937_p1, _ws_: aci-telemetry, code: 817, instance: inst-4, mode: nice, service: service-2, version: 3.3.13}] [grp16],TimeSeriesPartition(shard=3,partId=112){b2[schema=prom-counter _metric_=my_counter,tags={_ns_: Test-data-1694557937_p1, _ws_: aci-telemetry, code: 817, instance: inst-4, mode: nice, service: service-2, version: 3.3.13}]},TimeRangeChunkScan(1694557922000,1694557937000),[I@65c327b0,0,200000000,dcd2633e-6b01-4d89-8d73-124b18cacdfd)
@yu-shipit Could you include a quick summary of the PR in the header comment? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most changes look good-- just a couple questions. Thanks for the tedious work here @yu-shipit 🙏
Pull Request checklist
Current behavior : (link exiting issues here : https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests)
New behavior :
The result of a range vector function is based on the data in a range. Previous the first millisecond of data was excluded from the range, now it is included. Let's say, we have a ts counter { [0s, 1.0], [5s, 6], [10s, 16].
After this change, Filodb will be compliant to Prometheus.
BREAKING CHANGES
Breaking changes may include:
Other information: