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

Correctly handle partition transforms without output #2123

Merged
merged 4 commits into from Mar 1, 2022

Conversation

lava
Copy link
Member

@lava lava commented Feb 28, 2022

The case where a partition transform removed all input data
and returned an empty output (which is important when deleting
partitions) was not handled correctly, leading to potential
segfaults.

This was not caught by test because we lacked an end-to-end test for whole-partition erasure, with existing tests all mocking the partition transformer.

📝 Checklist

  • All user-facing changes have changelog entries.
  • The changes are reflected on docs.tenzir.com/vast, if necessary.
  • The PR description contains instructions for the reviewer, if necessary.

🎯 Review Instructions

The case where a partition transform removed all input data
and returned an empty output (which is important when deleting
partitions) was not handled correctly, leading to potential
segfaults.
@tobim tobim self-assigned this Feb 28, 2022
Copy link
Member

@tobim tobim left a comment

Choose a reason for hiding this comment

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

I only reviewed the unit test so far.

libvast/test/system/partition_transformer.cpp Outdated Show resolved Hide resolved
libvast/test/system/partition_transformer.cpp Outdated Show resolved Hide resolved
libvast/test/system/partition_transformer.cpp Outdated Show resolved Hide resolved
@tobim tobim removed their assignment Feb 28, 2022
Copy link
Member

@tobim tobim left a comment

Choose a reason for hiding this comment

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

I think the change fixes the issue but the code needs a bit of cleanup before it can be merged.

libvast/test/system/partition_transformer.cpp Outdated Show resolved Hide resolved
libvast/src/system/index.cpp Outdated Show resolved Hide resolved
libvast/src/system/index.cpp Outdated Show resolved Hide resolved
libvast/src/system/index.cpp Outdated Show resolved Hide resolved
@dominiklohmann dominiklohmann added the bug Incorrect behavior label Mar 1, 2022
@lava lava merged commit a629cb8 into master Mar 1, 2022
@lava lava deleted the topic/erasing-partition-transforms branch March 1, 2022 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Incorrect behavior
Projects
None yet
3 participants