-
Notifications
You must be signed in to change notification settings - Fork 316
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
Watcher stop watching after few watching few changes #1379
Comments
This is actually working, the issue was the logs are not being printed in the console after certain time of watching changes. |
I'm reopening this issue again as I'm getting the following error time to time when I'm reloading all the key values from etcd if any key changes from watcher.watch:
Then after sometime this errors goes away, and comeback again after sometime. |
I always have this error. Then I changed https://github.com/IBM/etcd-java/ it works well. |
can you provide a reproducer ? I do have very limited time so without reproducer I'm not able to help. |
@wesley-zhong have you tried to understand what the issue is ? |
@lburgazzoli thanks for replying. lemme provide me the code which will reproduce this error:
The following is my watcher consumer:
reloadMessagesAsync in the reload message I'm reloading all thek keys values freshly:
This is for getting available locales from a predefined key:
loadAvailableLocalsAsync this just process the result and create basedir's map from the reponse of the locale key got from loadAvailableLocalsAsync. Then for each local (here en, bn) I fetch all the key-values again and save it to my in memory cache:
here is the code where I actually run the action to get key-values from etcd by prefix:
then most of the times it all works ok. But time to time it gives the following errors: |
can you create a pr with a failing junit test case ? |
Versions
Describe the bug
I'm initializing a etcd client like the following:
this.etcdClient = Client.builder().endpoints(hosts).executorService(taskExecutor).build();
and then initializing a watcher on a key prefix e.g. "/messages" only on startup like the following:
Here is my consumer:
Now after starting the watcher, it successfully listens for few changes like 10 - 15, then its stops watching. I'm getting the following erorr in onError:
o.etcd.jetcd.common.exception.EtcdException: gRPC message exceeds maximum size 4194304: 6619136
then I've increased the size like the following:
this.etcdClient = Client.builder().endpoints(hosts).maxInboundMessageSize(8 * 1024 * 1024).executorService(taskExecutor).build();
But nothing happened, the watcher stops watching after 10 - 15 changes, Interestingly its not showing any error now.
Note: my with prefix /messages I've only 4-6 keys.
And I've checked the watcher.isClose() at that point, its returning false.
`To Reproduce
Just try to to set up a watcher and then watch for 10 -15 changes
Expected behavior
The watcher should work properly once it is initiated.
Any help will be greatly appreciated, as its a blocker for our applicatoin right now, thanks in advance.
The text was updated successfully, but these errors were encountered: