Skip to content

MINIFICPP-996 - Output port keeps printing info message implying tran…#620

Closed
arpadboda wants to merge 2 commits intoapache:masterfrom
arpadboda:MINIFICPP-996
Closed

MINIFICPP-996 - Output port keeps printing info message implying tran…#620
arpadboda wants to merge 2 commits intoapache:masterfrom
arpadboda:MINIFICPP-996

Conversation

@arpadboda
Copy link
Contributor

…smission

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

logger_->log_debug("Closing %s", ((io::HttpStream*) peer_->getStream())->getClientRef()->getURL());
if (client->getResponseCode() == 201) {
uint64_t client_response = client->getResponseCode();
if (direction == RECEIVE && client_response == 200) {
Copy link
Contributor Author

@arpadboda arpadboda Aug 12, 2019

Choose a reason for hiding this comment

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

This case cannot occur at the moment as NiFi handles this improperly.
When fixed and tested in scope of apache/nifi#3647 I found that we throw exception and execute rollback in case 200 is received, even though it's a valid case, 200 is not an error.
Transaction being null is for error cases, so this function now creates a dummy transaction, which then gets removed and the happy path is executed. (transfer was successful)

@arpadboda arpadboda requested a review from phrocker August 12, 2019 16:11
Copy link
Contributor

@bakaid bakaid left a comment

Choose a reason for hiding this comment

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

Generally looks good. If the protocol headers sent only contain the maximum supported protocol version, then it's ok (otherwise we would lose compatibility with older NiFis).
As far as I see we don't actually use the negotiated protocol version, we ensure compatibility with both versions at the same time. This is a good solution for now, but in the future there might be a need for knowing the exact version.
AppVeyor build is failed because of a timeout, so please rebase this to master and let's hope it builds now.
Also, I am not sure whether we have working S2S tests on Windows now, if not, a Windows manual test would be warranted.

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