Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ private void dequeueCurrentLog() throws IOException {
LOG.debug("EOF, closing {}", currentPath);
closeReader();
logQueue.remove();
setCurrentPath(null);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, can you add some detail to the commit message, I think it's subtle.

Looks like the issue is if openNextLog() throws, we want currentPath to be null rather than stale.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have good context here, but is it possible to add a small test? That could help anyone get to know this bit better, it's fine though if it is too complicated to add it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got to know from @sandeepvinayak that writing test is complicated. We can skip it.

setPosition(0);
metrics.decrSizeOfLogQueue();
}
Expand Down