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

GEODE-8302: Fixed 'events not queued conflated' stats when group-tran… #5313

Merged
merged 7 commits into from Jul 10, 2020

Conversation

albertogpz
Copy link
Contributor

…saction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

Thank you for submitting a contribution to Apache Geode.

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?

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

  • Is your initial contribution a single, squashed commit?

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?

Note:

Please ensure that once the PR is submitted, check Concourse for build issues and
submit an update to your PR as soon as possible. If you need help, please send an
email to dev@geode.apache.org.

…saction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.
@DonalEvans
Copy link
Contributor

DonalEvans commented Jun 26, 2020

When the attached diff is applied, the modified test testPartitionedSerialPropagationHA() also fails with incorrectly conflated events. Since this test does not set groupTransactionEvents to true, it seems like there is more to this issue.
diff.txt

Copy link
Contributor

@DonalEvans DonalEvans left a comment

Choose a reason for hiding this comment

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

Some additional description should also be added to the javadoc for the GatewaySenderFactory interface to state the incompatibility between the setGroupTransactionEvents() and setBatchConflationEnabled() settings. Other than that, this looks good to me.

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.
Copy link
Contributor

@davebarnes97 davebarnes97 left a comment

Choose a reason for hiding this comment

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

@albertogpz Good material - thanks for writing the docs for this feature.
I have some edits for clarification and consistency, in both user guide files and the javadoc comments in class files. I will send these to you in email for you to incorporate as you see fit. Thanks!

@albertogpz
Copy link
Contributor Author

@albertogpz Good material - thanks for writing the docs for this feature.
I have some edits for clarification and consistency, in both user guide files and the javadoc comments in class files. I will send these to you in email for you to incorporate as you see fit. Thanks!

Thanks for the review, Dave. I have accepted all your proposals with the exception of the javadoc on GatewaySenderQueue.java which had not ended up describing correctly the peekedIdsWithoutExtra member variable. I changed it to a simpler sentence. Let me know if you are ok with the change.

@albertogpz
Copy link
Contributor Author

In the last commit I reverted most of the code added in the second 4ff9b1d and just added a simpler fix.
The comment from @davebarnes97 about the javadoc in GatewaySenderQueue.java would not apply anymore as that javadoc would not change.

Copy link
Contributor

@davebarnes97 davebarnes97 left a comment

Choose a reason for hiding this comment

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

Thank you for incorporating my previous suggestions. Just two more items:

In geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb:
Please change "gatewaysenders" to "gateway senders".

In CreateGatewaySenderCommand.java and four other files, please reword the error message

"GatewaySender %s cannot be created with group transaction events set to true and batch conflation enabled"

to clarify that the two properties are mutually exclusive. Suggestion, add "both":

"GatewaySender %s cannot be created with both group transaction events set to true and batch conflation enabled"

@albertogpz
Copy link
Contributor Author

Thank you for incorporating my previous suggestions. Just two more items:

In geode-docs/tools_modules/gfsh/command-pages/create.html.md.erb:
Please change "gatewaysenders" to "gateway senders".

In CreateGatewaySenderCommand.java and four other files, please reword the error message

"GatewaySender %s cannot be created with group transaction events set to true and batch conflation enabled"

to clarify that the two properties are mutually exclusive. Suggestion, add "both":

"GatewaySender %s cannot be created with both group transaction events set to true and batch conflation enabled"

Thanks for the comments, Dave.
Changes done on the erb file and on four java files. I hope you meant four files counting with CreateGatewaySenderCommand.java. I could not find the string in a fifth file.

@DonalEvans
Copy link
Contributor

DonalEvans commented Jul 2, 2020

It appears that the failing StressNewTest seen in this PR is caused by https://issues.apache.org/jira/browse/GEODE-8320 and has not been introduced by these changes, so with a clean pre-checkin, this should be okay to merge, although ideally, it would be better to fix the underlying issue and then allow the StressNewTest to pass 100% of the time before merging this.

@albertogpz
Copy link
Contributor Author

It appears that the failing StressNewTest seen in this PR is caused by https://issues.apache.org/jira/browse/GEODE-8320 and has not been introduced by these changes, so with a clean pre-checkin, this should be okay to merge, although ideally, it would be better to fix the underlying issue and then allow the StressNewTest to pass 100% of the time before merging this.

I'd rather have this PR merged first because fixing the flaky test case will probably take longer and I plan to do it on top of this solution.

@davebarnes97 davebarnes97 removed the request for review from karensmolermiller July 6, 2020 18:31
@nabarunnag
Copy link
Contributor

nabarunnag commented Jul 8, 2020

Hi Alberto, I would suggest splitting up the commit for GEODE-8320 fix separate from GEODE-8302.
You can still work on multiple commits for GEODE-8320

  • This helps to maintain clear records in the release notes for releases.
  • In case we have to revert the fix for GEODE-8320 we don't have to also revert the fix for GEODE-8302 and vice versa, as these two fixes are clubbed together

@albertogpz
Copy link
Contributor Author

Hi Alberto, I would suggest splitting up the commit for GEODE-8320 fix separate from GEODE-8302.
You can still work on multiple commits for GEODE-8320

* This helps to maintain clear records in the release notes for releases.

* In case we have to revert the fix for GEODE-8320 we don't have to also revert the fix for GEODE-8302 and vice versa, as these two fixes are clubbed together

Hi Naba. What you are proposing makes a lot of sense. Nevertheless, in this case, I do not know if it is worth it as the solution for both tickets is shared, i.e., the solution for GEODE-8320 is a subset of the solution for GEODE-8302.
If I split the solution into two PRs I would have to repeat the solution on both PRs, have it reviewed twice, do changes if needed on both...
Do you still think I should do it like that or could we just have the PR for GEODE-8302 solve both GEODE-8302 and GEODE-8320?

@alb3rtobr
Copy link
Contributor

@nabarunnag I agree that is not recommended to include more than one ticket solution in the same commit, but in this case one ticket is a subset of the other one. Luckily Alberto has solved the bigger one, that as a side effect solves the other. Or even you can think that it is invalidating the other one, as it cannot be reproduced after merging GEODE-8302.

Anyway independently of the decision taken, GEODE-8302 can be merged into develop if there is no other problem with the review. Then Alberto could prepare a separate PR with the code of GEODE-8320 that will result on an empty commit in develop because the code is already there.

@albertogpz
Copy link
Contributor Author

It appears that the failing StressNewTest seen in this PR is caused by https://issues.apache.org/jira/browse/GEODE-8320 and has not been introduced by these changes, so with a clean pre-checkin, this should be okay to merge, although ideally, it would be better to fix the underlying issue and then allow the StressNewTest to pass 100% of the time before merging this.

I'd rather have this PR merged first because fixing the flaky test case will probably take longer and I plan to do it on top of this solution.

@DonalEvans Could you please review my latest commit? It was targeted at fixing a failing test case that was actually not the same as the one in GEODE-8320 but this last commit fixes the problem in both test cases.

@mkevo
Copy link
Contributor

mkevo commented Jul 10, 2020

As it has two approvals I will merge it. Thank you all!

@mkevo mkevo merged commit 8c35d9c into apache:develop Jul 10, 2020
@mkevo mkevo deleted the feature/GEODE-8302 branch July 13, 2020 09:47
albertogpz added a commit to Nordix/geode that referenced this pull request Aug 10, 2020
apache#5313)

This is a fix on top of GEODE-7971 for a problem with serial gateway senders
using the group-transaction-events which could lead in very unlikely situations
to not replicate some events.

* GEODE-8302: Fixed 'events not queued conflated' stats when group-transaction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

* GEODE-8302: Add extra checks in propagation with HA tests and add fix in conflation stats

* GEODE-8302: Update GatewaySenderFactory javadoc

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.

* GEODE-8302: Doc changes after review

* GEODE-8302: Fix for failing testReplicatedSerialPropagationHAWithGroupTransactionEvents

* GEODE-8302: doc and error messages changes after review

* GEODE-8302: Fix failing test case and possibly fix GEODE-8320
mkevo pushed a commit to Nordix/geode that referenced this pull request Sep 21, 2020
apache#5313)

* GEODE-8302: Fixed 'events not queued conflated' stats when group-transaction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

* GEODE-8302: Add extra checks in propagation with HA tests and add fix in conflation stats

* GEODE-8302: Update GatewaySenderFactory javadoc

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.

* GEODE-8302: Doc changes after review

* GEODE-8302: Fix for failing testReplicatedSerialPropagationHAWithGroupTransactionEvents

* GEODE-8302: doc and error messages changes after review

* GEODE-8302: Fix failing test case and possibly fix GEODE-8320
mkevo pushed a commit to Nordix/geode that referenced this pull request Oct 25, 2020
apache#5313)

* GEODE-8302: Fixed 'events not queued conflated' stats when group-transaction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

* GEODE-8302: Add extra checks in propagation with HA tests and add fix in conflation stats

* GEODE-8302: Update GatewaySenderFactory javadoc

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.

* GEODE-8302: Doc changes after review

* GEODE-8302: Fix for failing testReplicatedSerialPropagationHAWithGroupTransactionEvents

* GEODE-8302: doc and error messages changes after review

* GEODE-8302: Fix failing test case and possibly fix GEODE-8320
alb3rtobr pushed a commit to Nordix/geode that referenced this pull request Jul 30, 2021
apache#5313)

* GEODE-8302: Fixed 'events not queued conflated' stats when group-transaction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

* GEODE-8302: Add extra checks in propagation with HA tests and add fix in conflation stats

* GEODE-8302: Update GatewaySenderFactory javadoc

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.

* GEODE-8302: Doc changes after review

* GEODE-8302: Fix for failing testReplicatedSerialPropagationHAWithGroupTransactionEvents

* GEODE-8302: doc and error messages changes after review

* GEODE-8302: Fix failing test case and possibly fix GEODE-8320
alb3rtobr pushed a commit to Nordix/geode that referenced this pull request Aug 4, 2021
apache#5313)

* GEODE-8302: Fixed 'events not queued conflated' stats when group-transaction-events is true

Batch conflation is not compatible with group-transaction-events.
It must be prevented that both are enabled at the same time for
a given gateway sender.

* GEODE-8302: Add extra checks in propagation with HA tests and add fix in conflation stats

* GEODE-8302: Update GatewaySenderFactory javadoc

Added information about incompatibility between
group-transaction-events and enable-batch-conflation.

* GEODE-8302: Doc changes after review

* GEODE-8302: Fix for failing testReplicatedSerialPropagationHAWithGroupTransactionEvents

* GEODE-8302: doc and error messages changes after review

* GEODE-8302: Fix failing test case and possibly fix GEODE-8320
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants