You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Alexander Lapin (Jira)" <ji...@apache.org> on 2024/10/01 04:26:00 UTC
[jira] [Assigned] (IGNITE-23259) PlacementDriverManagerTest.testRedirectionAcceptance may fail with AssertionFailedError: expected: but was:
[ https://issues.apache.org/jira/browse/IGNITE-23259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexander Lapin reassigned IGNITE-23259:
----------------------------------------
Assignee: Alexander Lapin
> PlacementDriverManagerTest.testRedirectionAcceptance may fail with AssertionFailedError: expected: <true> but was: <false>
> --------------------------------------------------------------------------------------------------------------------------
>
> Key: IGNITE-23259
> URL: https://issues.apache.org/jira/browse/IGNITE-23259
> Project: Ignite
> Issue Type: Bug
> Reporter: Alexander Lapin
> Assignee: Alexander Lapin
> Priority: Major
> Labels: ignite-3
> Time Spent: 10m
> Remaining Estimate: 0h
>
> {code:java}
> org.opentest4j.AssertionFailedError: expected: <true> but was: <false> at app//org.junit.jupiter.api.AssertionFailureBuilder.build(AssertionFailureBuilder.java:151) at app//org.junit.jupiter.api.AssertionFailureBuilder.buildAndThrow(AssertionFailureBuilder.java:132) at app//org.junit.jupiter.api.AssertTrue.failNotTrue(AssertTrue.java:63) at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:36) at app//org.junit.jupiter.api.AssertTrue.assertTrue(AssertTrue.java:31) at app//org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:183) at app//org.apache.ignite.internal.placementdriver.PlacementDriverManagerTest.checkLeaseCreated(PlacementDriverManagerTest.java:660) at app//org.apache.ignite.internal.placementdriver.PlacementDriverManagerTest.testRedirectionAcceptance(PlacementDriverManagerTest.java:614) {code}
> The reason for the failure is that leaseGrantedMessageResponse may be ignored because of agreement cancellation e.g. in case if lease update invoke is !success.
> {code:java}
> msManager.invoke(
> or(notExists(key), value(key).eq(leasesCurrent.leasesBytes())),
> put(key, renewedValue),
> noop()
> ).whenComplete((success, e) -> {
> ...
> if (!success) {
> LOG.warn("Lease update invocation failed because of concurrent update.");
> cancelAgreements(toBeNegotiated.keySet());
> return;
> } {code}
> PlacementDriverManagerTest#testRedirectionAcceptance is however doesn't expect the response to be ignored and won't repeat redirect proposal on next miss-requests.
> In other words the flow is following.
> # LeaseUpdater -> leaseGrantedMessage(1234) -> testRedirectionAcceptance(host:1234) -> leaseGrantedMessageResponse(accepted=false, redirectProposal=1235)
> # In case of test failure, aforementioned response will be skipped, because of race on invokes.
> # LeaseUpdater -> retry leaseGrantedMessage(1234) -> testRedirectionAcceptance(host:1234) -> leaseGrantedMessageResponse(accepted=false) //
> .accepted(redirect.get().equals(handler))
> # Infinite loop for step 3.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)