Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Client becomes stale when forcing to use async APIs sync. [API-2023] #818

Closed
emreyigit opened this issue Apr 12, 2023 · 0 comments · Fixed by #819
Closed

Client becomes stale when forcing to use async APIs sync. [API-2023] #818

emreyigit opened this issue Apr 12, 2023 · 0 comments · Fixed by #819
Labels
Jira Creates a corresp. Jira issue in the APIs project. Type: Enhancement Code enhancement.
Milestone

Comments

@emreyigit
Copy link
Collaborator

emreyigit commented Apr 12, 2023

Client becomes stale, most probably entering a deadlock, when style of initialization client and invoking async APIs are diverged.

var client = await HazelcastClientFactory.StartNewClientAsync(options);
var map = client.GetMapAsync<string, string>("mapname").Result;

In this case, the map never created, and client hung. Although, Task.Result is dangerous, sync usage should be provided as much as possible.

@emreyigit emreyigit added Type: Enhancement Code enhancement. Jira Creates a corresp. Jira issue in the APIs project. labels Apr 12, 2023
@emreyigit emreyigit added this to the 5.3.0 milestone Apr 12, 2023
@zpqrtbnk zpqrtbnk changed the title Client becomes stale when forcing to use async APIs sync. Client becomes stale when forcing to use async APIs sync. [API-2023] Apr 12, 2023
@emreyigit emreyigit linked a pull request Apr 13, 2023 that will close this issue
@emreyigit emreyigit modified the milestones: 5.3.0, 5.2.2 May 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Jira Creates a corresp. Jira issue in the APIs project. Type: Enhancement Code enhancement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant