You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@rocketmq.apache.org by "yukon (JIRA)" <ji...@apache.org> on 2017/08/10 12:58:00 UTC
[jira] [Created] (ROCKETMQ-260) The wrong lock used when destroy
IndexService
yukon created ROCKETMQ-260:
------------------------------
Summary: The wrong lock used when destroy IndexService
Key: ROCKETMQ-260
URL: https://issues.apache.org/jira/browse/ROCKETMQ-260
Project: Apache RocketMQ
Issue Type: Bug
Components: build
Affects Versions: 4.1.0-incubating, 4.0.0-incubating
Reporter: yukon
Assignee: yukon
Fix For: 4.2.0-incubating
When destroy IndexService, the indexFileList should be cleared with write lock guarantee, but destroy method uses read lock insted.
{code}
public void destroy() {
try {
this.readWriteLock.readLock().lock();
for (IndexFile f : this.indexFileList) {
f.destroy(1000 * 3);
}
this.indexFileList.clear();
} catch (Exception e) {
log.error("destroy exception", e);
} finally {
this.readWriteLock.readLock().unlock();
}
}
{code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)