-
Notifications
You must be signed in to change notification settings - Fork 46
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
ReliableTopic listener stops with an unexpected exception #848
Labels
Milestone
Comments
ihsandemir
added a commit
to ihsandemir/hazelcast-cpp-client
that referenced
this issue
Apr 16, 2021
… map can be modified during client execution and hence can be modified through different user threads. Hence, we have to use a concurrent map. Actually, only the batch size of the topic config is used, and the name field of the config is not directly used by the implementation and hence, we could have just directly used [this static field](https://github.com/hazelcast/hazelcast-cpp-client/blob/master/hazelcast/include/hazelcast/client/config/reliable_topic_config.h#L31) if no user provided config. But since we provided [the user API](https://github.com/hazelcast/hazelcast-cpp-client/blob/master/hazelcast/include/hazelcast/client/client_config.h#L277) similar to Java and it actually does more than get but also modifies the internal map and it returns a reference to the map entry, i could not really change this actually unneeded API or have this API just return optional if a user provided config exist and not modify the map as expected from a getter. But since, this would mean a change of API, I could not do it and I had to use a concurrent map. That was an unlucky choice during the first implementation. fixes hazelcast#848
ihsandemir
added a commit
to ihsandemir/hazelcast-cpp-client
that referenced
this issue
Apr 16, 2021
… map can be modified during client execution and hence can be modified through different user threads. Hence, the solution is to use a different API in the internal implementation `config::reliable_topic_config *find_reliable_topic_config(const std::string &name)` which does not modify the map but uses the default batch size. fixes hazelcast#848
I also checked the other map usages in the client_config. We have the |
ihsandemir
added a commit
that referenced
this issue
Apr 28, 2021
…ncurrently. Changed the reliable_topic implementation to utilize the user executor. Cache `reliable_topic` similar to other proxies (#849) * Fix for the type of `client_config::reliable_topic_config_map_`. This map can be modified during client execution and hence can be modified through different user threads. Hence, the solution is to use a different API in the internal implementation `config::reliable_topic_config *find_reliable_topic_config(const std::string &name)` which does not modify the map but uses the default batch size. * Changed the reliable_topic implementation to utilize the user executor rather than the custom `ReliableTopicExecutor` implementation. hence, this is more in accordance with the Java client implementation. * Changed the proxy creation for `reliable_topic` so that it is also being cached similar to other proxies. fixes #848
degerhz
added
the
to-jira
Use to create a placeholder Jira issue in Jira APIs Project
label
Apr 28, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Community reported issue: See the slack channel conversation.
User's problem statement:
Reproducer hz_issue.zip is attached for reference.
The text was updated successfully, but these errors were encountered: