Fix flaky test_version_update_after_mutation/test.py::test_upgrade_while_mutation #48783
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Closes #48377.
the test
test_version_update_after_mutation/test.py::test_upgrade_while_mutation
doesnode3.restart_with_latest_version(signal=9, fix_metadata=True)
then on server startup it sees that
data/system
is not emptyactually there are only some leftovers
because right before server was shutdown, it managed to create only
part_log.sql.tmp
, but did not manage to rename topart_log.sql
then on server restart it removed
part_log.sql.tmp
:<Information> DatabaseOrdinary (system): Removing file /var/lib/clickhouse/metadata/system/part_log.sql.tmp
and then started to move system table from ordinary to atomic db
but did not delete
data/system/part_log/detached
anddata/system/part_log/format_version.txt
because it transferred to atomic db only data of tables which were successfully loaded.Therefore there was an exception on server startup