Skip to content

Pipe: enhance the idempotence of start / stop pipe #11713

Merged
SteveYurongSu merged 9 commits intoapache:masterfrom
VGalaxies:pipe-idempotence
Dec 16, 2023
Merged

Pipe: enhance the idempotence of start / stop pipe #11713
SteveYurongSu merged 9 commits intoapache:masterfrom
VGalaxies:pipe-idempotence

Conversation

@VGalaxies
Copy link
Contributor

@VGalaxies VGalaxies commented Dec 13, 2023

Description

As title. This PR is a follow-up to #11690, from now onwards, no-op start pipe and stop pipe will directly skip the entire procedure execution, avoiding the impact of rollback and other exceptional situations. At the same time, the procedure result is set to facilitate differentiation on CN side for identifying no-op start pipe and stop pipe.

It is important to note that when starting a RUNNING pipe or stopping a STOPPED pipe, we need to consider the isStoppedByRuntimeException status of the pipe. Otherwise, certain procedures might be mistakenly skipped.

TODO:

  • IT
  • transfer no-op msg to client side

This PR has:

  • been self-reviewed.
    • concurrent read
    • concurrent write
    • concurrent read and write
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods.
  • added or updated version, license, or notice information
  • added comments explaining the "why" and the intent of the code wherever would not be obvious
    for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold
    for code coverage.
  • added integration tests.
  • been tested in a test IoTDB cluster.

Key changed/added classes (or packages if there are too many classes) in this PR

@SteveYurongSu SteveYurongSu self-requested a review December 13, 2023 17:11
@SteveYurongSu SteveYurongSu self-assigned this Dec 13, 2023
@VGalaxies VGalaxies changed the title Pipe: enhance pipe cmd idempotence & allow to create existed pipe & allow to drop non-existed pipe Pipe: enhance pipe command idempotence Dec 14, 2023
@VGalaxies VGalaxies changed the title Pipe: enhance pipe command idempotence Pipe: enhance the idempotence of start / stop pipe Dec 14, 2023
Copy link
Member

@SteveYurongSu SteveYurongSu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SteveYurongSu SteveYurongSu merged commit ef6dc0a into apache:master Dec 16, 2023
@VGalaxies VGalaxies deleted the pipe-idempotence branch December 18, 2023 08:34
SzyWilliam pushed a commit to SzyWilliam/iotdb that referenced this pull request Nov 26, 2024
As title. This commit is a follow-up to apache#11690, from now onwards, no-op start pipe and stop pipe will directly skip the entire procedure execution, avoiding the impact of rollback and other exceptional situations. At the same time, the procedure result is set to facilitate differentiation on CN side for identifying no-op start pipe and stop pipe.

It is important to note that when starting a RUNNING pipe or stopping a STOPPED pipe, we need to consider the `isStoppedByRuntimeException` status of the pipe. Otherwise, certain procedures might be mistakenly skipped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants