Repository navigation
M7, ports part 3: the Stream consumer - #50
Merged
Merged
Conversation
Java V5's tests of the Stream consumer that had no Rust counterpart, ported (PLAN.md, M7; tests/PORTING.md follows in its own PR): a cumulative ack made while disconnected going first on the next subscription, members splitting the segments, a member back under its name taking the same keys again, keys keeping their order across an empty segment and as a member joins mid-traffic, a segment moving once what was taken from it is acknowledged, a member joining after another left, a consumer at latest, a missing topic created or not found, a refused lookup, a broker without scalable topics, and following the controller the layout names across brokers. Only test code changes. follows_the_controller_while_a_producer_holds_the_layout_watch is the same controller failover with a producer of the topic on the client. It fails, so it is ignored with the reason: registering again takes the controller from the layout watch the producer holds, which names the old one. A fix follows in its own PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Java V5 tests of the Stream consumer, ported (
PLAN.md, M7:tests/PORTING.mdshows the Java scenarios in scope covered; that file follows in its own PR). Only test code changes.V5CumulativeAckTest.testRetryingAnAckIssuedWhileDisconnectedAdvancesTheCursorconsumer.rs::a_cumulative_ack_made_while_disconnected_goes_first_on_the_next_subscriptionV5MultipleConsumersTest.testStreamConsumersSplitSegmentsAcrossConsumers, andV5MultiBrokerScalableTopicTest.testStreamConsumerControllerCoordinationAcrossBrokerson one brokerstream_consumer.rs::members_split_the_segments_and_each_message_goes_to_oneV5MultipleConsumersTest.testStreamConsumerReconnectWithinGraceKeepsAssignmentstream_consumer.rs::a_member_back_under_its_name_takes_the_same_keys_againV5StreamConsumerOrderingTest.testPerKeyOrderAcrossAnEmptySegmentstream_consumer.rs::keys_keep_their_order_across_an_empty_segment(besidean_empty_segment_does_not_let_its_children_ahead_of_its_parent, which joins after the splits)V5EntryBucketDispatchTest.testConsumerJoiningMidTrafficPreservesPerKeyOrderstream_consumer.rs::a_member_joining_mid_traffic_keeps_each_key_in_orderV5EntryBucketDispatchTest.testSegmentReleaseWithPendingAcksHandsOffCleanlystream_consumer.rs::a_segment_moves_once_what_was_taken_from_it_is_acknowledgedV5EntryBucketDispatchTest.testConsumerRejoiningAfterLeaveDoesNotWedgeReleasestream_consumer.rs::members_beyond_the_segments_share_them_by_bucket(extended: a third member joins after the second left)V5SubscriptionInitialPositionTest.testStreamConsumerLatestSkipsPriorMessagesstream_tests.rs::a_consumer_at_latest_skips_what_was_stored_beforeV5ScalableTopicAutoCreateTest.testStreamConsumerAutoCreatesScalableTopic, and the Stream consumer's part oftestNoAutoCreateWhenNamespaceDisallowsstream_tests.rs::a_missing_topic_is_created_or_not_foundV5AuthErrorTest.testLookupNotAuthorized(Stream consumer)stream_tests.rs::a_refused_lookup_fails_the_subscribestream_tests.rs::a_broker_without_scalable_topics_is_refusedV5MultiBrokerControllerFailoverTest(the client's side),ClientSegmentLayoutTest.testControllerBrokerUrlPropagated(driver)stream_tests.rs::follows_the_controller_the_layout_names_across_brokers: three simulated brokers, the layout naming the controller on one, then on another once the first drops its connectionsA bug, pinned by an ignored test
stream_tests.rs::follows_the_controller_while_a_producer_holds_the_layout_watchis the same failover with a producer of the topic on the client, as in Java'stestStreamConsumerFollowsControllerLeaderShutdown. It fails, so it is#[ignore]d with the reason: the consumer registers again with the old controller.stream_task::controller()reads the controller from the topic's layout watch, which it shares with the producer.From the code, a grouped Checkpoint member holds the watch itself, so it would keep the old controller even alone. A fix follows in its own PR, which removes the
#[ignore].Not ported
testStreamConsumerFollowsControllerLeaderShutdown: the simulated controllers would need one cluster behind several listeners.layout.rs.Testing
cargo fmt;clippy -D warningswith Rust 1.100. No library code changes.