提交 332df78e 编写于 作者: Y yukon

[ROCKETMQ-261] Use write lock when destroy IndexService

上级 f613c3b7
......@@ -142,7 +142,7 @@ public class IndexService {
public void destroy() {
try {
this.readWriteLock.readLock().lock();
this.readWriteLock.writeLock().lock();
for (IndexFile f : this.indexFileList) {
f.destroy(1000 * 3);
}
......@@ -150,7 +150,7 @@ public class IndexService {
} catch (Exception e) {
log.error("destroy exception", e);
} finally {
this.readWriteLock.readLock().unlock();
this.readWriteLock.writeLock().unlock();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册