Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: some robustness improvements for Connect integration #3227

Merged
merged 2 commits into from
Aug 19, 2019

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Aug 16, 2019

Description

  • Retry behavior to DefaultConnectClient
  • Improved Logging
  • Better synchronization between ConnectConfigService and ConnectPollingService (one now triggers the other)

Testing done

Unit testing

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@agavra agavra requested a review from a team as a code owner August 16, 2019 23:15
@agavra agavra force-pushed the connect_robust branch 2 times, most recently from 696dec3 to 8766a6e Compare August 19, 2019 16:12
Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks @agavra -- having trouble understanding some of the changes. Questions inline. Thanks!

connectors.add(connector);
}

drainQueue();
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like I'm missing something, but what's the point of the logic above to poll one connector from the queue at a time and add them to connectors if we also drain the queue on each iteration?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm using poll as a blocking/notification mechanism, and there's no blocking drainTo method

.swallow("connectors", methodParams(), ConnectResponse.of(ImmutableList.of()))
.swallow("status", methodParams(String.class), ConnectResponse.of("sandbox"))
.swallow("create", methodParams(String.class, Map.class),
ConnectResponse.of("sandbox", HttpStatus.SC_INTERNAL_SERVER_ERROR))
Copy link
Contributor

Choose a reason for hiding this comment

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

What's the point of white-listing these methods if the sandboxed client has them return errors?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's well handled instead of throwing exceptions - i.e. the code doesn't expect "UnsupportedOperationException" it expects some kind of meaningful error response. I don't think it's necessary, but just a little nicer down the line. If you feel strongly that we shouldn't be doing this I can revisit it in another PR.

@vcrfxia vcrfxia requested a review from a team August 19, 2019 18:39
Copy link
Contributor

@vcrfxia vcrfxia left a comment

Choose a reason for hiding this comment

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

Thanks for the patient explanations, @agavra ! Very cool changes :)

@vcrfxia vcrfxia requested a review from a team August 19, 2019 20:13
@agavra agavra merged commit bc1a2f8 into confluentinc:master Aug 19, 2019
@agavra agavra deleted the connect_robust branch August 19, 2019 20:42
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.

2 participants