Commit Graph

249 Commits

Author SHA1 Message Date
Pekka Enberg
a53c1949cd Update tools/jmx submodule
* tools/jmx 5311e9b...70b19e6 (1):
  > scrub: support scrubMode and deprecate skipCorrupted
2021-08-26 12:27:13 +03:00
Pekka Enberg
bd8fa47d84 Update tools/java submodule
* tools/java 4ef8049e07...0b6ecbeb90 (1):
  > nodetool scrub: support --mode and deprecate --skip-corrupted
2021-08-26 11:07:14 +03:00
Benny Halevy
fe479aca1d reader_permit: add timeout member
To replace the timeout parameter passed
to flat_mutation_reader methods.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
2021-08-24 14:29:44 +03:00
Piotr Sarna
ea0e0c924d configure,install-dependencies: add wasmtime dependency
If the wasmtime library is available for download, it will be
set up by install-dependencies and prepared for linking.

Closes #9151

[avi: regenerate toolchain, which also updates clang to 12.0.1]
2021-08-12 12:33:43 +03:00
Avi Kivity
3089558f8d tools: toolchain: update to Fedora 34 with clang 12 and libstdc++ 11.2 2021-07-31 15:25:13 +03:00
Pekka Enberg
21cfd090f7 Update tools/python3 submodule
* tools/python3 afe2e7f...279aae1 (1):
  > Drop filename start with '..' in pip modules
2021-07-30 13:58:45 +03:00
Tomasz Grabiec
7c28f77412 Merge 'Convert all remaining int tri-compares to std::strong_ordering' from Avi Kivity
Convert all known tri-compares that return an int to return std::strong_ordering.
Returning an int is dangerous since the caller can treat it as a bool, and indeed
this series uncovered a minor bug (#9103).

Test: unit (dev)

Fixes #1449

Closes #9106

* github.com:scylladb/scylla:
  treewide: remove redundant "x <=> 0" compares
  test: mutation_test: convert internal tri-compare to std::strong_ordering
  utils: int_range: change to std::strong_ordering
  test: change some internal comparators to std::strong_ordering
  utils: big_decimal: change to std::strong_ordering
  utils: fragment_range: change to std::strong_ordering
  atomic_cell: change compare_atomic_cell_for_merge() to std::strong_ordering
  types: drop scaffolding erected around lexicographical_tri_compare
  sstables: keys: change to std::strong_ordering internally
  bytes: compare_unsigned(): change to std::strong_ordering
  uuid: change comparators to std::strong_ordering
  types: convert abstract_type::compare and related to std::strong_ordering
  types: reduce boilerplate when comparing empty value
  serialized_tri_compare: change to std::strong_ordering
  compound_compat: change to std::strong-ordering
  types: change lexicographical_tri_compare, prefix_equality_tri_compare to std::strong_ordering
2021-07-29 21:43:54 +02:00
Avi Kivity
42e1f318d7 Merge "Respect "bypass cache" in sstable index caching" from Tomasz
"
This series changes the behavior of the system when executing reads
annotated with "bypass cache" clause in CQL. Such reads will not
use nor populate the sstable partition index cache and sstable index page cache.
"

* 'bypass-cache-in-sstable-index-reads' of github.com:tgrabiec/scylla:
  sstables: Do not populate page cache when searching in promoted index for "bypass cache" reads
  sstables: Do not populate partition index cache for "bypass cache" reads
2021-07-28 18:45:39 +03:00
Avi Kivity
e52ebe2da5 types: convert abstract_type::compare and related to std::strong_ordering
Change comparators around types to std::strong_ordering.

Ref #1449.
2021-07-28 13:19:24 +03:00
Botond Dénes
84c9bf2b63 tools/scylla-sstable-index: remove global reader concurrency semaphore
Use a local one instead and make sure to stop it before it is destroyed.

Message-Id: <20210721133754.356229-1-bdenes@scylladb.com>
2021-07-21 16:41:01 +03:00
Avi Kivity
9c3f8028f1 Update tools/java submodule (SLES 15)
* tools/java 79a441972d...4ef8049e07 (1):
  > dist/redhat: change PyYAML filepath to allow installing on SLES15

Fixes #9045.
2021-07-18 14:24:42 +03:00
Tomasz Grabiec
f4227c303b sstables: Do not populate partition index cache for "bypass cache" reads
Index cursor for reads which bypass cache will use a private temporary
instance of the partition index cache.

Promoted index scanner (ka/la format) will not go through the page cache.
2021-07-15 12:13:20 +02:00
Piotr Sarna
3d816b7c16 Merge 'Move the reader concurrency semaphore in front of the cache' from Botond
This patchset combines two important changes to the way reader permits
are created and admitted:
1) It switches admission to be up-front.
2) It changes the admission algorithm.

(1) Currently permits are created before the read is started, but they
only wait for admission when going to the disk. This leaves the
resources consumption of cache and memtables reads unbounded, possibly
leading to OOM (rare but happens). This series changes this that permits
are admitted at the moment they are creating making admission up-front
-- at least those reads that pass admission at all (some don't).

(2) Admission currently is based on availability of resources. We have a
certain amount of memory available, which derived from the memory
available to the shard, as well a hardcoded count resource. Reads are
admitted when a count and a certain amount (base cost) of memory is
available. This patchset adds a new aspect to this admission process
beyond the existing resource availability: the number of used/blocked
reads. Namely it only admits new reads if in addition to the necessary
amount of resources being available, all currently used readers are
blocked. In other words we only admit new reads if all currently
admitted reads requires something other than CPU to progress. They are
either waiting on I/O, a remote shard, or attention from their consumers
(not used currently).

The reason for making these two changes at the same time is that
up-front admission means cache reads now need to obtain a permit too.
For cache reads the optimal concurrency is 1. Anything above that just
increases latency (without increasing throughput). So we want to make sure
that if a cache reader hits it doesn't get any competition for CPU and
it can run to completion. We admit new reads only if the read misses and
has to go to disk.

A side effect of these changes is that the execution stages from the
replica-side read path are replaced with the reader concurrency
semaphore as an execution stage. This is necessary due to bad
interaction between said execution stages and up-front admission. This
has an important consequence: read timeouts are more strictly enforced
because the execution stage doesn't have a timeout so it can execute
already timed-out reads too. This is not the case with the semaphore's
queue which will drop timed-out reads. Another consequence is that, now
data and mutation reads share the same execution stage, which increases
its effectiveness, on the other hand system and user reads don't
anymore.

Fixes: #4758
Fixes: #5718

Tests: unit(dev, release, debug)

* 'reader-concurrency-semaphore-in-front-of-the-cache/v5.3' of https://github.com/denesb/scylla: (54 commits)
  test/boost/reader_concurrency_semaphore_test: add used/blocked test
  test/boost/reader_concurrency_semaphore_test: add admission test
  reader_permit: add operator<< for reader_resources
  reader_concurrency_semaphore: add reads_{admitted,enqueued} stats
  table: make_sstable_reader(): fix indentation
  table: clean up make_sstable_reader()
  database: remove now unused query execution stages
  mutation_reader: remove now unused restricting_reader
  sstables: sstable_set: remove now unused make_restricted_range_sstable_reader()
  reader_permit: remove now unused wait_admission()
  reader_concurrency_semaphore: remove now unused obtain_permit_nowait()
  reader_concurrency_semaphore: admission: flip the switch
  database: increase semaphore max queue size
  test: index_with_paging_test: increase semaphore's queue size
  reader_concurrency_semaphore: add set_max_queue_size()
  test: mutation_reader_test: remove restricted reader tests
  reader_concurrency_semaphore: remove now unused make_permit()
  test: reader_concurrency_semaphore_test: move away from make_permit()
  test: move away from make_permit()
  treewide: use make_tracking_only_permit()
  ...
2021-07-14 16:22:56 +02:00
Botond Dénes
7bfa40a2f1 treewide: use make_tracking_only_permit()
For all those reads that don't (won't or can't) pass through admission
currently.
2021-07-14 17:19:02 +03:00
Avi Kivity
6df3139455 install-dependencies.sh: add gdb
gdb is used for testing scylla-gdb.py (since 3c2e852dd), so it needs
to be listed as a dependency. Add it there. It was listed as a
courtesy dependency in the frozen toolchain (which is why it still
worked), so it's removed from there.

Closes #9034
2021-07-14 10:15:54 +03:00
Nadav Har'El
f540a69a82 Update tools/java submodule
* tools/java 5013321823...79a441972d (2):
  > Add Zstd compressor
  > Settings Schema: fix typo in settings printing

Adding the Zstd compressor fixes #8887.
2021-07-12 20:07:00 +02:00
Tomasz Grabiec
2b673478aa sstables: index_reader: Do not expose index_entry references
index_entry will be an LSA-managed object. Those have to be accessed
with care, with the LSA region locked.

This patch hides most of direct index_entry accesses inside the
index_reader so that users are safe.
2021-07-02 19:02:13 +02:00
Tomasz Grabiec
a5c72ed899 sstables, database: Keep cache_tracker reference inside sstables_manager
So that sstable code can pick it up for caching (lru and region).
2021-07-02 10:25:58 +02:00
Takuya ASADA
edd54a9463 reloc: add arch to relocatable package filename
Add architecture name for relocatable packages, to support distributing
both x86_64 version and aarch64 version.

Also create symlink from new filename to old filename to keep
compatibility with older scripts.

Fixes #8675

Closes #8709

[update tools/python3 submodule:

* tools/python3 ad04e8e...afe2e7f (1):
  > reloc: add arch to relocatable package filename
]
2021-06-28 15:01:09 +03:00
Pekka Enberg
055bc33f0f Update tools/java submodule
* tools/java 599b2368d6...5013321823 (4):
  > cassandra-stress: fix failure due to the assert exception on disconnect when test is completed
  > node_probe: toppartitions: Fix wrong class in getMethod
  > Fix NullPointerException in SettingsMode
  > cassandra-stress: Remove maxPendingPerConnection default
2021-06-18 14:19:34 +03:00
Pekka Enberg
2a9443a753 Update tools/jmx submodule
* tools/jmx a7c4c39...5311e9b (2):
  > storage_service: takeSnapshot: support the skipFlush option
  > build(deps): bump snakeyaml from 1.16 to 1.26 in /scylla-apiclient
2021-06-18 14:19:29 +03:00
Avi Kivity
a55b434a2b treewide: extent copyright statements to present day 2021-06-06 19:18:49 +03:00
Pavel Solodovnikov
e0749d6264 treewide: some random header cleanups
Eliminate not used includes and replace some more includes
with forward declarations where appropriate.

Signed-off-by: Pavel Solodovnikov <pa.solodovnikov@scylladb.com>
2021-06-06 19:18:49 +03:00
Avi Kivity
f3e8e625c0 Update tools/java submodule (toppartitions single jmx call)
* tools/java fd92603b99...599b2368d6 (1):
  > toppartitions: Fix toppartitions to only jmx once

Ref #8459.
2021-05-27 16:57:57 +03:00
Avi Kivity
eed89a9b56 Update tools/jmx submodule (toppartitions multi-sampler query)
* tools/jmx 440313e...a7c4c39 (1):
  > storage_service: Fix getToppartitions to always return both reads and writes
2021-05-11 18:39:10 +03:00
Botond Dénes
824b49aeb4 tools/scylla-sstable-index: use defer() to close sstables manager
So it is closed when loading the sstable throws an exception too.
Failing to close the manager will mask the real error as the user will
only see the assert failure due to failing to close the manager.

Signed-off-by: Botond Dénes <bdenes@scylladb.com>
Message-Id: <20210429092248.50968-1-bdenes@scylladb.com>
2021-04-29 12:50:25 +03:00
Avi Kivity
7a6b678044 Update tools/java submodule for EveryWhere compaction strategy
* tools/java 57eb143119...fd92603b99 (1):
  > Add EverywhereStrategy class
2021-04-27 12:23:23 +03:00
Avi Kivity
34b57688b9 tools: toolchain: dbuild: define die() earlier
die() is called before it is defined, so it doesn't work. Move it eariler.

Ref #8520.

Closes #8523
2021-04-22 15:38:10 +02:00
Nadav Har'El
91249e9683 Update tools/java submodule
* tools/java 5756445ec7...57eb143119 (1):
  > sstableloader: Handle non-prepared batches with ":" in identifier names

Fixes #8230.
2021-04-06 16:37:03 +03:00
Avi Kivity
bfed9c15d5 Update tools/java submodule
* tools/java fb21784b91...5756445ec7 (1):
  > sstableloader: fix handling of rewritten partition

Ref scylladb/scylla-tools-java#238.
2021-04-01 16:07:46 +03:00
Avi Kivity
bbec43f9a1 Update tools/java submodule
* tools/java ccc4201ded...fb21784b91 (2):
  > fix: Add dummy implementation of getToppartitions
  > nodetool: Make toppartitions call the generic endpoint

Fixes #4520.
2021-03-31 17:38:03 +03:00
Pekka Enberg
aec33c599b Update tools/python3 submodule
* tools/python3 6f3bcbe...ad04e8e (2):
  > dist/debian: fix renaming debian/scylla-* files rule
  > fix license of package build script to AGPL
2021-03-29 11:50:24 +03:00
Pekka Enberg
203b7394d7 Update tools/java submodule
* tools/java 7b66b7a0fc...ccc4201ded (1):
  > dist/debian: fix renaming debian/scylla-* files rule
2021-03-29 11:50:19 +03:00
Avi Kivity
ec4d91f9eb tools: toolchain: dbuild: improve cgroupv2 detection code
dbuild detects if the kernel is using cgroupv2 by checking if the
cgroup2 filesystem is mounted on /sys/fs/cgroup. However, on Ubuntu
20.10, the cgroup filesystem is mounted on /sys/fs/cgroup and the
cgroup2 filesystem is mounted on /sys/fs/cgroup/unified. This second
mount matches the search expression and gives a false positive.

Fix by adding a space at the end; this will fail to match
/sys/fs/cgroup/unified.

Closes #8355
2021-03-29 09:31:29 +03:00
Avi Kivity
46185d7d82 Update tools/jmx submodule
* tools/jmx 9c687b5...440313e (1):
  > storage_service: Add a generic toppartitions endpoint
2021-03-25 12:36:10 +02:00
Avi Kivity
957259fab7 tools: toolchain: prepare: adjust manifest manipulations
The manifest manipulation commands stopped working with podman 3;
the containers-storage: prefix now throws errors.

Switch to `buildah manifest`; since we're building with buildah,
we might as well maintain the manifest with buildah as well.

Closes #8231
2021-03-23 09:18:19 +02:00
Takuya ASADA
0424a41e30 tools/toolchain: stop ignoring error on install-dependencies.sh, run jmx/java script correctly
We should run install-dependencies.sh with -e option to prevent ignoring
error in the script.
Also, need to add tools/jmx/install-dependencies.sh and
tools/java/install-dependencies.sh, to fix 'No such file or directory'
error on them.

Fixes #8293

Closes #8294

[avi: did not regenerate toolchain image, since no new packages are
      installed]
2021-03-18 11:24:18 +01:00
Avi Kivity
b91d6776a0 Update tools/java submodule
* tools/java fdc8fcc22c...7b66b7a0fc (1):
  > dist/redhat: add support SLES
2021-03-18 11:24:18 +01:00
Avi Kivity
11308c05f4 Update tools/jmx submodule
* tools/jmx 15c1d4f...9c687b5 (1):
  > dist/redhat: add support SLES
2021-03-17 09:59:22 +02:00
Avi Kivity
f326a2253c Update tools/java submodule
* tools/java 2c6110500c...fdc8fcc22c (1):
  > sstableloader: Use compound "where" restrictions for clustering
2021-03-15 11:19:22 +02:00
Avi Kivity
a49c4ab754 Update tools/java submodule
* tools/java c5d9e8513e...2c6110500c (1):
  > cassandra.in.sh: Add path to rack/dc properties file to classpath

Fixes #7930.
2021-03-11 12:03:01 +02:00
Nadav Har'El
ad563c6279 Update tools/java submodule
Fixes an sstableloader bug where we quoted twice column names that
had to be quoted, and therefore failed on such tables - and in particular
Alternator tables which always have a column called ":attrs".

Fixes #8229

* tools/java 142f517a23...c5d9e8513e (1):
  > sstableloader: Only escape column names once
2021-03-07 10:33:49 +02:00
Pekka Enberg
6066db7c90 Update tools/jmx submodule
* tools/jmx bac7d0b...15c1d4f (2):
  > StorageService: Add a method to return the uptime
  > Bump Jackson version in scylla-apiclient
2021-03-04 10:56:37 +02:00
Pekka Enberg
1d8a94f941 Update tools/jmx submodule
* tools/jmx c2fc96b...bac7d0b (1):
  > Merge 'Fix locking in APIBuilder.remove()' from Pekka Enberg
2021-03-03 18:30:48 +02:00
Avi Kivity
facc7c370e Update tools/jmx submodule
* tools/jmx 8073af6...c2fc96b (1):
  > APIBuilder: Remove RW-lock in JMX server repository wrapper

Fixes #7991.
2021-03-03 15:41:09 +02:00
Avi Kivity
86d8977c96 Update tools/python3 submodule
* tools/python3 199ac90...6f3bcbe (2):
  > Add support pip modules
  > create-relocatable-package.py: add support python libraries in /usr/local
2021-03-01 10:10:13 +02:00
Avi Kivity
8ac0d6d15d Update tools/jmx submodule
* tools/jmx bf8bb16...8073af6 (1):
  > CompactionManager: add the compaction id when available

Fixes #7927.
2021-03-01 10:09:16 +02:00
Pekka Enberg
d483922671 Update tools/java submodule
* tools/java 0187829d5e...142f517a23 (2):
  > nodetool: Enable resetlocalschema
  > sstableloader: Make progress printout less eager.
2021-02-19 12:37:04 +02:00
Pekka Enberg
843bf57c3c Update tools/jmx submodule
* tools/jmx 949cefc...bf8bb16 (1):
  > Merge 'dist/debian: fix renaming debian/scylla-* files rule' from Takuya ASADA
2021-02-18 10:35:00 +02:00
Avi Kivity
713a159600 tools: toolchain: add simplified procedure for creating dbuild images
The current procedure for building images is complicated, as it
requires access to x86_64, aarch64, and s390x machines. Add an alternative
procedure that is fully automated, as it relies on emulation on a single
machine.

It is slow, but requires less attention.

Closes #8024
2021-02-04 15:37:36 +02:00