Skip to content

HDDS-8982. Prevent infinite loop in WritableRatisContainerProvider if pipeline's nodes are not found#5911

Merged
nandakumar131 merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-8982
Jan 5, 2024
Merged

HDDS-8982. Prevent infinite loop in WritableRatisContainerProvider if pipeline's nodes are not found#5911
nandakumar131 merged 1 commit intoapache:masterfrom
adoroszlai:HDDS-8982

Conversation

@adoroszlai
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Change WritableRatisContainerProvider.getContainer logic from:

  • infinite loop until container is found
    • look up open pipelines
    • select one pipeline
    • find matching container

to:

  • look up open pipelines
  • iterate pipelines until container is found
    • select one pipeline
    • find matching container

The original logic may keep finding the same pipeline until it is closed.

https://issues.apache.org/jira/browse/HDDS-8982

How was this patch tested?

Added unit and integration test.

CI:
https://github.com/adoroszlai/ozone/actions/runs/7391181618

@adoroszlai adoroszlai self-assigned this Jan 3, 2024
@adoroszlai adoroszlai marked this pull request as draft January 3, 2024 09:48
@adoroszlai adoroszlai marked this pull request as ready for review January 3, 2024 12:11
@adoroszlai adoroszlai requested a review from sodonnel January 3, 2024 18:46
@adoroszlai
Copy link
Copy Markdown
Contributor Author

@DaveTeng0 please take a look

Copy link
Copy Markdown
Contributor

@sodonnel sodonnel left a comment

Choose a reason for hiding this comment

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

This change LGTM.

@DaveTeng0
Copy link
Copy Markdown
Contributor

Thanks @adoroszlai ! The changes look good!

Copy link
Copy Markdown
Contributor

@nandakumar131 nandakumar131 left a comment

Choose a reason for hiding this comment

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

Thanks @adoroszlai for the fix. LGTM.

@nandakumar131 nandakumar131 merged commit 3f3deef into apache:master Jan 5, 2024
@adoroszlai adoroszlai deleted the HDDS-8982 branch January 5, 2024 08:47
@adoroszlai
Copy link
Copy Markdown
Contributor Author

Thanks @DaveTeng0, @nandakumar131, @sodonnel for the review.

xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
xichen01 pushed a commit to xichen01/ozone that referenced this pull request Jul 17, 2024
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.

4 participants