Skip to content

Commit

Permalink
livetail timestamp correction
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandagohain committed Jul 22, 2022
1 parent 420d46a commit f8be4a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/query-service/app/clickhouseReader/reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2908,7 +2908,7 @@ func (r *ClickHouseReader) TailLogs(ctx context.Context, client *model.LogsTailC
"CAST((resources_string_key, resources_string_value), 'Map(String, String)') as resources_string "+
"from %s.%s", r.logsDB, r.logsTable)

tsStart := uint64(time.Now().UnixNano() / int64(time.Millisecond))
tsStart := uint64(time.Now().UnixNano())
if client.Filter.TimestampStart != nil {
tsStart = *client.Filter.TimestampStart
}
Expand Down Expand Up @@ -2959,7 +2959,7 @@ func (r *ClickHouseReader) TailLogs(ctx context.Context, client *model.LogsTailC
}
}
if len == 0 {
tsStart = uint64(time.Now().UnixNano() / int64(time.Millisecond))
tsStart = uint64(time.Now().UnixNano())
}
time.Sleep(2 * time.Second)
}
Expand Down

0 comments on commit f8be4a6

Please sign in to comment.