Skip to content

The etcd3 lease should be recycled correctly #3684

Closed

Description

@zonghaishang
  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: xxx
  • Operating System version: xxx
  • Java version: xxx

Steps to reproduce this issue

org.apache.dubbo.remoting.etcd.jetcd.JEtcdClientWrapper#doClose:

if (globalLeaseId > 0) {
        revokeLease(this.globalLeaseId);
}

should be change to :

if (globalLeaseId != 0) {
        revokeLease(this.globalLeaseId);
}

Pls. provide [GitHub address] to reproduce this issue.

Expected Result

What do you expected from the above steps?

Actual Result

What actually happens?

If there is an exception, please attach the exception trace:

Just put your stack trace here!

Activity

  1. added this to the 2.7.2 milestone on Mar 18, 2019
  2. ralf0131 commented on Mar 19, 2019

    @ralf0131
    Contributor

    Hi, I checked the doc, there is no guarantee that the id is positive number. So I think changing to !=0 is safer.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions