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

leaseClient.keepAlive several minutes later will stop #1383

Open
wesley-zhong opened this issue Jul 17, 2024 · 3 comments
Open

leaseClient.keepAlive several minutes later will stop #1383

wesley-zhong opened this issue Jul 17, 2024 · 3 comments

Comments

@wesley-zhong
Copy link

**0.7.7 **

  • etcd: 3.5.13
  • jetcd: 0.7.7
  • java: 21

Describe the bug
When I call leaseClient.keepAlive several minutes later the function onCompleted will be called and the keepAlive will stop

Expected behavior
A clear and concise description of what you expected to happen.

Additional context
leaseClient.keepAlive(myselfNodeInfo.getLeaseId(), new StreamObserver() {
@OverRide
public void onNext(LeaseKeepAliveResponse value) {
log.info("ppppppp get id ={} ttl ={}", value.getID(), value.getTTL());
}

        @Override
        public void onError(Throwable t) {
            log.error("----error", t);
        }

        @Override
        public void onCompleted() {
            log.info("================ restart my self");
        }
    });
@lburgazzoli
Copy link
Collaborator

can you please provide a unit test as a reproducer ?

@wesley-zhong
Copy link
Author

My code :

  Lease leaseClient = client.getLeaseClient();
    ServerNodeInfo myselfNodeInfo = getMyselfNodeInfo();
    leaseClient.keepAlive(myselfNodeInfo.getLeaseId(), new StreamObserver<LeaseKeepAliveResponse>() {
        @Override
        public void onNext(LeaseKeepAliveResponse value) {
            log.info("ppppppp get id ={}  ttl ={}", value.getID(), value.getTTL());
        }

        @Override
        public void onError(Throwable t) {
            log.error("----error", t);
        }

        @Override
        public void onCompleted() {
            log.info("================ onCompleted");
        }
    });

@lburgazzoli
Copy link
Collaborator

I need something mote than than, like a real unit test that fail after some time which I can add to the test suite. Also the exact etcd configuration and possibly some logs of both etcd and jetcd.

Also, you should use the latest version of jetcd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants