-
Notifications
You must be signed in to change notification settings - Fork 4
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
test: Temporary pipeline error #2241
base: main
Are you sure you want to change the base?
Conversation
36da66b
to
afe3f2a
Compare
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.
I think the test misses check for complete writing by logs
{"level":"debug","message":"flushing writers"} | ||
{"level":"debug","message":"chunk completed, aligned = true, size = \"5B\""} | ||
{"level":"debug","message":"writers flushed"} | ||
{"level":"warn","message":"chunks write failed: some error, waiting %s, chunks count = 1"} |
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.
I don't see log where chunks were written after fail
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.
The chunk completed
message didn't appear in the logs. I'm not quite sure why to be honest because I don't understand how chunk writer works. The message is logged in swapChunks
which I'm guessing wasn't necessary to be called in this case? However the data did appear in the stream output and I do assert that.
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.
I see that we assert the data but it is weird, we receive chunk write failed
and being in backoff and do not see it write after backoff interval is reached. See encoding/pipeline.go:493
. The operation is again retried and chunks are processed
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.
I think you made a typo? encoding/pipeline.go
only has 480 lines so I'm not sure what line you're referring to. Anyway yes chunks are processed but I'm guessing swapChunks
didn't happen or didn't do anything so it didn't get logged. Should I spend more time trying to understand what's going on with the chunk writer?
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.
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.
I think the log is supposed to be there so you need to spend more time on that why it is missing. E.g deadlock occured, didn't wait enough or any other issue
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.
It is actually missing on the old tests from Michal as well... Apparently the chunk is still active until you send the next record so it only gets completed when you do send the next one. But I added assertions for "chunk written" which is logged immediately.
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.
So if it is missing in old tests why don't we add this into them? I understand that the chunks can be processed retrospectivelly but I would expect test to cover it fully. Or add commentary somewhere, maybe into processChunks metohd
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.
LGTM
afe3f2a
to
627e8fa
Compare
Jira: https://keboola.atlassian.net/browse/PSGO-1004
Changes: