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

handle unexpected exception on success callback of translog upload #12577

Merged

Conversation

linuxpi
Copy link
Collaborator

@linuxpi linuxpi commented Mar 11, 2024

Description

  • Translog upload success callback can throw unexpected exceptions.
  • Since we are using ActionListener.wrap, we catch all exceptions in onSuccess and call the onFailure callback
  • Currently, on failure callback only accepts FileTransferException.
  • if the exception is any other, we throw a ClassCastException and swallow the original exception trace.
  • To be able to log the exceptions occurring in onSuccess callbacks, we wrap those exception as FileTransferException

Related Issues

#12544

Check List

  • [ ] New functionality includes testing.
    • [ ] All tests pass
  • [ ] New functionality has been documented.
    • [ ] New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • [ ] Public documentation issue/PR created

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

github-actions bot commented Mar 11, 2024

Compatibility status:

Checks if related components are compatible with change f511475

Incompatible components

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/flow-framework.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/k-nn.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/performance-analyzer-rca.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/performance-analyzer.git]

Copy link
Contributor

❕ Gradle check result for da709a6: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testIndexReopenClose
      1 org.opensearch.cluster.MinimumClusterManagerNodesIT.testThreeNodesNoClusterManagerBlock

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

Copy link

codecov bot commented Mar 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.43%. Comparing base (2b17902) to head (f511475).
Report is 29 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #12577   +/-   ##
=========================================
  Coverage     71.43%   71.43%           
+ Complexity    59960    59948   -12     
=========================================
  Files          4984     4984           
  Lines        282247   282251    +4     
  Branches      40952    40952           
=========================================
+ Hits         201617   201635   +18     
+ Misses        63954    63864   -90     
- Partials      16676    16752   +76     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

✅ Gradle check result for dde1609: SUCCESS

@sachinpkale
Copy link
Member

Changes LGTM. Can we please add UTs for the change?

@kkmr
Copy link
Contributor

kkmr commented Mar 12, 2024

Like @sachinpkale mentioned, please add unit tests.

@linuxpi linuxpi requested a review from nknize as a code owner March 14, 2024 08:59
Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

❌ Gradle check result for 1710cfd: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 85bb7fb: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 1406e16: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

❌ Gradle check result for 87ede1b: TIMEOUT

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Copy link
Contributor

✅ Gradle check result for f511475: SUCCESS

@sachinpkale sachinpkale merged commit 4a0feee into opensearch-project:main Mar 15, 2024
30 checks passed
@sachinpkale sachinpkale added the backport 2.x Backport to 2.x branch label Mar 15, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Mar 15, 2024
…12577)

* handle unexpected exception on success callback of translog upload

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
(cherry picked from commit 4a0feee)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@linuxpi linuxpi deleted the translog-success-exception branch March 15, 2024 06:37
sachinpkale pushed a commit that referenced this pull request Mar 15, 2024
…12577) (#12684)

* handle unexpected exception on success callback of translog upload


(cherry picked from commit 4a0feee)

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…pensearch-project#12577)

* handle unexpected exception on success callback of translog upload

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
ruai0511 pushed a commit to ruai0511/OpenSearch that referenced this pull request Mar 19, 2024
…pensearch-project#12577)

* handle unexpected exception on success callback of translog upload

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…pensearch-project#12577)

* handle unexpected exception on success callback of translog upload

Signed-off-by: Varun Bansal <bansvaru@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants