gogama / incite

Hassle-free queries on Amazon CloudWatch Logs Insights in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

QueryManager doesn't consistently log if chunk is finished

vcschapp opened this issue · comments

Log messages like this:

2021/10/15 17:52:35 incite: QueryManager(0xc015395e10) finished chunk "filter ispresent(SizeAfter) | stats average(SizeAfter) as avg" [2021-10-03 13:30:00 +0000 UTC..2021-10-03 14:00:00 +0000 UTC)

Only happen sometimes.

Seems this code is broken somehow: https://github.com/gogama/incite/blob/main/incite.go#L699-L706

Looking at the issue a bit more carefully, it seems that code in cancelChunkMaybe() only gets called if the stream itself is EOF, i.e. the last chunk in the stream got finished.

So we basically need the same log for errEndOfChunk.

Fixed in commit b374de7e.