Skip to content

2024.2.1.0-b124

@ttyusupov ttyusupov tagged this 20 Dec 19:18
Summary:
`Slice::Less` is inconsistent with `Slice::compare` which is reproduced by the following test:
```
    str1 = "ABC";
    str2 = "";
    const auto s1 = Slice(str1);
    const auto s2 = Slice(str2);
    ASSERT_EQ(s1.Less(s2), s1.compare(s2) < 0);
```

Fixed `Slice::Less` and added SliceTest.OrderConsistency random test.

Original commit: c53c5af77b195d62c7a3485e3fb1b1a0c04bb289 / D40717

Jira: DB-14523

Test Plan: ybd --gtest_filter SliceTest.OrderConsistency -n 50 -- -p 1 for release/debug/asan/tsan builds

Reviewers: arybochkin, sergei

Reviewed By: arybochkin

Subscribers: sergei, ybase

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D40806
Assets 2
Loading