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

mutation_fragment_stream_validating_filter: respect validating_level::none #18667

Merged

Conversation

denesb
Copy link
Contributor

@denesb denesb commented May 14, 2024

Even when configured to not do any validation at all, the validator still did some. This small series fixes this, and adds a test to check that validation levels in general are respected, and the validator doesn't validate more than it is asked to.

Fixes: #18662

…r ctor parameter

When set to false, no exceptions will be raised from the validator on
validation error. Instead, it will just return false from the respective
validator methods. This makes testing simpler, asserting exceptions is
clunky.
When true (default), the previous behaviour will remain: any validation
error will invoke on_internal_error(), resulting in either std::abort()
or an exception.
…level::none

Despite its name, this validation level still did some validation. Fix
this, by short-circuiting the catch-all operator(), preventing any
validation when the user asked for none.
…on levels

To make sure that the validator doesn't validate what the validation
level doesn't include.
@denesb denesb added backport/5.2 Issues that should be backported to 5.2 branch once they'll be fixed backport/5.4 Issues that should be backported to 5.4 branch once they'll be fixed backport/6.0 labels May 14, 2024
@denesb denesb self-assigned this May 14, 2024
@denesb denesb requested a review from tgrabiec as a code owner May 14, 2024 10:17
@scylladb-promoter
Copy link
Contributor

🟢 CI State: SUCCESS

✅ - Build
✅ - Unit Tests Custom
The following new/updated tests ran 100 times for each mode:
🔹 boost/mutation_fragment_test
✅ - Container Test
✅ - dtest with topology changes
✅ - dtest
✅ - Unit Tests

Build Details:

  • Duration: 6 hr 9 min
  • Builder: i-034b2bffc93936015 (m5ad.8xlarge)

@bhalevy
Copy link
Member

bhalevy commented May 15, 2024

Looks good.

@mykaul
Copy link
Contributor

mykaul commented May 16, 2024

@scylladb/scylla-maint - please review and merge if approved.

@scylladb-promoter scylladb-promoter merged commit c7aa473 into scylladb:master May 17, 2024
18 checks passed
denesb added a commit that referenced this pull request May 20, 2024
…pect validating_level::none' from ScyllaDB

Even when configured to not do any validation at all, the validator still did some. This small series fixes this, and adds a test to check that validation levels in general are respected, and the validator doesn't validate more than it is asked to.

Fixes: #18662

(cherry picked from commit f6511ca)

(cherry picked from commit e7b0769)

(cherry picked from commit 78afb36)

Refs #18667

Closes #18724

* github.com:scylladb/scylladb:
  test/boost/mutation_fragment_test.cc: add test for validator validation levels
  mutation: mutation_fragment_stream_validating_filter: fix validation_level::none
  mutation: mutation_fragment_stream_validating_filter: add raises_error ctor parameter
denesb added a commit that referenced this pull request May 27, 2024
…pect validating_level::none' from ScyllaDB

Even when configured to not do any validation at all, the validator still did some. This small series fixes this, and adds a test to check that validation levels in general are respected, and the validator doesn't validate more than it is asked to.

Fixes: #18662

(cherry picked from commit f6511ca)

(cherry picked from commit e7b0769)

(cherry picked from commit 78afb36)

 Refs #18667

Closes #18723

* github.com:scylladb/scylladb:
  test/boost/mutation_fragment_test.cc: add test for validator validation levels
  mutation: mutation_fragment_stream_validating_filter: fix validation_level::none
  mutation: mutation_fragment_stream_validating_filter: add raises_error ctor parameter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/5.2 Issues that should be backported to 5.2 branch once they'll be fixed backport/5.4 Issues that should be backported to 5.4 branch once they'll be fixed backport/6.0 promoted-to-master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mutation_fragment_stream_validating_filter doesn't respect validation_level::none
6 participants