Skip to content

Better tests for finalize in nested writers#22110

Merged
akuzm merged 2 commits intoClickHouse:masterfrom
excitoon-favorites:testfinalize
Apr 6, 2021
Merged

Better tests for finalize in nested writers#22110
akuzm merged 2 commits intoClickHouse:masterfrom
excitoon-favorites:testfinalize

Conversation

@excitoon
Copy link
Copy Markdown
Contributor

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Additional tests for #21305

@robot-clickhouse robot-clickhouse added the pr-not-for-changelog This PR should not be mentioned in the changelog label Mar 25, 2021
@excitoon
Copy link
Copy Markdown
Contributor Author

This errors shall be fixed after rebase. @azat I agree that some work was done to make finish() logic, but I still believe that we shall remove implicit finalization code from destructors (which makes finish calls unnecessary), like in #21325. User must call finalize() after they write somthing and the reason we introduce implicit finalization was another bug when finalize() was missed in compression streams.

@azat
Copy link
Copy Markdown
Member

azat commented Mar 30, 2021

User must call finalize() after they write somthing and the reason we introduce implicit finalization was another bug when finalize() was missed in compression streams.

Agree, but what will be if someone will forget to call it?

In my opinion it is better to terminate abnormally then silently ignore write failures.

@excitoon
Copy link
Copy Markdown
Contributor Author

excitoon commented Mar 30, 2021 via email

@excitoon
Copy link
Copy Markdown
Contributor Author

excitoon commented Mar 31, 2021

This PR is ready for review, failed tests are unrelated.

@akuzm akuzm self-assigned this Apr 6, 2021
@akuzm akuzm merged commit c7776fe into ClickHouse:master Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-not-for-changelog This PR should not be mentioned in the changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants