Commit Graph

40736 Commits

Author SHA1 Message Date
Nadav Har'El
0bef50ef0c cql-pytest: add "--vnodes" option to "run" script
Running test/cql-pytest/run now defaults to enabling the "tablets"
experimental feature when running Scylla - and tests detect this and
use this feature as appropriate. This is the correct default going
forward, but in the short term it would be nice to also have an
option to easily do a manual test run *without* tablets.

So this patch adds a "--vnodes" option to the test/cql-pytest/run
script. This option causes "run" to run Scylla without enabling the
"tablets" experimental feature.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>

Closes scylladb/scylladb#16896
2024-01-22 09:35:11 +02:00
Anna Stuchlik
a462b914cb doc: add 2024.1 to the OSS vs. Enterprise matrix
This commit adds the information that
ScyllaDB Enterprise 2024.1 is based
on ScyllaDB Open Source 5.4
to the OSS vs. Enterprise matrix.

Closes scylladb/scylladb#16880
2024-01-22 09:25:08 +02:00
Kefu Chai
9550f29d22 cql3: add formatter for cql3::prepared_cache_key_type
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define formatters for cql3::prepared_cache_key_type
and cql3::prepared_cache_key_type::cache_key_type, and remove
their operator<<().

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16901
2024-01-21 19:12:59 +02:00
Avi Kivity
3092e3a5dc Merge 'doc: improvements to the Create Cluster page' from Anna Stuchlik
This PR:
- Removes the redundant information about previous versions from the Create Cluster page.
- Fixes language mistakes on that page, and replaces "Scylla" with "ScyllaDB".

(nobackport)

Closes scylladb/scylladb#16885

* github.com:scylladb/scylladb:
  doc: fix the language on the Create Cluster page
  doc: remove reduntant info about old versions
2024-01-21 18:18:32 +02:00
Avi Kivity
5810396ba1 Merge 'Invalidate prepared statements for views when their schema changes.' from Eliran Sinvani
When a base table changes and altered, so does the views that might
refer to the added column (which includes "SELECT *" views and also
views that might need to use this column for rows lifetime (virtual
columns).
However the query processor implementation for views change notification
was an empty function.
Since views are tables, the query processor needs to at least treat them
as such (and maybe in the future, do also some MV specific stuff).
This commit adds a call to `on_update_column_family` from within
`on_update_view`.
The side effect true to this date is that prepared statements for views
which changed due to a base table change will be invalidated.

Fixes https://github.com/scylladb/scylladb/issues/16392

This series also adds a test which fails without this fix and passes when the fix is applied.

Closes scylladb/scylladb#16897

* github.com:scylladb/scylladb:
  Add test for mv prepared statements invalidation on base alter
  query processor: treat view changes at least as table changes
2024-01-21 17:43:49 +02:00
Kefu Chai
d1dd71fbd7 mutation: do not include unused headers
these unused includes were identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16889
2024-01-21 16:58:26 +02:00
Kefu Chai
1ce58595aa dht: do not include unused headers
these unused includes were identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16891
2024-01-21 16:56:16 +02:00
Kefu Chai
45c4f2039b cql3: add formatter for cql3::ut_name
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define a formatter for cql3::ut_name, and remove
their operator<<().

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16890
2024-01-21 16:53:05 +02:00
Kefu Chai
f916286b25 index: do not include unused headers
these unused includes were identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16892
2024-01-21 16:52:25 +02:00
Kefu Chai
ce076b5ae3 gossiping_property_file_snitch: drop unused using namespace
we don't use any symbol in this namespace, in this function, so drop it.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16893
2024-01-21 16:48:37 +02:00
Eliran Sinvani
0e5a8cad62 Add test for mv prepared statements invalidation on base alter
Issue #16392 describes a bug where when a base table is altered, it's
materialized views prepared statements are not invalidated which in turn
causes them to return missing data.
This test reproduces this bug and serves as a regression test for this
problem.

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-21 15:44:06 +02:00
Eliran Sinvani
5e33d9346b query processor: treat view changes at least as table changes
When a base table changes and altered, so does the views that might
refer to the added column (which includes "SELECT *" views and also
views that might need to use this column for rows lifetime (virtual
columns).
However the query processor implementation for views change notification
was an empty function.
Since views are tables, the query processor needs to at least treat them
as such (and maybe in the future, do also some MV specific stuff).
This commit adds a call to `on_update_column_family` from within
`on_update_view`.
The side effect true to this date is that prepared statements for views
which changed due to a base table change will be invalidated.

Fixes #16392

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-21 15:40:54 +02:00
Anna Stuchlik
d345a893d6 doc: fix the language on the Create Cluster page
This commit fixes language mistakes on
the Create Cluster page, and replaces
"Scylla" with "ScyllaDB".
2024-01-19 17:21:12 +01:00
Anna Stuchlik
af669dd7ae doc: remove reduntant info about old versions
This commit removes the information about
old versions, which is reduntant in the next
upcoming version.
2024-01-19 17:06:34 +01:00
Anna Stuchlik
b1ba904c49 doc: remove upgrade for unsupported versions
This commit removes the upgrade guides
from ScyllaDB Open Source to Enterprise
for versions we no longer support.

In addition, it removes a link to
one of the removed pages from
the Troubleshooting section (the link is
redundant).

Closes scylladb/scylladb#16249
2024-01-19 15:59:35 +02:00
Mikołaj Grzebieluch
c589793a9e test.py: test_maintenance_socket: remove pytest.xfail
Issue https://github.com/scylladb/python-driver/issues/278 was fixed in
https://github.com/scylladb/python-driver/pull/279.

Closes scylladb/scylladb#16873
2024-01-19 14:54:15 +01:00
Botond Dénes
b50d9bb802 Merge 'Add code coverage support' from Eliran Sinvani
This mini-set includes code coverage support for ScyllaDB, it provides:
1. Support for building ScyllaDB with coverage support.
2. Utilities for processing coverage profiling data
3. test.py support for generation and processing of coverage profiling into an lcov trace files which can later be used to produce HTML or textual coverage reports.

Refs #16323

Closes scylladb/scylladb#16784

* github.com:scylladb/scylladb:
  Add code coverage documentation
  test.py: support code coverage
  code coverage: Add libraries for coverage handling
  test.py: support --coverage and --coverage-mode
  configure.py support coverage profiles on standrad build modes
2024-01-19 15:27:44 +02:00
Pavel Emelyanov
e62114214f Merge 'More logging for Raft-based topology' from Kamil Braun
Currently if topology coordinator gets stuck in a CI test run it's hard to debug this (e.g. scylladb/scylladb#16708). We can add a lot of logging inside topology coordinator code to aid debugging, without spamming the logs -- these are relatively rare control plane events.

Closes scylladb/scylladb#16749

* github.com:scylladb/scylladb:
  test/pylib: scylla_cluster: enable raft_topology=debug level by default
  raft topology: increase level of some TRACE messages
  raft topology: log when entering transition states
  raft topology: don't include null ID in exclude_nodes
  raft topology: INFO log when executing global commands and updating topology state
  storage_service: separate logger for raft topology
2024-01-19 16:19:44 +03:00
Nadav Har'El
debf6753c7 Merge 'test/cql-pytest: run tests with tablets' from Botond Dénes
Add `--experimental-features=tablets` to both `test/cql-pytest/suite.yaml` and `test/cql-pytest/run.py`, so tablets are enabled. Detect tablet support in `contest.py` and add an xfail and skip marker to mark tests that fail/crash with tablets. These are expected to be fixed soon.

Some tests checking things around alter-keyspace, had to force-disable tablets on the created keyspace, because tablets interfere with the test (a keyspace with tablets cannot have simple strategy for example).
Tablets were also interfering with `test_keyspace.py:test_storage_options_local`, because it is expecting `system_schema.scylla_keyspaces` to not have any entries for local storage keyspace, but they have it if tablets are enabled. Adjust the test to account for this.

Closes scylladb/scylladb#16840

* github.com:scylladb/scylladb:
  test/cql-pytest: run.py,suite.yaml: enable tablets by default
  test/cql-pytest: sprinkle xfail_tablets and skip_with_tablets as needed
  test/cql-pytest: disable tablets for some keyspace-altering tests
  test/cql-pytest: test_keyspace.py: test_storage_options_local(): fix for tablets
  test/cql-pytest: fix test_tablets.py to set initial_tablets correctly
  test/cql-pytest: add tablet detection logic and fixtures
  test/cql-pytest: extract is_scylla check into util.py
2024-01-19 13:38:56 +02:00
Kamil Braun
cc039498c6 Update tools/cqlsh submodule
* tools/cqlsh 426fa0ea...b8d86b76 (8):
  > Make cqlsh work with unix domain sockets

Fixes scylladb/scylladb#16489

  > Bump python-driver version
  > dist/debian: add trailer line
  > dist/debian: wrap long line
  > Draft: explicit build-time packge dependencies
  > stop retruning status_code=2 on schema disagreement
  > Fix minor typos in the code
  > Dockerfile: apt-get update and apt-get upgrade to get latest OS packages
2024-01-19 11:23:22 +01:00
Botond Dénes
04881b3915 test/cql-pytest: run.py,suite.yaml: enable tablets by default
All the preparations are done, the tests can now run with tablets.
2024-01-19 03:46:38 -05:00
Botond Dénes
075be5a04a test/cql-pytest: sprinkle xfail_tablets and skip_with_tablets as needed
For tests that cover functionality, which doesn't yet work with tablets.
These tests and the respective functionality they test, are expected to
be fixed soon, and then these fixtures will be removed.
2024-01-19 03:46:38 -05:00
Botond Dénes
6e6bee4368 test/cql-pytest: disable tablets for some keyspace-altering tests
When tablets are enabled on a keyspace, they cannot be altered to simple
replication strategy anymore.
These keyspaces are testing exactly that, so disable tablets on the
initial keyspace create statements.
2024-01-19 03:46:38 -05:00
Botond Dénes
5f11aa940d test/cql-pytest: test_keyspace.py: test_storage_options_local(): fix for tablets
This test expects a keyspace with local storage option, to not have a
row in system_schema.scylla_keyspace. With tablets enabled by default,
this won't be the case. Adjust the test to check for the specific
storage-related columns instead.
2024-01-19 03:46:38 -05:00
Nadav Har'El
f92d2b4928 test/cql-pytest: fix test_tablets.py to set initial_tablets correctly
Recently, in commit 49026dc319, the
way to choose the number of tablets in a new keyspace changed.
This broke the test we had for a memory leak when many tablets were
used, which saw the old syntax wasn't recognized and assumed Scylla
is running without tablet support - so the test was skipped.

Let's fix the syntax. After this patch the test passes if the tablets
experimental feature is enabled, and only skipped if it isn't.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
2024-01-19 03:46:38 -05:00
Botond Dénes
2119faf7fe test/cql-pytest: add tablet detection logic and fixtures
Add keyspace_has_tablets() utility function, which, given a keyspace,
returns whether it is using tablets or not.
In addition, 3 new fixtures are added:
* has_tablets - does scylla has tablets by default?
* xfail_tablets - the test is marked xfail, when tablets are enabled by
  default.
* skip_with_tablets - the test is skipped when tablets are enabled by
  default, because it might crash with tablets.

We expect the latter two to be removed soon(ish), as we make all test,
and the functionality they test work with tablets.
2024-01-19 03:46:38 -05:00
Botond Dénes
6e53264bc3 test/cql-pytest: extract is_scylla check into util.py
This logic is currently in the scylla_only fixture, but we want to
re-use this in other utility functions in the next patches too.
2024-01-19 03:46:38 -05:00
Kefu Chai
0dbb0ed09f api: storage_service: correct a typo
s/trough/through/

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16870
2024-01-19 10:21:41 +02:00
Kefu Chai
5c0484cb02 db: add formatter for db::operation_type
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we define a formatter for db::operation_type, and
remove their operator<<().

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16832
2024-01-19 10:16:41 +02:00
Kefu Chai
2d2cd5fa3a repair: do not compare unsigned with signed
this change should silence the warning like

```
/home/kefu/dev/scylladb/repair/repair.cc:222:23: error: comparison of integers of different signs: 'int' and 'size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
  222 |     for (int i = 0; i < all.size(); i++) {
      |                     ~ ^ ~~~~~~~~~~
```

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16867
2024-01-19 08:52:02 +02:00
Kefu Chai
21d55abe8b unimplemented: add format_as() for unimplemented::cause
before this change, we rely on the default-generated fmt::formatter
created from operator<<, but fmt v10 dropped the default-generated
formatter.

in this change, we replace operator<< with format_as() for
unimplemented::cause, so that we don't rely on the deprecated behavior,
and neither do we create a fully blown fmt::formatter. as in
fmt v10, format_as() can be used in place of fmt::formatter,
while in fmt v9, format_as() is only allowed to return a integer.
so, to be future-proof, and to be simpler, format_as() is used.
we can even replace `format_as(c)` with `c`, once fmt v10 is
available in future.

Refs #13245

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16866
2024-01-19 08:38:30 +02:00
Botond Dénes
70252ee36f Merge 'auth: do not include unused headers' from Kefu Chai
these unused includes were identified by clangd. see https://clangd.llvm.org/guides/include-cleaner#unused-include-warning for more details on the "Unused include" warning.

Closes scylladb/scylladb#16868

* github.com:scylladb/scylladb:
  auth: do not include unused headers
  locator: Handle replication factor of 0 for initial_tablets calculations
  table: add_sstable_and_update_cache: trigger compaction only in compaction group
  compaction_manager: perform_task_on_all_files: return early when there are no sstables to compact
  compaction_manager: perform_cleanup: use compaction_manager::eligible_for_compaction
2024-01-19 08:30:11 +02:00
Kefu Chai
263e2fabae auth: do not include unused headers
these unused includes were identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2024-01-19 10:49:17 +08:00
Avi Kivity
d65ce16cf6 Merge 'Prevent empty compaction tasks in cleanup, upgrade sstables, and add_sstable' from Benny Halevy
This short series prevents the creation of compaction tasks when we know in advance that they have nothing to do.
This is possible in the clean path by:
- improve the detection of candidates for cleanup by skipping sstables that require cleanup but are already being compacted
- checking that list of sstables selected for cleanup isn't empty before creating the cleanup task

For upgrade sstables, and generally when rewriting all sstable: launch the task only if the list off candidate sstables isn't empty.

For regular compaction, when triggered via `table::add_sstable_and_update_cache`, we currently trigger compaction (by calling `submit`) on all compaction groups while the sstable is added only to one of them.
Also, it is typically called for maintenance sstables that are awaiting offstrategy compaction, in which case we can skip calling `submit` entirely since the caller triggers offstrategy compaction at a later stage.

Refs scylladb/scylladb#15673
Refs scylladb/scylladb#16694
Fixes scylladb/scylladb#16803

Closes scylladb/scylladb#16808

* github.com:scylladb/scylladb:
  table: add_sstable_and_update_cache: trigger compaction only in compaction group
  compaction_manager: perform_task_on_all_files: return early when there are no sstables to compact
  compaction_manager: perform_cleanup: use compaction_manager::eligible_for_compaction
2024-01-18 19:47:33 +02:00
Pavel Emelyanov
8595d64d01 locator: Handle replication factor of 0 for initial_tablets calculations
When calculating per-DC tablets the formula is shards_in_dc / rf_in_dc,
but the denominator in it can be configured to be literally zero and the
division doesn't work.

Fix by assuming zero tablets for dcs with zero rf

fixes: #16844

Signed-off-by: Pavel Emelyanov <xemul@scylladb.com>

Closes scylladb/scylladb#16861
2024-01-18 19:42:08 +02:00
Kefu Chai
09a688d325 sstables: do not use lambda when not necessary
before this change, we always reference the return value of
`make_reader()`, and the return value's type `flat_mutation_reader_v2`
is movable, so we can just pass it by moving away from it.

in this change, instead of using a lambda, let's just have the
return value of it. simpler this way.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16835
2024-01-18 15:54:49 +02:00
Kefu Chai
a1dcddd300 utils: do not include unused headers
these unused includes were identified by clangd. see
https://clangd.llvm.org/guides/include-cleaner#unused-include-warning
for more details on the "Unused include" warning.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16833
2024-01-18 12:50:06 +02:00
Asias He
d3efb3ab6f storage_service: Set session id for raft_rebuild
Raft rebuild is broken because the session id is not set.

The following was seen when run rebuild

stream_session - [Stream #8cfca940-afc9-11ee-b6f1-30b8f78c1451]
stream_transfer_task: Fail to send to 127.0.70.1:0:
seastar::rpc::remote_verb_error (Session not found:
00000000-0000-0000-0000-000000000000)

with raft topology, e.g.,

scylla --enable-repair-based-node-ops 0 --consistent-cluster-management true --experimental-features consistent-topology-changes

Fix by setting the session id.

Fixes #16741

Closes scylladb/scylladb#16814
2024-01-18 12:47:20 +02:00
Kamil Braun
e4918c0d31 test/pylib: scylla_cluster: enable raft_topology=debug level by default
To help debugging test.py failures in CI.
2024-01-18 11:24:16 +01:00
Kamil Braun
52e67ca121 raft topology: increase level of some TRACE messages
Increased them to DEBUG level, and in one case to WARN (inside an
exception handler).

The selected messages are still relatively rare (per-node per-transition
control plane events, plus events such as fibers sleeping and waking up)
although more low level. They are also small messages. Messages that are
large such as those which print all tokens of nodes or large mutations
are left on TRACE level.

The plan is to enable DEBUG level logging in test.py tests for
raft_topology, while not spamming the logs completely such as by
printing large mutations.
2024-01-18 11:24:16 +01:00
Kamil Braun
92e6604127 raft topology: log when entering transition states
Those are rare control plane events, but might be useful when debugging
problems with topology coordinator (e.g. where it got stuck).
2024-01-18 11:24:15 +01:00
Kamil Braun
aeb53ea31d raft topology: don't include null ID in exclude_nodes
Observed with newly added logs:
```
raft topology - executing global topology command barrier_and_drain, excluded nodes: {00000000-0000-0000-0000-000000000000}
```
2024-01-18 11:24:15 +01:00
Kamil Braun
ae25f703c4 raft topology: INFO log when executing global commands and updating topology state
Those are rare control plane events, but useful for debugging e.g.  if
topology coordinator gets stuck at some point.
2024-01-18 11:24:15 +01:00
Kamil Braun
71957b4320 storage_service: separate logger for raft topology
Allows selectively enabling higher logging levels for just raft-topology
related things, without doing it for the entire storage_service (which
includes things like gossiper callbacks).

Also gets rid of the redundant "raft topology:" prefix which was also
not included everywhere.
2024-01-18 11:24:14 +01:00
Eliran Sinvani
32d8dadf1a Add code coverage documentation
Add `docs/dev/code-coverage.md` with explanations about how to work with
the different tools added for coverage reporting and cli options added
to `configure.py` and `test.py`

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-18 11:11:34 +02:00
Eliran Sinvani
c7dff1b81b test.py: support code coverage
test.py already support the routing of coverage data into a
predetermined folder under the `tmpdir` logs folder. This patch extends
on that and leverage the code coverage processing libraries to produce
test coverage lcov files and a coverage summary at the end of the run.
The reason for not generating the full report (which can be achieved
with a one liner through the `coverage_utils.py` cli) is that it is
assumed that unit testing is not necessarily the "last stop" in the
testing process and it might need to be joined with other coverage
information that is created at other testing stages (for example dtest).

The result of this patch is that when running test.py with one of the
coverage options (`--coverage` / `--mode-coverage`) it will perform
another step of processing and aggregating the profiling information
created.

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-18 11:11:34 +02:00
Eliran Sinvani
00a55abdd6 code coverage: Add libraries for coverage handling
Coverage handling is divided into 3 steps:
1. Generation of  profiling data from a run of an instrumented file
   (which this patch doesn't cover)
2. Processing of profiling data, which involves indexing the profile and
   producing the data in some format that can be manipulated and
   unified.
3. Generate some reporting based on this data.

The following patch is aiming to deal with the last two steps by providing a
cli and a library for this end.
This patch adds two libraries:
1. `coverage_utils.py` which is a library for manipulating coverage
   data, it also contains a cli for the (assumed) most common operations
   that are needed in order to eventually generate coverage reporting.
2. `lcov_utils.py` - which is a library to deal with lcov format data,
   which is a textual form containing a source dependant coverage data.
   An example of such manipulation can be `coverage diff` operation
   which produces a set like difference operation. cov_a - cov_b = diff
   where diff is an lcov formated file containing coverage data for code
   cov_a that is not covered at all in cov_b.

The libraries and cli main goal is to provide a unified way to handle
coverage data in a way that can be easily scriptable and extensible.

This will pave the way for automating the coverage reporting and
processing in test.py and in jenkins piplines (for example to also
process dtest or sct coverage reporting)

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-18 11:11:34 +02:00
Eliran Sinvani
f4b6c9074a test.py: support --coverage and --coverage-mode
We aim to support code coverage reporting as part of our development
process, to this end, we will need the ability to "route" the dumped
profiles from scylla and unit test to a predetermined location.
We can consider profile data as logged data that should persist after
tests have been run.

For this we add two supported options to test.py:
--coverage - which means that all suits on all modes will participate in
             coverage.
--coverage-mode - which can be used to "turn on" coverage support only
                  for some of the modes in this run.

The strategy chosen is to save the profile data in
`tmpdir`/mode/coverage/%m.profraw (ref:
https://clang.llvm.org/docs/SourceBasedCodeCoverage.html#running-the-instrumented-program)
This means that for every suite the profiling data of each object is
going to be merged into the same file (llvm claims to lock the file so
concurrency is fine).
More resolution than the suite level seems to not give us anything
useful (at least not at the moment). Moreover, it can also be achieved
by running a single test.
Data in the suite level will help us to detect suits that don't generate
coverage data at all and to fix this or to skip generating the profiles
for them.

Also added support of  'coverage' parameter in the `suite.yaml` file,
which can be used to disable coverage for a specific suite, this
parameter defaults to True but if a suite is known to not generate
profiles or the suite profile data is not needed or obfuscate the result
it can be set to false in order to cancel profiles routing and
processing for this suite.

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-18 11:11:34 +02:00
Eliran Sinvani
759d70deee configure.py support coverage profiles on standrad build modes
We already have a dedicated coverage build, however, this build is
dedicated mostly for coverage in boost and standalone unit tests.
This added configuration option will compile every configured
build mode with coverage profiling support (excluding 'coverage' mode).
It also does targeted profiling that is narrowed down only to ScyllaDB
code and doesn't instrument seastar and testing code, this should give
a more accurate coverage reporting and also impact performance less, as
one example, the reactor loop in seastar will not be profiled (along
with everything else).
The targeted profiling is done with the help of the newly added
`coverage_sources.list` file which excludes all seastar sub directories
from the profiling.
Also an extra measure is taken to make sure that the seastar
library will not be linked with the coverage framework
(so it will not dump confusing empty profiles).
Some of the seastar headers are still going to be included in the
profile since they are indirectly included by profiled source files in
order to remove them from the final report a processing step on the
resulting profile will need to take place.

A note about expected performance impact:
It is expected to have minimal impact on performance since the
instrumentation adds counter increments without locking.
Ref: https://clang.llvm.org/docs/UsersManual.html#cmdoption-fprofile-update
This means that the numbers themselves are less reliable but all covered
lines are guarantied to have at least non-zero value.

Signed-off-by: Eliran Sinvani <eliransin@scylladb.com>
2024-01-18 11:11:34 +02:00
Kefu Chai
f5d1836a45 types: fix indent
f344e130 failed to get the indent right, so fix it.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>

Closes scylladb/scylladb#16834
2024-01-18 09:14:39 +02:00