Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 8453a66

Browse files
committed
minor refactor to simplify
1 parent 39231cc commit 8453a66

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

api/dataprocessor.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,7 @@ func newRequestContext(ctx context.Context, req *models.Req, consolidator consol
756756
// but because we eventually want to consolidate into a point with ts=60, we also need the points that will be fix-adjusted to 40 and 50.
757757
// so From needs to be lowered by 20 to become 35 (or 31 if adjusted).
758758

759-
firstPointTs := alignForward(rc.From, req.ArchInterval) // e.g. alignForward(55/51, 10) = 60.
760-
remainder := (firstPointTs - req.ArchInterval) % req.OutInterval // (60-10) % 30 = 20
759+
remainder := alignBackward(rc.From, req.ArchInterval) % req.OutInterval // (60-10) % 30 = 20
761760

762761
if rc.From > remainder {
763762
rc.From -= remainder

0 commit comments

Comments
 (0)