You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/05/21 02:58:16 UTC

[GitHub] [dubbo] songxiaosheng opened a new issue, #10065: 元数据本地文件锁不释放

songxiaosheng opened a new issue, #10065:
URL: https://github.com/apache/dubbo/issues/10065

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.7 3.0.8
   * Operating System version: mac linux winodws
   * Java version: 1.8 + 11
   
   ### Steps to reproduce this issue
   直接看图: 元数据写本地磁盘后未释放锁
   ![image](https://user-images.githubusercontent.com/81170548/169632233-d7325a34-a433-4a08-a2f0-d2688fc6bfb7.png)
   
   以下是释放锁的代码 在那个注册中心写入本地时候是有的,元数据这个类型写入之后没这行代码 看看要不要加上,我印象里面代码里面总是拿不到锁导致抛出异常可能是这个导致的
     if (lockfile != null) {
                   if(!lockfile.delete()) {
                       logger.warn(String.format("Failed to delete lock file [%s]", lockfile.getName()));
                   }
               }
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   本地磁盘元数据缓存文件锁应该要释放
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   本地磁盘元数据缓存文件锁应该没有删除 
   ```
   Just put your stack trace here!
   把下面这个代码加到AbstractMetadataReport中的doSaveProperties方法的finally块中
     if (lockfile != null) {
                   if(!lockfile.delete()) {
                       logger.warn(String.format("Failed to delete lock file [%s]", lockfile.getName()));
                   }
               }
   
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj closed issue #10065: 元数据本地文件锁不释放

Posted by GitBox <gi...@apache.org>.
chickenlj closed issue #10065: 元数据本地文件锁不释放
URL: https://github.com/apache/dubbo/issues/10065


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org