Commit Graph

160 Commits

Author SHA1 Message Date
David Ansari 4d7403cb62 Delete rabbit_stream_SUITE setup steps
since these feature flags became required in 3.12.
2023-02-15 17:01:59 +00:00
David Ansari 5045fce6de Require all feature flags introduced before 3.11.1
RabbitMQ 3.12 requires feature flag `feature_flags_v2` which got
introduced in 3.11.0 (see
https://github.com/rabbitmq/rabbitmq-server/pull/6810).

Therefore, we can mark all feature flags that got introduced in 3.11.0
or before 3.11.0 as required because users will have to upgrade to
3.11.x first, before upgrading to 3.12.x

The advantage of marking these feature flags as required is that we can
start deleting any compatibliy code for these feature flags, similarly
as done in https://github.com/rabbitmq/rabbitmq-server/issues/5215

This list shows when a given feature flag was first introduced:

```
classic_mirrored_queue_version 3.11.0
stream_single_active_consumer 3.11.0
direct_exchange_routing_v2 3.11.0
listener_records_in_ets 3.11.0
tracking_records_in_ets 3.11.0

empty_basic_get_metric 3.8.10
drop_unroutable_metric 3.8.10
```

In this commit, we also force all required feature flags in Erlang
application `rabbit` to be enabled in mixed version cluster testing
and delete any tests that were about a feature flag starting as disabled.

Furthermore, this commit already deletes the callback (migration) functions
given they do not run anymore in 3.12.x.

All other clean up (i.e. branching depending on whether a feature flag
is enabled) will be done in separate commits.
2023-02-08 16:00:03 +00:00
Arnaud Cogoluègnes 3fea81a7ee
Remove console output 2023-01-04 15:56:49 +01:00
Arnaud Cogoluègnes d2443b5f49
Filter out nodes in maintenance in stream metadata
We don't want clients to try to connect to those.

Fixes #3370
2023-01-04 15:54:20 +01:00
Arnaud Cogoluègnes 79990e8eae
Format stream plugin code 2023-01-04 10:47:16 +01:00
Michael Klishin ec4f1dba7d
(c) year bump: 2022 => 2023 2023-01-01 23:17:36 -05:00
Arnaud Cogoluègnes c1ab6b42d4
Use assertMatch instead of assertEqual in test
Make test less fragile.
2022-11-17 15:52:01 +01:00
Karl Nilsson e4921503db Streams: close osiris log on unsubscribe
To ensure we clean up any log resources such as counter records.
2022-11-03 16:54:31 +00:00
Luke Bakken 7fe159edef
Yolo-replace format strings
Replaces `~s` and `~p` with their unicode-friendly counterparts.

```
git ls-files *.erl | xargs sed -i.ORIG -e s/~s>/~ts/g -e s/~p>/~tp/g
```
2022-10-10 10:32:03 +04:00
Arnaud Cogoluègnes fa528115b1
Bump dependencies in stream Java test 2022-08-10 09:56:58 +02:00
Michael Klishin 68969faf94
Streams: adapt tests to the latest Java stream client listener interface 2022-08-10 11:43:44 +04:00
Arnaud Cogoluègnes 93c33f2423
Rename StreamInfo to StreamStats
Other changes: returns a map of int64, use the new osiris:get_stats/1 API.

References #5412
2022-08-08 18:02:51 +02:00
Arnaud Cogoluègnes 8687e73c7e
Add StreamInfo command to stream protocol
It returns general information on a stream, the first
and committed offsets for now.

Fixes #5412
2022-08-03 14:38:45 +02:00
Jean-Sébastien Pédron 6e9ee4d0da
Remove test code which depended on the `quorum_queue` feature flags
These checks are now irrelevant as the feature flag is required.
2022-08-01 12:41:30 +02:00
Jean-Sébastien Pédron 776b4323bd
Remove test code which depended on the `virtual_host_metadata` feature flags
These checks are now irrelevant as the feature flag is required.
2022-08-01 11:56:53 +02:00
David Ansari 32e118fada Remove test code which depended on feature flag implicit_default_bindings
The feature flag is required.

References #5215.
2022-07-29 15:03:26 +00:00
Jean-Sébastien Pédron 5b98d7d2a2
Remove test code which depended on the `maintenance_mode_status` feature flags
These checks are now irrelevant as the feature flag is required.
2022-07-29 11:51:52 +02:00
Jean-Sébastien Pédron 32049cd256
Remove test code which depended on the `user_limits` feature flags
These checks are now irrelevant as the feature flag is required.
2022-07-29 11:04:48 +02:00
Arnaud Cogoluègnes 95f3fdef19
Use "committed offset" instead of "last committed offset"
References #5307
2022-07-26 11:37:46 +02:00
Arnaud Cogoluègnes 9795727b9f
Include last committed offset in "deliver" stream command
Fixes #5307
2022-07-25 16:15:04 +02:00
Arnaud Cogoluègnes 67aac95f3e
Add exchange command versions command to stream plugin
References #5308
2022-07-25 16:15:03 +02:00
Arnaud Cogoluègnes e44b65957d
Limit stream max segment size to 3 GB
Values too large can overflow the stream position field
in the index (32 bit int).
2022-06-10 11:45:57 +02:00
Arnaud Cogoluègnes 0806fa0b2f
Add stream single active consumer feature flag
Block stream SAC functions if the feature flag is not enabled.

References #3753
2022-05-09 10:52:32 +02:00
Arnaud Cogoluègnes 0623192130
Handle "active" field for stream consumers
In the regular metrics ETS table, not the one from streams.

References #3753
2022-05-09 10:52:31 +02:00
Arnaud Cogoluègnes 5ad9e349e0
Add list_stream_group_consumers CLI command
References #3753
2022-05-09 10:52:31 +02:00
Arnaud Cogoluègnes 434d7b5c54
Add colums argument to list_stream_consumer_groups
References #3753
2022-05-09 10:52:30 +02:00
Arnaud Cogoluègnes 1ec49a7aa3
Add list_stream_consumer_groups CLI command
References #3753
2022-05-09 10:52:29 +02:00
Arnaud Cogoluègnes eeefd7c860
Monitor connection PIDs in stream SAC coordinator
References #3753
2022-05-09 10:52:27 +02:00
Arnaud Cogoluègnes d98b10f78d
Compute stream partition index
References #3753
2022-05-09 10:52:21 +02:00
Michael Klishin 7c47d0925a
Revert "Correct a double quote introduced in #4603"
This reverts commit 6a44e0e2ef.

That wiped a lot of files unintentionally
2022-04-20 16:05:56 +04:00
Michael Klishin 6a44e0e2ef
Correct a double quote introduced in #4603 2022-04-20 16:01:29 +04:00
Arnaud Cogoluègnes a9cc401e3c
Bump Java test suites dependencies for stream plugins 2022-04-01 16:42:32 +02:00
Michael Klishin c38a3d697d
Bump (c) year 2022-03-21 01:21:56 +04:00
Arnaud Cogoluègnes 96c9270fb3
Bump dependencies in streams Java tests 2022-01-17 16:13:29 +01:00
Arnaud Cogoluègnes 1bcca0745e
Increase timeout in stream test
Some CI environment may need a bit more time.
2021-12-10 12:08:02 +01:00
Arnaud Cogoluègnes 4c397c54fa
Use AssertJ conditions in Java stream test suite 2021-12-10 11:52:54 +01:00
Arnaud Cogoluègnes bd4771addb
Return appropriate response when stream leader not available
Fixes #3874
2021-12-10 10:58:48 +01:00
Arnaud Cogoluègnes 8f40e534ed
Bump Java test dependencies in stream test suites 2021-12-10 09:18:22 +01:00
Arnaud Cogoluègnes 17d0ba9317
Return "no offset" (19) code when stored offset is undefined
Fixes #3783
2021-12-01 17:59:14 +01:00
Philip Kuryloski e4505bea3d Use unique group names in rabbit_stream_SUITE
Technically duplicate names is supported by common test, but we have
seen it contribute to flakiness in our suite in practice

(cherry picked from commit 513446b6d1)
2021-11-09 13:52:41 +01:00
Arnaud Cogoluègnes ba5cfb1bae
Use version range for stream client Maven dependency
In test suite. Note a snapshot for 1.0-SNAPSHOT has been
pushed by mistake a while ago, so this one must be
excluded. It's unlikely it will be erased, as the snapshots
for the first stable version should be 1.0.0-SNAPSHOT.
2021-11-03 14:05:23 +01:00
Arnaud Cogoluègnes c0f1e23b17
Disable stream test in mixed versions mode
Not worth testing in this mode, as the stream plugin
does not start without the stream_queue feature flag.
2021-10-20 15:16:45 +02:00
Arnaud Cogoluègnes 030a08fa54
Enable stream_queue flag with env variable in test suite
For mixed version mode, where feature flags are
not explictely enabled.
2021-10-20 15:08:05 +02:00
Arnaud Cogoluègnes d87fa91a52
Enable stream_queue flag in test suite
For mixed version mode, where feature flags are
not explictely enabled.
2021-10-20 14:55:54 +02:00
Arnaud Cogoluègnes 6b9589bae4
Handle stream arguments in add_super_stream command
max-age, leader-locator, etc.
2021-10-11 16:50:03 +02:00
Arnaud Cogoluègnes ecbd969834
Embed RPC call function in test 2021-10-11 16:50:02 +02:00
Arnaud Cogoluègnes 8ae60bef73
Fix group spec in test 2021-10-11 16:50:02 +02:00
Arnaud Cogoluègnes b0bd5f8a00
Add delete_super_stream CLI command 2021-10-11 16:50:02 +02:00
Arnaud Cogoluègnes a73b1a3d0d
Add add_super_stream CLI command 2021-10-11 16:50:01 +02:00
Arnaud Cogoluègnes 147659093f
Add functions to create/delete super stream in manager 2021-10-11 16:50:01 +02:00