未验证 提交 0fa07499 编写于 作者: J Jiang Tian 提交者: GitHub

fix an unproperly initialized var (#148)

* add java doc
enhance concurrency
refine some naming
add more specific logs

* fix invalid write when memory usage level is dangerous in BufferWriteProcessor
add shutdown hook to report memory usage

* undo time update when insertion failed

* complete undo logic

* remove undo in exception

* fix an unproperly initialized var
上级 44566294
......@@ -144,11 +144,12 @@ public class RecordMemController extends BasicMemController {
@Override
public void releaseUsage(Object user, long freeSize) {
AtomicLong usage = memMap.get(user);
long usageLong = 0;
if (usage == null) {
LOGGER.error("Unregistered memory usage from {}", user);
} else if (freeSize > usageLong) {
usageLong = usage.get();
return;
}
long usageLong = usage.get();
if (freeSize > usageLong) {
LOGGER
.error("{} requests to free {} bytes while it only registered {} bytes", user,
freeSize, usage);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册