提交 b1c2ff74 编写于 作者: H Haojun Liao

[td-1569]

上级 00cc76ae
...@@ -348,7 +348,7 @@ void taosCacheRelease(SCacheObj *pCacheObj, void **data, bool _remove) { ...@@ -348,7 +348,7 @@ void taosCacheRelease(SCacheObj *pCacheObj, void **data, bool _remove) {
// The operation of removal from hash table and addition to trashcan is not an atomic operation, // The operation of removal from hash table and addition to trashcan is not an atomic operation,
// therefore the check for the empty of both the hash table and the trashcan has a race condition. // therefore the check for the empty of both the hash table and the trashcan has a race condition.
// It happens when there is only one object in the cache, and two threads which has referenced this object // It happens when there is only one object in the cache, and two threads which has referenced this object
// start to free the it simultaneously. [TD-1569] // start to free the it simultaneously [TD-1569].
size_t offset = offsetof(SCacheDataNode, data); size_t offset = offsetof(SCacheDataNode, data);
SCacheDataNode *pNode = (SCacheDataNode *)((char *)(*data) - offset); SCacheDataNode *pNode = (SCacheDataNode *)((char *)(*data) - offset);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册