Commit Graph

996 Commits

Author SHA1 Message Date
Anna Stuchlik
4afe2b9d9f doc: add RBNO to glossary
This commit adds Repair Based Node Operations
to the ScyllaDB glossary.

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

Closes scylladb/scylladb#15522
2023-09-25 18:16:53 +03:00
Nadav Har'El
be942c1bce Merge 'treewide: rename s3 credentials related variable and option names' from Kefu Chai
in this series, we rename s3 credential related variable and option names so they are more consistent with AWS's official document. this should help with the maintainability.

Closes scylladb/scylladb#15529

* github.com:scylladb/scylladb:
  main.cc: rename aws option
  utils/s3/creds: rename aws_config member variables
2023-09-24 14:03:47 +03:00
Nadav Har'El
4e1e7568d8 Merge 'cql3:statements:describe_statement: include UDT/UDF/UDA in generic describe' from Michał Jadwiszczak
So far generic describe (`DESC <name>`) followed Cassandra implementation and it only described keyspace/table/view/index.

This commit adds UDT/UDF/UDA to generic describe.

Fixes: #14170

Closes scylladb/scylladb#14334

* github.com:scylladb/scylladb:
  docs:cql: add information  about generic describe
  cql-pytest:test_describe: add test for generic UDT/UDF/UDA desc
  cql3:statements:describe_statement: include UDT/UDF/UDA in generic describe
2023-09-24 13:03:04 +03:00
Kefu Chai
f3f31f0c65 main.cc: rename aws option
- s/aws_key/aws_access_key_id/
- s/aws_secret/aws_secret_access_key/
- s/aws_token/aws_session_token/

rename them to more popular names, these names are also used by
boto's API. this should improve the readability and consistency.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-09-23 14:31:32 +08:00
David Garcia
762ca61ad9 docs: format db reference as list
docs: limit reference max_depth

docs: change reference description order

Closes scylladb/scylladb#15205
2023-09-22 19:25:01 +03:00
Kefu Chai
2392b6a179 doc: start unordered list with an empty line
otherwise, sphinx would render them as a single block instead of
as an unordererd list.

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

Closes scylladb/scylladb#15504
2023-09-21 14:35:09 +03:00
Anna Stuchlik
5073609366 doc: improve TTL limitation info on Counters page
This commit improves the information about
counters not supporting TTL on the Counters
page.
2023-09-20 14:38:35 +02:00
Anna Stuchlik
715b1a80c7 doc: add a note that counters do not support TTL
This commit adds the information that counters
do not support data expiration wtih TTL, plus
the link to the TTL page.

Fixes https://github.com/scylladb/scylladb/issues/15479
2023-09-20 13:28:33 +02:00
Michael Huang
62a8a31be7 cdc: use chunked_vector for topology_description entries
Lists can grow very big. Let's use a chunked vector to prevent large contiguous
allocations.
Fixes: #15302.

Closes scylladb/scylladb#15428
2023-09-18 23:17:01 +03:00
Botond Dénes
f7557a4891 Merge 'updating presto integration page documentation' from Guy Shtub
null

Closes scylladb/scylladb#15342

* github.com:scylladb/scylladb:
  Update integration-presto.rst
  Update integration-presto.rst
  Update docs/using-scylla/integrations/integration-presto.rst
  updating presto integration page
2023-09-18 14:41:16 +03:00
Guy Shtub
5d833b2ee7 Update integration-presto.rst 2023-09-18 11:29:38 +03:00
Kefu Chai
b350596656 docs: correct the code sample for checking service status
```console
$ journalctl --user start scylla-server -xe
Failed to add match 'start': Invalid argument
```

`journalctl` expects a match filter as its positional arguments.
but apparently, start is not a filter. we could use `--unit`
to specify a unit though, like:

```console
$ journalctl --user --unit scylla-server.service -xe
```

but it would flood the stdout with the logging messages printed
by scylla. this is not what a typical user expects. probably a better
use experience can be achieved using

```console
$ systemctl --user status scylla-server
```
which also print the current status reported by the service, and
the command line arguments. they would be more informative in typical
use cases.

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

Closes scylladb/scylladb#15390
2023-09-18 08:37:42 +03:00
Guy Shtub
b8693636b8 Update integration-presto.rst
Removing link to forum, will be added as general footer
2023-09-18 06:50:11 +03:00
Guy Shtub
7d0691b348 Update docs/using-scylla/integrations/integration-presto.rst
Co-authored-by: Anna Stuchlik <37244380+annastuchlik@users.noreply.github.com>
2023-09-18 06:46:02 +03:00
Kefu Chai
30ef69fcb2 docs/dev/object_store: add more samples
in hope to lower the bar to testing object store.

* add language specifier for better readability of the document.
  to highlight the config with YAML syntax
* add more specific comment on the AWS related settings
* explain that endpoint should match in the CREATE KEYSPACE
  statement and the one defined by the YAML configuration.

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

Closes #15433
2023-09-15 17:35:17 +03:00
Anna Stuchlik
fb635dccaa doc: add info - support for FIPS-compliant systems
This commit adds the information that ScyllaDB Enterprise
supports FIPS-compliant systems in versions
2023.1.1 and later.
The information is excluded from OSS docs with
the "only" directive, because the support was not
added in OSS.

This commit must be backported to branch-5.2 so that
it appears on version 2023.1 in the Enterprise docs.

Closes #15415
2023-09-15 11:08:34 +02:00
Kefu Chai
60db7f8ae3 doc: do not suggest "-node xxx" when running c-s
cassandra-stress connects to "localhost" by default. that's exactly the
use case when we install scylla using the unified installer. so do not
suggest "-node xxx" option. the "xxx" part is but confusing.

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

Closes #15411
2023-09-14 18:21:46 +03:00
Avi Kivity
a3d73bfba7 Merge 'Add support for decommission with tablets' from Tomasz Grabiec
Load balancer will recognize decommissioning nodes and will
move tablet replicas away from such nodes with highest priority.

Topology changes have now an extra step called "tablet draining" which
calls the load balancer. The step will execute tablet migration track
as long as there are nodes which require draining. It will not do regular
load balancing.

If load balancer is unable to find new tablet replicas, because RF
cannot be met or availability is at risk due to insufficient node
distribution in racks, it will throw an exception. Currently, topology
change will retry in a loop. We should make this error cause topology
change to be aborted. There is no infrastructure for
aborts yet, so this is not implemented.

Closes #15197

* github.com:scylladb/scylladb:
  tablets, raft topology: Add support for decommission with tablets
  tablet_allocator: Compute load sketch lazily
  tablet_allocator: Set node id correctly
  tablet_allocator: Make migration_plan a class
  tablets: Implement cleanup step
  storage_service, tablets: Prevent stale RPCs from running beyond their stage
  locator: Introduce tablet_metadata_guard
  locator, replica: Add a way to wait for table's effective_replication_map change
  storage_service, tablets: Extract do_tablet_operation() from stream_tablet()
  raft topology: Add break in the final case clause
  raft topology: Fix SIGSEGV when trace-level logging is enabled
  raft topology: Set node state in topology
  raft topology: Always set host id in topology
2023-09-14 17:16:23 +03:00
Tomasz Grabiec
551cc0233d tablets, raft topology: Add support for decommission with tablets
Load balancer will recognize decommissioning nodes and will
move tablet replicas away from such nodes with highest priority.

Topology changes have now an extra step called "tablet draining" which
calls the load balancer. The step will execute tablet migration track
as long as there are nodes which require draining. It will not do regular
load balancing.

If load balancer is unable to find new tablet replicas, because RF
cannot be met or availability is at risk due to insufficient node
distribution in racks, it will throw an exception. Currently, topology
change will retry in a loop. We should make this error cause topology
change to be paused so that admin becomes aware of the problem and
issues an abort on the topology change. There is no infrastructure for
aborts yet, so this is not implemented.
2023-09-14 13:05:49 +02:00
Kefu Chai
60c293ed7d doc/dev: correct the path to object_storage.yaml
we get the path object storage config like:

```c++
db::config::get_conf_sub("object_storage.yaml").native()
```
so, the default path should be $SCYLLA_CONF/object_storage.yaml.

in this change, it is corrected.

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

Closes #15406
2023-09-14 10:40:55 +03:00
Kamil Braun
a184b07cbb Merge 'raft topology: make CDC_GENERATIONS_V3 single-partition, timeuuid-sorted' from Patryk Jędrzejczak
We make the `CDC_GENERATIONS_V3` table single-partition and change the
clustering key from `range_end` to `(id, range_end)`. We also change the
type of `id` to `timeuuid` and ensure that a new generation always has
the highest `id`. These changes allow efficient clearing of obsolete CDC
generation data, which we need to prevent Raft-topology snapshots from
endlessly growing as we introduce new generations over time.

All this code is protected by an experimental feature flag. It includes
the definition of `CDC_GENERATIONS_V3`. The table is not created unless
the feature flag is enabled.

Fixes #15163

Closes #15319

* github.com:scylladb/scylladb:
  system_keyspace: rename cdc_generation_id_v2
  system_keyspace: change id to timeuuid in CDC_GENERATIONS_V3
  cdc: generation: remove topology_description_generator
  cdc: do not create uuid in make_new_generation_data
  system_kayspace: make CDC_GENERATIONS_V3 single-partition
  cdc: generation: introduce get_common_cdc_generation_mutations
  cdc: generation: rename get_cdc_generation_mutations
2023-09-13 12:54:49 +02:00
Kefu Chai
bbb6e4f822 docs: s/tar xvfz tar/tar xvfz/ in command line sample
should not "tar" to tar, otherwise we'd have following error:
```
tar (child): tar: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
```
as "tar" is not the compressed tarball we want to untar.

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

Closes #15383
2023-09-13 13:37:38 +03:00
David Garcia
5177ddac17 Support advanced db config scenarios
docs: skip html tags from description

Closes #15338
2023-09-12 15:29:16 +03:00
Patryk Jędrzejczak
1c58c6336a system_keyspace: change id to timeuuid in CDC_GENERATIONS_V3
We change the type of IDs in CDC_GENERATIONS_V3 to timeuuid to
give them a time-based order. We also change how we initialize
them so that the new CDC generation always has the highest ID.
This is the last step to enabling the efficient clearing of
obsolete CDC generation data.

Additionally, we change the types of current_cdc_generation_uuid,
new_cdc_generation_data_uuid and the second values of the elements
in unpublished_cdc_generations to timeuuid, so that they match id
in CDC_GENERATIONS_V3.
2023-09-12 11:43:34 +02:00
Patryk Jędrzejczak
fab066cffe cdc: generation: remove topology_description_generator
After moving the creation of uuid out of
make_new_generation_description, this function only calls the
topology_description_generator's constructor and its generate
method. We could remove this function, but we instead simplify
the code by removing the topology_description_generator class.
We can do this refactor because make_new_generation_description
is the only place using it. We inline its generate method into
make_new_generation_description and turn its private methods into
static functions.
2023-09-12 11:18:54 +02:00
Patryk Jędrzejczak
2cd430ac80 system_kayspace: make CDC_GENERATIONS_V3 single-partition
We make CDC_GENERATIONS_V3 single-partition by adding the key
column and changing the clustering key from range_end to
(id, range_end). This is the first step to enabling the efficient
clearing of obsolete CDC generation data, which we need to prevent
Raft-topology snapshots from endlessly growing as we introduce new
generations over time. The next step is to change the type of the id
column to timeuuid. We do it in the following commits.

After making CDC_GENERATIONS_V3 single-partition, there is no easy
way of preserving the num_ranges column. As it is used only for
sanity checking, we remove it to simplify the implementation.
2023-09-12 09:51:45 +02:00
David Garcia
a14bcf7c6a docs: improve configuration properties reference
- Adds type for each option.
- Filters out unused / invalid values, moves them to a separate section.
- Adds the term "liveness" to the glossary.
- Removes unused and invalid properties from the docs.
- Updates to the latest version of pyaml.

docs: rename config template directive

Closes #15164
2023-09-11 09:47:16 +03:00
Botond Dénes
d92620868d Merge 'docs: improve command line samples in unified-installer.rst' from Kefu Chai
in this series, we try to improve `unified-installer.rst`

- encourage user to install smaller package
- run `./install.sh` directly instead relying on that `sh` points to `bash`

Closes #15325

* github.com:scylladb/scylladb:
  doc: run install.sh directly
  doc: install headless jdk in sample command line
2023-09-11 09:34:14 +03:00
Guy Shtub
8606cca64f updating presto integration page 2023-09-11 08:31:20 +03:00
Kefu Chai
7591b1b384 doc: run install.sh directly
strictly speaking, `sh` is not necessarily bash. while `install.sh`
is written in the Bash dialect. and it errors out if it is not executed
with Bash. and we don't need to add "-x" when running the script, if
we have to, we should add it in `install.sh` not ask user to add this
option. also, `install.sh` is executable with a shebang line using
bash, so we can just execute it.

so, in this change, we just launch this script in the command line
sample.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-09-08 17:21:30 +08:00
Kefu Chai
1e0c7d14aa doc: install headless jdk in sample command line
in comparison with java-11-openjdk, java-11-openjdk-headless does not
offer audio and video support, and has less dependencies. for instance,
java-11-openjdk depends on the X11 libraries, and it also provides
icons representing JDK. but since scylla is a server side application,
we don't expect user to run a desktop on it. so there is no need to
support audio and video.

in this change, we just suggest the a "smaller" package, which is
actually also a dependency of java-11-open-jdk.

Signed-off-by: Kefu Chai <kefu.chai@scylladb.com>
2023-09-08 17:21:30 +08:00
Patryk Jędrzejczak
2643ccc70e docs: remove information about publish_cdc_generation
We update documentation after replacing the
topology::transition_state::publish_cdc_generation state with
the CDC generation publisher fiber.
2023-09-08 09:05:01 +02:00
Patryk Jędrzejczak
5ed9d4db6d raft topology: add unpublished_cdc_generations to system.topology
In the following commits, we replace the
topology::transition_state::publish_cdc_generation state with
a background fiber that continually publishes committed CDC
generations. To make these generations accessible to the
topology coordinator, we store them in the new column of
system.topology -- unpublished_cdc_generations.
2023-09-08 09:05:01 +02:00
Nadav Har'El
5625624533 doc/dev: add document about analyzing build time
Add a document describing in detail how to use clang's "-ftime-trace"
option, and the ClangBuildAnalyzer tool, to find the source files,
header files and templates which slow down Scylla's build the most.

I've used this tool in the past to reduce Scylla build time - see
commits:

   fa7a302130 (reduced 6.5%)
   f84094320d (reduced 0.1%)
   6ebf32f4d7 (reduced 1%)
   d01e1a774b (reduced 4%)

I'm hoping that documenting how to use this tool will allow other
developers to suggest similar commits.

Refs #1.

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

Closes #15209
2023-09-01 11:33:36 +03:00
Patryk Jędrzejczak
64a9bbe0ce docs: inform about deprecating IP support for --ignore-dead-nodes
We also remove one of the removenode examples because it uses the
deprecated IP support.
2023-08-25 12:33:49 +02:00
Kefu Chai
2f17b76df7 docs/operating-scylla/admin-tools: add note on deprecating sstabledump
sstabledump is deprecated in place of `scylla sstable` commands. so
let's reflect this in the document.

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

Closes #15021
2023-08-24 08:31:29 +03:00
Kamil Braun
169d19e5b0 Merge 'raft topology: support --ignore-dead-nodes in removenode and replace' from Patryk Jędrzejczak
We add support for `--ignore-dead-nodes` in `raft_removenode` and
`--ignore-dead-nodes-for-replace` in `raft_replace`. For now, we allow
passing only host ids of the ignored nodes. Supporting IPs is currently
impossible because `raft_address_map` doesn't provide a mapping from IP
to a host id.

The main steps of the implementation are as follows:
- add the `ignore_nodes` column to `system.topology`,
- set the `ignore_nodes` value of the topology mutation in `raft_removenode` and `raft_replace`,
- extend `service::request_param` with alternative types that allow storing a set of ids of the ignored nodes,
- load `ignore_nodes` from `system.topology` into `request_param` in `system_keyspace::load_topology_state`,
- add `ignore_nodes` to `exclude_nodes` in `topology_coordinator::exec_global_command`,
- pass `ignore_nodes` to `replace_with_repair` and `remove_with_repair` in `storage_service::raft_topology_cmd_handler`.

Additionally, we add `test_raft_ignore_nodes.py` with two tests that verify the added changes.

Fixes #15025

Closes #15113

* github.com:scylladb/scylladb:
  test: add test_raft_ignore_nodes
  test: ManagerClient.remove_node: allow List[HostId] for ignore_dead
  raft topology: pass ignore_nodes to {replace, remove}_with_repair
  raft topology: exec_global_command: add ignore_nodes to exclude_nodes
  raft topology: exec_global_command: change type of exclude_nodes
  topology_state_machine: extend request_param with a set of raft ids
  raft topology: set ignore_nodes in raft_removenode and raft_replace
  utils: introduce split_comma_separated_list
  raft topology: add the ignore_nodes column to system.topology
2023-08-22 18:04:59 +02:00
Patryk Jędrzejczak
16f5db8af2 raft topology: add the ignore_nodes column to system.topology
In the following commits, we add support for --ignore-dead-nodes
in raft_removenode and --ignore-dead-nodes-for-replace in
raft_replace. To make these request parameters accessible for the
topology coordinator, we store them in the new ignore_nodes
column of system.topology.
2023-08-22 10:30:12 +02:00
Avi Kivity
23be6f0336 tablets: change persistent type of replica set from set to list
The system.tablets table stores replica sets as a CQL set type,
which is sorted. This means that if, in a tablet replica set
[n1, n2, n3] n2 is replaced with n4, then on reload we'll see
[n1, n3, n4], changing the relative position of n3 from the third
replica to the second.

The relative position of replicas in a replica set is important
for materialized views, as they use it to pair base replicas with
view replicas. To prepare for materialized views using tablets,
change the persistent data type to list, which preserves order.

The code that generates new replica sets already preserves order:
see locator::replace_replica().

While this changes the system schema, tablets are an experimental
feature so we don't need to worry about upgrades.

Closes #15111
2023-08-21 22:55:14 +02:00
Anna Stuchlik
b5c4d13e36 doc: update the Seastar Perftune page
This commit updates the description of perftune.py.
It is based on the information in the reported issue (below),
the contents of help for perftune.py, and the input from
@vladzcloudius.

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

Closes #14879
2023-08-21 10:23:30 +03:00
Anna Stuchlik
57e86b05f1 doc: fix the outdated Networking section
Fixes https://github.com/scylladb/scylla-docs/issues/2467

This commit updates the Networking section. The scope is:
- Removing the outdated content, including the reference to
  the super outdated posix_net_conf.sh script.
- Adding the guidelines provided by @vladzcloudius.
- Adding the reference to the documentation for
  the perftune.py script.

Closes #14859
2023-08-21 10:17:37 +03:00
David Garcia
e23d9cd7eb docs: Autogenerate db/config.cc docs
Update layout

docs: remove output param

docs: generate cc properties on build

docs: track cc file on change

rm: note dependency

docs: clean _data

Fixes #8424.

Closes #14973
2023-08-20 21:27:37 +03:00
Avi Kivity
a4e7f9bed0 docs: cql: split DML page into one page per statement
The DML page is quite long (21 screenfuls on my monitor); split
it into one page per statement to make it more digestible.

The sections that are common to multiple statement are kept
in the main DML page, and references to them are added.

Closes #15053
2023-08-20 17:14:32 +03:00
Kefu Chai
7275b8967c docs: add sstablemetadata to operating-scylla/admin-tools
to note that sstablemetadata is being deprecated and encourage
user to switch over to the native tools.

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

Closes #15040
2023-08-17 18:48:46 +03:00
Avi Kivity
1937a5c1dd docs: cql: document the relative priority of SELECT clauses
Document how SELECT clauses are considered. For example, given the query

    SELECT * FROM tab WHERE a = 3 LIMIT 1

We'll get different results if we first apply the WHERE clause then LIMIT
the result set, or if we first LIMIT there result set and then apply the
WHERE clause.

Closes #14990
2023-08-14 17:40:37 +03:00
Tomasz Grabiec
fe181b3bac tablets: Balance tablets concurrently with active migrations
After this change, the load balancer can make progress with active
migrations. If the algorithm is called with active tablet migrations
in tablet metadata, those are treated by load balancer as if they were
already completed. This allows the algorithm to incrementally make
decision which when executed with active migrations will produce the
desired result.

Overload of shards is limited by the fact that the algorithm tracks
streaming concurrency on both source and target shards of active
migrations and takes concurrency limit into account when producing new
migrations.

The coordinator executes the load balancer on edges of tablet state
machine stransitions. This allows new migrations to be started as soon
as tablets finish streaming.

The load balancer is also continuously invoked as long as it produces
a non-empty plan. This is in order to saturate the cluster with
streaming. A single make_plan() call is still not saturating, due
to the way algorithm is implemented.
2023-07-31 01:45:23 +02:00
Anna Stuchlik
8ee6f6ecb6 doc: add the requirement to upgrade drivers
This commit adds a requirement to upgrade ScyllaDB
drivers before upgrading ScyllaDB.

The requirement to upgrade the Monitoring Stack
has been moved to the new section so that
both prerequisites are documented together.

NOTE: The information is added to the 5.2-to-5.3
upgrade guide because all future upgrade guides
will be based on this one (as it's the latest one).

If 5.3 is released, this commit should be backported
to branch-5.3.

Refs https://github.com/scylladb/scylladb/issues/13958

Closes #14771
2023-07-27 15:21:38 +02:00
Anna Stuchlik
3ed6754afc doc: update info about cassandra superuser
Fixes https://github.com/scylladb/scylla-docs/issues/4028

The goal of this update is to discourage the use of
the default cassandra superuser in favor of a custom
super user - and explain why it's a good practice.

The scope of this commit:

- Adding a new page on creating a custom superuser.
  The page collects and clarifies the information
  about the cassandra superuser from other pages.
- Remove the (incomplete) information about
  superuser from the Authorization and Authentication
  pages, and add the link to the new page instead.

Additionaly, this update will result in better
searchability and ensures language clarity.

Closes #14829
2023-07-26 23:15:31 +03:00
Tomasz Grabiec
05519bd5e5 doc: Document tablet migration state machine and load balancer 2023-07-25 21:08:02 +02:00
Anna Stuchlik
f6732865b9 doc: doc: move unified installer from web to docs
This commit adds the information on how to install ScyllaDB
without root privileges (with "unified installer", but we've
decided to drop that name - see the page title).

The content taken from the website
https://www.scylladb.com/download/?platform=tar&version=scylla-5.2#open-source
is divided into two sections: "Download and Install" and
"Configure and Run ScyllaDB".
In addition, the "Next Steps" section is also copied from
the website, and adjusted to be in sync with other installation
pages in the docs.

Refs https://github.com/scylladb/scylla-docs/issues/4091

Closes #14781
2023-07-25 10:23:02 +03:00