jetcd
jetcd copied to clipboard
not resoponse when runiing in jdk21
Versions
- etcd: 3.5.3
- jetcd: 7.5
- java: jdk21
Describe the bug progrem code like this: GetOption op = GetOption.newBuilder().isPrefix(true).build(); CompletableFuture<GetResponse> getFuture= EtcdFactory.getKVClient().get(EtcdFactory.bytesOf(EtcdConstant.KEYPREFIX_PRODUCER),op); GetResponse response = null; try { response = getFuture.get();//keep blocking in java21 } catch (InterruptedException e) { log.error(Constant.LOG_ERR_PRE+"find etcd producer data error",e); throw new RuntimeException(e); } catch (ExecutionException e) { log.error(Constant.LOG_ERR_PRE+"find etcd producer data error",e); throw new RuntimeException(e); } List<KeyValue> list = response.getKvs();
//////////////////////// The above code works fine in java8; When upgrading java8 to java21, the above code will keep blocking the CompletableFuture get method; To Reproduce Run the above code in java21;
Expected behavior CompletableFuture can be returned normally
Additional context