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

Fixed possible NullPointerException issue if health-check flow kick… #36397

Merged
merged 29 commits into from
Aug 21, 2023

Conversation

jeet1995
Copy link
Member

In certain cases, if the channel health check flow kicks in before RNTBD context negotiation, the trying to obtain the RNTBD context in the health check flow can cause NullPointerExceptions to be thrown. This PR fixes such an issue to guarantee it to happen only after the channel has seen some requests allocated to it.

…s in before RNTBD context negotiation for a given channel.
@jeet1995
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azure-sdk
Copy link
Collaborator

API change check

API changes are not detected in this pull request.

@jeet1995
Copy link
Member Author

/azp run java - cosmos - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jeet1995
Copy link
Member Author

All live tests were passing for the commit - d621e47

@jeet1995 jeet1995 merged commit 4f998c8 into Azure:main Aug 21, 2023
28 checks passed
FabianMeiswinkel pushed a commit to FabianMeiswinkel/azure-sdk-for-java that referenced this pull request Aug 24, 2023
Azure#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>
FabianMeiswinkel added a commit that referenced this pull request Aug 24, 2023
* Fixed possible `NullPointerException` issue if health-check flow kick… (#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

* Update CHANGELOG.md

---------

Co-authored-by: Abhijeet Mohanty <abhmohanty@microsoft.com>
Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>
kushagraThapar added a commit that referenced this pull request Sep 2, 2023
* Updated read hang grace and cancellation count threshold (#36280)

* Updated read hang grace and cancellation count threshold

* Updated CHANGELOG.md

* Updated CHANGELOG.md

* Updated CHANGELOG.md

* Updated release versions to 4.48.1 for azure-cosmos (#36291)

* Updated release versions to 4.48.1 for azure-cosmos

* Updated release notes

* Increment package versions for cosmos releases (#36301)

* Port PR 36397 to the 4.48.2 hotfix branch (#36504)

* Fixed possible `NullPointerException` issue if health-check flow kick… (#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

* Update CHANGELOG.md

---------

Co-authored-by: Abhijeet Mohanty <abhmohanty@microsoft.com>
Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

* Sdk fixes (#36426)

* Added the multi-region test pipeline.

* Fixed possible `NullPointerException`s.

* Updated CHANGELOG.md.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

* Handle negative e2e timeout gracefully (#36535)

* Cherry picked commit from main PR

* Fixed changelog

---------

Co-authored-by: Fabian Meiswinkel <fabianm@microsoft.com>

* Updated release version to 4.48.2 for azure-cosmos hotfix (#36542)

* Increment package versions for cosmos releases (#36544)

* Fixed CHANGELOG.md.

* Attempt a fixing faulty merge conflict.

* Attempt a fixing faulty merge conflict.

* Updated min recommended version.

* Updated min recommended version.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: Fabian Meiswinkel <fabianm@microsoft.com>
jeet1995 added a commit that referenced this pull request Sep 13, 2023
#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

(cherry picked from commit 4f998c8)
jeet1995 added a commit that referenced this pull request Sep 13, 2023
#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

(cherry picked from commit 4f998c8)
jeet1995 added a commit that referenced this pull request Sep 13, 2023
#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

(cherry picked from commit 4f998c8)
jeet1995 added a commit that referenced this pull request Sep 15, 2023
* Added region failover handling for requests cancelled on end-to-end timeout. (#35586)

* Preliminary changes.

* Preliminary code for handling region-failover when E2E timeout.

* Preliminary code for handling region-failover when E2E timeout.

* Preliminary code for handling region-failover when E2E timeout.

* Preliminary code for handling region-failover when E2E timeout.

* Preliminary code for handling region-failover when E2E timeout.

* Preliminary code for handling region-failover when E2E timeout.

* Wired a per-request cancellation tracker on timeout for query and point operations.

* Wired MetadataResponseHandler to GatewayAddressCache.

* Implement marking region as unavailable on cancelled request + widespread connection and timeout issues on replica and gateway.

* Refactor.

* Refactor.

* Fix MetadataRequestRetryPolicyTests.

* Add to MetadataRequestRetryPolicyTests.

* Fix MetadataRequestRetryPolicyTests.

* Fix spot bug.

* Fix spot bug.

* Fix spot bug.

* Fix spot bugs.

* Refactor.

* Handle server-generated 410 and operation cancellation.

* Revert.

* Refactor.

* Refactor.

* Refactor.

* Refactor.

* Fix tests.

* Fix tests.

* Fix tests.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Fix conflicts.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Reacting to review comments.

* Added CHANGELOG.md.

* Updated CHANGELOG.md.

(cherry picked from commit 94f7320)

* Fixed merge conflict resolution compilation errors.

* Ported MetadataRequestRetryPolicy test improvements.

* Updated CHANGELOG.md.

* fix connection state listener tracking staled uris (#36067)

Co-authored-by: annie-mac <xinlian@microsoft.com>
(cherry picked from commit f8f07ce)

* Update last unhealthy timestamp only when replica transitions to Unhealthy state (#36083)

* Preliminary code for tracking last unhealthy timestamp only when replica first becomes unhealthy.

* Fix tests.

* Fix tests.

* Fix tests.

(cherry picked from commit 02f3ec0)

* Fixing merge conflict resolution compilation errors.

* Cherry-picked PR 36225.

* Fixed possible `NullPointerException` issue if health-check flow kick… (#36397)

* Added coverage for incremental change-feed from multi-write accounts.

* Fixed tests.

* Fixed tests.

* Updated CHANGELOG.md.

* Reverted changes.

* Reverted changes.

* Fixed tests.

* Updated CHANGELOG.md.

* Fixed merge.

* Added multi-region test profile to azure-cosmos-tests.

* Added custom start time change feed coverage for multi-write accounts.

* Fixed multi-region to multi-master tests

* Fixed tests to multi-region

* Attempt at fixing CF tests.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Fixed possible `NullPointerException` issue if health-check flow kicks in before RNTBD context negotiation for a given channel.

* Attempt at fixing live test issues.

* Attempt at fixing live test issues.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

* Attempt at fixing live tests.

---------

Co-authored-by: Kushagra Thapar <kuthapar@microsoft.com>

(cherry picked from commit 4f998c8)

* Added new dataprovider in TestSuiteBase.

* Include multi-region test group.

* Updated CHANGELOG.md

* Updated cancellation count threshold and channel read delay threshold.

---------

Co-authored-by: Annie Liang <64233642+xinlian12@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants