Skip to content
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

[v21.11.x] cloud_storage: check that we have serialized the whole manifest #6510

Merged
merged 1 commit into from
Sep 22, 2022

Commits on Sep 22, 2022

  1. cloud_storage: check that we have serialized the whole manifest

    It turns out that if the underlying buffer object throws (e.g. a
    bad_alloc exception), std::ostream swallows the exception and sets the
    "badbit". If we don't check it, this can lead to the serialized manifest
    being truncated and to corrupt manifests being uploaded to the cloud
    storage. To prevent that we check that std::ostream is in a good state
    after serializing manifests.
    
    More info: https://en.cppreference.com/w/cpp/io/ios_base/iostate
    
    Conflicts:
    	src/v/cloud_storage/partition_manifest.cc
    	src/v/cloud_storage/topic_manifest.cc
    	src/v/cloud_storage/tx_range_manifest.cc
    ztlpn committed Sep 22, 2022
    Configuration menu
    Copy the full SHA
    28b1799 View commit details
    Browse the repository at this point in the history