60 Patch |
58dc085bbb33bba84becd6adc3b31e9325eda4eb,
a424d836811508078f0761fd4650c31e330e1886,
ba7e58c43c334260f296a28079ad3a1d5a3e3605,
1afdb68bea7aef495a3cdc895b778fc4ea2c72e0,
995d1683eb688a75d53cbaef4b1507905dcf24e0,
453107f9a0a7c00b21299f426fb24dda82d735eb,
7f8db256377ff4e449a83282b2561ce5e7b74adf,
971941cac0ca62d03503509b92d035624388ffba,
e95786a077e1137dcaae206854986987edc6a71e,
2a25c5defc413e6511a2fceee16e87d090b961c8,
a57aeb63ee65a06f1b9a2dc7eb77684f6853ebf2,
77c815071a66fb53b97e9e07695417004dd88804,
4a6b8c9cfe0c6286d12c7d561941a24c25a206ef,
20795db4d708b9287e0a2281695923bfb6fa9138,
f848cd063e5e1671c84807615f5eae809253971d,
af0060f1325bf8edf74171f60326a3427e13e01d,
b5570109c19acaf91281fd7901041c0c2b1f3b6c,
1d7b3f10722b52482d2123a4784dda9c92949137,
e329f3232fae867879aba2cd0a766404aaf9a427,
cf09cded72dd04e272f56fba0b7d9cceb0c4f894,
49723c720e0ae5762d77dfb7568c9b290a877560,
888a546f84790c0a0b1b930e682cf597caaa0d61,
529171b1f6dee277a9087eb9da7242ce17873643,
ad936f6482aee2a05fa45ba4fdd06267958298f6,
b16b89f7f4a15441af757fa5a84b7e1e0420dcba,
31fa33fcb446e522947f899d948de4042be04c62,
c1a6225dac62db94fd3faee92513e84ba3b9b3b7,
d8e9e2359db1f5561eb872d28ab16098b5a62c1d,
36d48b209c84470930d5ce3d4f4ab1c406dae60e,
8045f8eedad4510ecbf66bb739d464eec741aced,
c7b170cf2e7764159a3d9cf4ca0abc6db1659e51,
f8605b3c3dfdfdc5ef1b8327f4fd657efca8f9b7,
6b650d956ed9ca57b99065cdc3c2c81d2ef0c2d1,
63292010803875af6496ce7c787f404e66311375,
ccda6798caae7eb7ef11ac9ee248f2e80720a6e2,
4be61d482c9a717fa4ebe2fc4b7d09a230dac68a,
cf796be039b9b08364de11fd7fec8a00cf699616,
ca8dd2e0381a19ede99ce4b70959ce7a584ea0d2,
20caf6efdd50c276e22f3a681b87e883891877b8,
a4ca352a1720744a2424c64c498f31b2460924e8,
ab1884d2eedace79857489cb9dbe455ada9e4ad1,
3cbb3d19c6f043b3a20e4933e5ff7a0e3d58f0a9,
9912a620a0e67d9aa723037aaf5237598a895eb7,
2cc2eb5844e1f7ec54b2934589c2f4a6a3d226bc,
40c3fac3891013457035fcfc4944b27535d5d701,
5d2cbaf5cb810f53689bf227e2c1f78a9a2b2e9f,
38cdacb2e7418e2aefbcffb1754dcd324c46028d,
02cc6548f291528e9749a51d103463f9552f4b4e,
30c04eb38a796183643bdcbaff8f425d90ebf671,
6e358acfce071cad16ac88c15dc2229bbb8a7944,
5471b66c1e69e057bbbe75e4ffe67c1891cd9495,
1759eb535ff2dbd3dea3fa8626eba0fe70ecb113,
05c0bbe29f75d678596af09abb0c68d15e93f7ba,
07deb07d2e57a32c67643385403980a9a3c3fc95,
a7a2c29e990acb2363eb7a15cc4b970ebdc04753,
54abba8d7d870da5055bef79a51cf52fad980deb,
24a08f22707901f7641e48f0c26e54b05c0e03c3,
2e233ec579e4d2a23021116027d75e776e7ad9ec,
7a5e710a2173e492907edc4094e052157a562103,
bc219cbf75bdbfdc7a95b3160ef17332c9274b44 |
58dc085bbb33bba84becd6adc3b31e9325eda4eb | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-12-30 15:31:48-08:00
ninja fix: update CHANGES for 8d88fba753db9a464bb0b562b87bd0d5b6271c69 (CASSSIDECAR-158)
a424d836811508078f0761fd4650c31e330e1886 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-12-30 15:28:42-08:00
CASSSIDECAR-182: Refactor access to delegate methods to simplify (#168)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSSIDECAR-182
ba7e58c43c334260f296a28079ad3a1d5a3e3605 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-12-19 15:55:38-08:00
CASSSIDECAR-174: Mechanism to have a reduced number of Sidecar instances run operations (#160)
Patch by Francisco Guerrero; Reviewed by Yifan Cai, Doug Rohrer for CASSSIDECAR-174
1afdb68bea7aef495a3cdc895b778fc4ea2c72e0 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-12-12 16:48:45-08:00
CASSSIDECAR-178: Stopping Sidecar can take a long time (#162)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSSIDECAR-178
995d1683eb688a75d53cbaef4b1507905dcf24e0 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-12-06 13:02:34-08:00
CASSSIDECAR-122: yaml configuration defaults to a file that doesn't e… (#153)
* CASSSIDECAR-122: yaml configuration defaults to a file that doesn't exist
Patch by Francisco Guerrero; Reviewed by Jon Haddad, Yifan Cai for CASSSIDECAR-122
453107f9a0a7c00b21299f426fb24dda82d735eb | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-10-09 15:45:42-07:00
CASSANDRASC-147: Expose vert.x filesystem options configuration (#138)
By default, vert.x will attempt to resolve files from the application classpath
when it is unable to find them in the local filesystem. Additionally, by default
vert.x will cache any files that it reads from the classpath into the local
filesystem.
For Sidecar, this optimization is unnecessary as Sidecar doesn't package anything
in the classpath that might be used while running the application.
In this commit, we disable this optimization by default, but expose configuration
options to tune these options on need-basis.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-147
7f8db256377ff4e449a83282b2561ce5e7b74adf | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-09-05 15:10:37-07:00
CASSANDRASC-145: Move root project into a subproject in gradle (#136)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-145
971941cac0ca62d03503509b92d035624388ffba | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-08-06 15:06:30-07:00
Fixes updating traffic shaping options throws IllegalStateException (#130)
Patch by Francisco Guerrero; Reviewed by Saranya Krishnakumar, Arjun Ashok, Yifan Cai for CASSANDRASC-140
e95786a077e1137dcaae206854986987edc6a71e | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-05-08 18:04:05-07:00
CASSANDRASC-129: Remove tableId from list snapshot response (#120)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-129
2a25c5defc413e6511a2fceee16e87d090b961c8 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-04-25 12:39:46-07:00
CASSANDRASC-125: Import Queue pendingImports metrics is reporting an … (#117)
The pending imports metric does not aggregate across all keyspaces/tables, in this commit
we aggregate the queue sizes and report on a per host basis.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-125
77c815071a66fb53b97e9e07695417004dd88804 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-04-23 10:44:28-07:00
CASSANDRASC-123: Add missing method to retrieve the InetSocketAddress to DriverUtils (#114)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-123
4a6b8c9cfe0c6286d12c7d561941a24c25a206ef | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-04-21 14:22:36-07:00
CASSANDRASC-94 Reduce filesystem call while streaming SSTables (#91)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-94
20795db4d708b9287e0a2281695923bfb6fa9138 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-04-03 15:16:57-07:00
CASSANDRASC-116: Allow for JmxClient to be extensible
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-116
f848cd063e5e1671c84807615f5eae809253971d | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-03-21 15:26:06-07:00
CASSANDRASC-107: Improve logging for slice restore task (#108)
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-107
af0060f1325bf8edf74171f60326a3427e13e01d | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-03-07 16:25:18-08:00
CASSANDRASC-113 Fix flaky JmxClientTest (#105)
In this PR, we fix the race condition that occurs when determining the port number to use for the registry.
Currently, the port is determined in the `availablePort` method, where a socket is determined by using port
0. The OS will assign a port number for the socket, but we immediately close the socket, and use the determined
port number to run the test. This PR brings a better approach by directly using port 0 while creating the
registry, thus avoiding the intermediate step and directly using the port that originally was assigned
to the registry without releasing it until the end of the test.
Additionally in this PR, we rename the integration test JmxClientTest which name is colliding with the
unit test. This allows for a better IDE integration and debugging experience.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-113
b5570109c19acaf91281fd7901041c0c2b1f3b6c | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-02-12 21:13:23-08:00
CASSANDRASC-104 Relocate Sidecar common classes in vertx-client-shaded
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-104
1d7b3f10722b52482d2123a4784dda9c92949137 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-01-29 10:13:50-08:00
CASSANDRASC-98: Improve logging for traffic shaping / rate limiting configurations
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-98
e329f3232fae867879aba2cd0a766404aaf9a427 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-01-25 10:30:52-08:00
CASSANDRASC-97: Add support for additional digest validation during SSTable upload
In this commit we add the ability to support additional digest algorithms for verification
during SSTable uploads. We introduce the `DigestVerifierFactory` which now supports
XXHash32 and MD5 `DigestVerifier`s.
This commit also adds support for XXHash32 digests. Clients can now send the XXHash32 digest
instead of MD5. This would allow both the clients and server the flexibility to utilize a more
performant algorithm.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-97
cf09cded72dd04e272f56fba0b7d9cceb0c4f894 | Author: Francisco Guerrero <frankgh@apache.org>
| 2024-01-19 17:38:55-08:00
CASSANDRASC-96 Fix typo in foundation package under common org.apache.cassandra.sidecar
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-96
888a546f84790c0a0b1b930e682cf597caaa0d61 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-12-13 16:45:39-08:00
CASSANDRASC-88: Allow DriverUtils to be pluggable
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-88
529171b1f6dee277a9087eb9da7242ce17873643 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-12-11 13:49:36-08:00
CASSANDRASC-87: Add JMX health checks during the periodic health checks
In this commit, we add health checks based on the JMX connectivity to the managed
Cassandra instances. Additionally, we construct the NodeSettings object based on
JMX. This allows the Sidecar process to be able to determine an adapter for the
node even if the node is in joining state, or its binary port has been disabled.
Co-authored-by: Doug Rohrer <doug@therohrers.org>
Co-authored-by: Francisco Guerrero <frankgh@apache.org>
Patch by Doug Rohrer, Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-87
49723c720e0ae5762d77dfb7568c9b290a877560 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-11-27 09:13:21-08:00
CASSANDRASC-85: Expose TTL option for the create snapshot endpoint
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-85
ad936f6482aee2a05fa45ba4fdd06267958298f6 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-11-15 17:09:49-08:00
CASSANDRASC-82: Expose additional SSL configuration options for the Sidecar Service
Patch by Francisco Guerrero; Reviewed by Doug Rohrer, Yifan Cai for CASSANDRASC-82
b16b89f7f4a15441af757fa5a84b7e1e0420dcba | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-11-15 16:45:32-08:00
CASSANDRASC-84: Expose additional node settings
Sidecar exposes settings from the Cassandra node via the node settings API endpoint. The information exposed is
limited, and we need to start exposing additional information from the `system.local` table, for example
`datacenter` information, owned token ranges, and the local address and port for the native protocol. This
information can be consumed by Sidecar itself, as well as the Cassandra Analytics library.
In this commit, we expose additional settings for the node.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-84
31fa33fcb446e522947f899d948de4042be04c62 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-11-14 14:42:17-08:00
CASSANDRASC-76: Sidecar does not handle keyspaces and table names with mixed case
Cassandra Sidecar does not properly handle API requests for endpoints that have keypaces
or table names that need to be quoted, for example when names have mixed case or when
the name is a reserved keyword in Cassandra.
In this commit, we perform special handling when the keyspace or table names are quoted
in the path params. We add tests to ensure that handling is correct.
Additionally, we fix the validation for keyspaces and table names without quotes and add
special validation for quoted names.
Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRASC-76
c1a6225dac62db94fd3faee92513e84ba3b9b3b7 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-11-07 10:13:06-08:00
CASSANDRASC-83: Require gossip to be enabled for ring and token ranges mapping endpoints
The ring and token ranges mapping endpoints leverage JMX to produce the payload. Ring and token ranges
mapping information is derived from gossip information available to the Cassandra instance. If gossip
has been disabled, the information might provide an inconsistent view of the cluster which is
undesirable. We should instead return a 503 (Service Unavailable) to the client whenever the client
tries to access these endpoints and gossip has been disabled.
In this commit, we ensure the endpoints return a 503 (Service Unavailable) when gossip is disabled.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Josh McKenzie, Yifan Cai for CASSANDRASC-83
d8e9e2359db1f5561eb872d28ab16098b5a62c1d | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-10-27 10:13:24-07:00
CASSANDRASC-81: Improve TokenRangeReplicasResponse payload
The `TokenRangeReplicasResponse` returns a list with `ReplicaMetadata`. This information is used by clients to lookup
replica metadata. The lookup is done with the replica information, which consists of the `ip:port`.
Clients are looping over the `ReplicaMetadata` list and matching IP and port to retrieve the metadata object. Instead,
we can improve the payload by changing the data structure from a list to a map, and have clients lookup by the replica
(ip + port), without having to loop.
Patch by Francisco Guerrero; Reviewed by Arjun Ashok, Dinesh Joshi, Yifan Cai for CASSANDRASC-81
36d48b209c84470930d5ce3d4f4ab1c406dae60e | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-10-27 09:38:11-07:00
CASSANDRASC-80: HealthCheckPeriodicTask execute never completes the promise when instances are empty
When the HealthCheckPeriodicTask executes, and the instances are null or empty, the promise never completes.
This prevents subsequent scheduled health checks to take place because the PeriodicTaskExecutor will only
schedule the new task only if no other tasks are active. This makes the HealthCheckPeriodicTask to never
perform health checks when this condition is encountered.
In this commit, we fix the issue by completing the promise when this condition is encountered.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-80
8045f8eedad4510ecbf66bb739d464eec741aced | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-10-04 12:01:58-07:00
CASSANDRASC-77: Upgrade vertx to version 4.4.6 to bring hot reloading and traffic shaping options
Vertx 4.4.6 brings two features that we integrate into Sidecar.
1. Hot reloading of SSL certificates. This allows a running cluster to reload
certificates without having to restart the service.
2. Traffic shaping options. This allows to introduce protections for the
service. It allows configuring ingress/egress limits.
Additionally, this patch introduces the SidecarServerEvents messaging. It
leverages vertx's EventBus to publish and consume messages when server
starts, server stops, on CQL connection ready, or CQL disconnection,
and when all CQL connections are ready.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-77
c7b170cf2e7764159a3d9cf4ca0abc6db1659e51 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-09-21 14:16:56-07:00
CASSANDRASC-74: Stream sstable components API fails on secondary index files
In this commit, we fix streaming secondary index SSTable component files. We add
tests to validate that the index files can be streamed. We also add compatibility
for older clients that don't have the fix.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-74
f8605b3c3dfdfdc5ef1b8327f4fd657efca8f9b7 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-09-02 12:35:54-07:00
CASSANDRASC-72: Split unit tests and integration tests in CircleCI config
As the number of integration tests continues to grow, it is desirable to split
unit tests and integration tests. It is also desirable to parallelize integration
tests, each integration test should be its own job. The goals of this improvement
are:
- Fail fast on checkstyle or minor errors
- Speed up test runtime by running integration tests in parallel
- Isolate failing tests to specific combinations of Cassandra
In this commit, we run unit tests individually for both java 8 and java 11. We split
integration tests into its own jobs, split per java version and cassandra version
combination.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-72
6b650d956ed9ca57b99065cdc3c2c81d2ef0c2d1 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-08-25 14:46:03-07:00
CASSANDRASC-71: Allow configuring permissions for uploaded SSTables
This commit introduces a new configuration for SSTable uploads (`file_permissions`) which allows
an operator to configure the desired file permissions used for files that are uploaded via SSTable
upload.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-71
63292010803875af6496ce7c787f404e66311375 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-08-18 10:38:19-07:00
CASSANDRASC-69: Refactor Sidecar configuration
This commit refactors the Sidecar configuration. It separates the configuration
objects from the cluster objects. For example, by default `InstancesConfig` will
be provisioned from the configured `InstanceConfiguration`.
POJOs now represent the configuration from the yaml files. Adding new configurations
entails adding new POJOs and their relationships as well as updating the default
yaml configuration file.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-69
ccda6798caae7eb7ef11ac9ee248f2e80720a6e2 | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-07-21 09:42:17-07:00
CASSANDRASC-67 Fix relocation of native libraries for vertx-client-shaded
OpenSSL is currently unavailable in the vertx-client-shaded library. This is due to the
incorrect relocation of the netty native libraries under META-INF/native/libnetty.
In this commit we fix the relocation of the native libraries and we ensure that the
relocation is properly configured by adding tests that guarantee OpenSSL loads correctly
with the correct relocation.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-67
4be61d482c9a717fa4ebe2fc4b7d09a230dac68a | Author: Francisco Guerrero <frankgh@apache.org>
| 2023-07-18 08:29:10-07:00
CASSANDRASC-66 Fix builds in Apache CI
Currently, tests running under {{org.apache.cassandra.sidecar.HealthServiceSslTest}}
[are failing](https://ci-cassandra.apache.org/job/cassandra~sidecar/42/) when running
inside ASF's CI. Logs are showing that some resources (keystore and truststore) are
not found. This is causing the tests to fail.
In this commit, we read the resource from the stream, which is guaranteed to exist
as long as the resource exists and the resource name is correct, then we write the
resource to a temporary directory, and use the file name to set the keystore and
truststore path as part of the configuration options.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-66
ca8dd2e0381a19ede99ce4b70959ce7a584ea0d2 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-07-11 04:30:59-07:00
CASSANDRASC-64: File descriptor is not being closed on MD5 checksum
This commit fixes an issue where the file descriptors are not being closed during
the MD5 checksum during SSTable upload. This can potentially cause the JVM to run
out of available file descriptors during execution, and it would force an operator
to restart the Sidecar process to return to a working state.
In this commit, we ensure the file is closed after the checksum is calculated.
Additionally, this commit fixes a rare ConcurrentModificationException encountered
in `SSTableImporter` whree the `importQueuePerHost` does not use a thread-safe map.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-64
cf796be039b9b08364de11fd7fec8a00cf699616 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-27 21:20:13-07:00
CASSANDRASC-63: Support credential rotation in JmxClient
JMX credentials in a Cassandra instance can be rotated on a cadence, on every bounce, or by some other
means. In those cases, the `JmxClient` will no longer be able to connect to the instance completely
losing the ability to talk to that instance.
In this commit, we allow the `JmxClient` to support credential changes to be continue to talk to the
Cassandra instance uninterrupted without any potential downtime to the Sidecar service.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-63
# Conflicts:
# CHANGES.txt
20caf6efdd50c276e22f3a681b87e883891877b8 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-27 05:56:07-07:00
CASSANDRASC-61: Add Release Audit Tool (RAT) plugin to Sidecar
This commit adds the Release Audit Tool (RAT) plugin to `build.gradle` which
adds a new build task `rat`. This new task will make sure that the license
headers are present in source files during the `check` task.
To run the RAT plugin, you can run:
```
./gradlew rat
```
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Michael Semb Wever for CASSANDRASC-61
a4ca352a1720744a2424c64c498f31b2460924e8 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-23 16:23:26-07:00
CASSANDRASC-59: Expose JMX host and port from JMXClient
In this commit, we expose the JMX host and port from JMXClient to make it available
to implementations of the `ICassandraAdapter`.
This information can be valuable as different implementations and integrations need
to have this information available during the application execution.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-59
ab1884d2eedace79857489cb9dbe455ada9e4ad1 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-22 10:52:10-07:00
CASSANDRASC-58: Support retries in Sidecar Client on Invalid Checksum
In rare occasions an SSTable upload will receive a corrupted SSTable. Bit flips
are expected to occur occassionally while transmitting SSTables from client to
server.
This commit adds support for retries in Sidecar Client when a checksum mismatch
is encountered during SSTable upload. Allowing for clients to retry
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-58
40c3fac3891013457035fcfc4944b27535d5d701 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-21 11:08:37-07:00
CASSANDRASC-57: Remove RESTEasy
This commit removes RESTEasy and associated dependencies from the project. Vertx's handler
has been now preferred and there are no more endpoints on RESTEasy in this project.
patch byFrancisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-57
9912a620a0e67d9aa723037aaf5237598a895eb7 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-19 16:41:10-07:00
CASSANDRASC-56: Create staging directory if it doesn't exists
During SSTable upload, the upload will fail if the configured staging directory does not
exist. When this occurs an operator must manually create the directory, which increases
the configuration toil.
In this commit, we automatically create the staging directory if it doesn't exists during
SSTable upload. This improves the overall operational experience when running the Sidecar.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-56
2cc2eb5844e1f7ec54b2934589c2f4a6a3d226bc | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-14 11:50:45-07:00
CASSANDRASC-54 Add NOTICE.txt file
The NOTICE.txt file is currently missing in the repository. This commit adds the file to
comply with ASF's guidance.
patch byFrancisco Guerrero; reviewed by Dinesh Joshi, Michael Semb Wever for CASSANDRASC-54
3cbb3d19c6f043b3a20e4933e5ff7a0e3d58f0a9 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-06-12 09:34:45-07:00
CASSANDRASC-53 Ignore unknown properties during Sidecar client deserialization
This commit modifies the way the `DecodableRequest` handles unknown properties in the
JSON payload. To support the evolution of the server API, we allow the Sidecar Client
to be more flexible when it encounters unknown properties, and we make it ignore these
new properties.
patch by Francisco Guerrero; reviewed by Dinesh Joshi, Yifan Cai for CASSANDRASC-53
38cdacb2e7418e2aefbcffb1754dcd324c46028d | Author: Dinesh Joshi <djoshi@apache.org>
| 2023-05-19 15:34:05-07:00
CEP-28: Implement Bulk API endpoints and introduce the Sidecar Client to Support Cassandra Analytics
This commit implements the remaining endpoints needed to perform Bulk Analytics operations that allow
reading and writing data from Cassandra in Bulk. The new endpoints include:
- Endpoint to create snapshots
- Endpoint to clear a snapshot
- Endpoint to upload SSTable components
- Endpoint to clean up uploads for SSTable components
- Endpoint to import SSTable components
- Endpoint to retrieve gossip info
- Endpoint to retrieve the time skew for the server
- Endpoint to retrieve the ring information
Sidecar Client
Introduces the fully featured sidecar client to access Cassandra Sidecar endpoints.
It offers support for retries and Sidecar instance selection policies. The client
project itself is technology-agnostic, but we provide a vertx implementation for
the `HttpClient`. The Sidecar vertx-client can be published as a shaded-jar to be
consumed by clients where the dependencies can cause issues, especially in environments
where the dependencies are not always controlled by the consumers (for example Spark).
Patch by Doug, Francisco, Saranya, Yifan, Dinesh; reviewed by Dinesh Joshi and Yifan Cai for CASSANDRA-16222
Co-authored-by: Saranya Krishnakumar <saranya_k@apple.com>
Co-authored-by: Yifan Cai <ycai@apache.org>
Co-authored-by: Francisco Guerrero <francisco.guerrero@apple.com>
Co-authored-by: Doug Rohrer <drohrer@apple.com>
Co-authored-by: Dinesh Joshi <djoshi@apache.org>
5d2cbaf5cb810f53689bf227e2c1f78a9a2b2e9f | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2023-05-05 10:48:02-07:00
CASSANDRASC-50: Deprecate the sidecar cassandra health endpoint containing instance segment
This commit deprecates the Cassandra Health endpoint containing the instance segment
in the path. This endpoint is currently unused and it is replaced by the health
endpoint with the `instanceId` query string parameter. Since the `instanceId` is optional
we move the path param (mandatory) to the query param (optional).
This commit also moves the CassandraHealthService from jax RS to a vertx Handler.
It also moves the HealthService to a inlined handler, simplifying the service.
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-50
02cc6548f291528e9749a51d103463f9552f4b4e | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-11-02 12:54:54-07:00
CASSANDRASC-47: Introduce JMX foundation in Sidecar
In this commit, we introduce the JMX foundation in Sidecar to enable the ability to communicate
with the Cassandra process. This commit adds new configuration parameters to configure the
a `org.apache.cassandra.sidecar.common.JmxClient`. This client is available as part of the Cassandra
delegate.
A new interface is introduced and exposed through the `org.apache.cassandra.sidecar.common.ICassandraAdapter`.
The new interface `StorageOperations` is intended to interface with the Cassandra StorageService.
This commit provides an example implementation of the `takeSnapshot` method, which is also found
in the Cassandra code base. This should allow us to interact with the Cassandra process to create
snapshots.
A fix is required in the `CassandraSidecarDaemon` class, where the `healthCheck` runs the first time
only after the configured health check frequency (millis) has passed. This causes issues in the unit
tests as well as the actual execution of the service, as the `adapter` will be `null` until the first
health check is performed. To fix this issue, we perform a health check right after the server
successfully starts up.
Additional integration tests are added for testing the JMX integration with Cassandra. In the test,
we spin up a new Cassandra container using `testcontainers` and we perform validation against the
StorageService in Cassandra.
Co-authored-by: Doug Rohrer <drohrer@apple.com>
patch by Francisco Guerrero, Doug Rohrer; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-47
05c0bbe29f75d678596af09abb0c68d15e93f7ba | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-10-14 11:48:23-07:00
CASSANDRASC-46: Migrate minikube to testcontainers for integration tests
The existing Cassandra Sidecar integration testing suite uses Minikube to provision a
Cassandra service and it performs tests against the running database. This database runs
on Minikube.
A new alternative is to use [testcontainers](https://www.testcontainers.org), which requires
Docker to run tests. The concept is similar, but the benefit is that *testcontainers* is
well integrated into the java ecosystem and it works well with junit5. By replacing Minikube
with `testcontainers` we can simplify the setup process and reduce the complexity for running
integration tests.
Additionally, `testcontainers` is supported as part of the testing infrastructure inside
[CircleCI](https://www.testcontainers.org/supported_docker_environment/continuous_integration/circle_ci/).
Currently, our Minikube tests are broken both locally and in CircleCI. Moving to `testcontainers`
would also unblock us for further development.
Minor fix when running testcontainers
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-46
30c04eb38a796183643bdcbaff8f425d90ebf671 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-10-10 18:48:31-07:00
CASSANDRASC-45: Delegate methods to the RateLimiter
Sidecar offers a `SidecarRateLimiter` class that internally uses the
`com.google.common.util.concurrent.RateLimiter`. In this commit, we expose public methods
of the `RateLimiter` class using the delegate pattern. These methods will allow us to tweak
the settings of the `RateLimiter` that are available to us
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-45
5471b66c1e69e057bbbe75e4ffe67c1891cd9495 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-10-10 14:35:12-07:00
CASSANDRASC-44 Refactor health check to use vertx timer
Vertx API offers a periodic timer that integrates with it's internal thead pooling
mechanism. In this commit, we utilize vertx's periodic timer in favor of using a
`Executors.newSingleThreadScheduledExecutor()` on each delegate.
Another benefit of this approach is that if the cluster topology changes, i.e.
node replacement, cluster expansion / shrink, then the health checks will be performed
against the actual nodes in the cluster, assuming we receive an updated view of the
cluster when invoking the `Configuration#getInstancesConfig()#instances()` method.
We no longer need to worry about decommissioning the single thread executors running
on each delegate.
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-44
6e358acfce071cad16ac88c15dc2229bbb8a7944 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-10-07 16:39:12-07:00
CASSANDRASC-43 Add Schema API
This commit introduces the Schema API. Two new endpoints are added:
- /api/v1/schema/keyspaces
This endpoint returns the SchemaResponse with the full schema for all keyspaces.
- /api/v1/schema/keyspaces/:keyspace
This endpoint returns the SchemaResponse with the full schema for the requested keyspace.
patch by Francisco Guerrero; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-43
07deb07d2e57a32c67643385403980a9a3c3fc95 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-07-13 10:39:06-07:00
CASSANDRASC-40 Fix search in list snapshot endpoint
This commit fixes test setup in SnapshotUtils. Because of the incorrect test setup
the execution is providing incorrect results. For example, assume the following path
/cassandra-test/data/ks/tbl/snapshots/test-snapshot
The test was configuring data directories as ["/cassandra-test/data"], but in a real
execution data directories is provided as ["/cassandra-test"]. This is causing the
endpoint to return incorrect values in the JSON payload.
Additionally, the response was providing the port for Cassandra and not the Sidecar
port.
a7a2c29e990acb2363eb7a15cc4b970ebdc04753 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-07-08 17:09:35-07:00
CASSANDRAC-39: Allow Cassandra input validation to be configurable
It is sometimes desirable to allow configuring the Cassandra input validation in case
we want to further restrict the existing validations. In this commit, we introduce the
ability to inject the ValidationConfiguration. A default YamlValidationConfiguration is
provided and the sidecar.yaml is updated to reflect the existing default validation.
54abba8d7d870da5055bef79a51cf52fad980deb | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-06-29 09:10:28-07:00
CASSANDRASC-38 Add endpoint to list snapshot files
This commit adds two new endpoints to allow listing snapshot files.
The first endpoint takes a snapshot name as a path parameter, and searches for
all the snapshots matching the provided name. The result lists all the snapshot
files for all matching snapshots. Additionally, secondary index files can be
included in the response by providing the query param
`includeSecondaryIndexFiles=true`.
```
/api/v1/snapshots/:snapshot
```
The second endpoint takes a keyspace, table name, and snapshot name and searches
for a unique snapshot matching the provided snapshot name in the given keyspace
and table name. The results lists the snapshot files matching the given keyspace,
table name, and snapshot name. Similarly to the first endpoint, secondary index
files can be included in the response by providing the query param
`includeSecondaryIndexFiles=true`.
```
/api/v1/keyspace/:keyspace/table/:table/snapshots/:snapshot
```
24a08f22707901f7641e48f0c26e54b05c0e03c3 | Author: Saranya Krishnakumar <saranya_k@apple.com>
| 2022-06-27 10:47:26-07:00
Optimize file path builder and have separate handler for streaming file
patch by Francisco Guerrero, Saranya Krishnakumar; reviewed by Yifan Cai, Dinesh Joshi for CASSANDRASC-37
2e233ec579e4d2a23021116027d75e776e7ad9ec | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-04-27 10:24:00-07:00
CASSANDRASC-36: Support for ErrorHandler in Sidecar
This commit adds a default `ErrorHandler` to the `Route#failureHandler()`. The default implementation
for Sidecar is `ErrorHandlerImpl`.
Additionally, we allow for custom implementations of the `ErrorHandler` to be injected (via module
overrides). This allows downstream projects to provide custom implementations of the `ErrorHandler` to
fit the specific needs of the project.
Patch by Francisco Guerrero; Reviewed by Dinesh Joshi, Saranya Krishnakumar and Yifan Cai for CASSANDRASC-36
bc219cbf75bdbfdc7a95b3160ef17332c9274b44 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-03-29 12:09:06-07:00
Add the CONTRIBUTING.md doc with guidelines and best practices
The document delves into the contribution guidelines, source code best practices
and source code style.
7a5e710a2173e492907edc4094e052157a562103 | Author: Francisco Guerrero <francisco.guerrero@apple.com>
| 2022-03-11 15:43:24-08:00
CASSANDRASC-34: Allow for LoggerHandler to be injected
Currently, `vertxRouter` adds an instance of `LoggerHandler` to the top level route.
This is prescriptive and it doesn't allow for a different implementation of the LoggerHandler
to be injected.
In this commit, `LoggerHandler` is created in the `MainModule` as a singleton and then
injected in the `vertxRouter` method. This allows for a new implementation of the `LoggerHandler`
to be provided.