提交 c92db266 authored 作者: andrei's avatar andrei

Amend meta tables with session state, blocker, maps update failure ratio

上级 b56c16ef
...@@ -506,7 +506,9 @@ public class MetaTable extends Table { ...@@ -506,7 +506,9 @@ public class MetaTable extends Table {
"SESSION_START", "SESSION_START",
"STATEMENT", "STATEMENT",
"STATEMENT_START", "STATEMENT_START",
"CONTAINS_UNCOMMITTED" "CONTAINS_UNCOMMITTED",
"STATE",
"BLOCKER_ID INT"
); );
break; break;
} }
...@@ -1078,6 +1080,8 @@ public class MetaTable extends Table { ...@@ -1078,6 +1080,8 @@ public class MetaTable extends Table {
Long.toString(fs.getWriteCount())); Long.toString(fs.getWriteCount()));
add(rows, "info.FILE_READ", add(rows, "info.FILE_READ",
Long.toString(fs.getReadCount())); Long.toString(fs.getReadCount()));
int updateFailureRatio = (int)(10000 * mvStore.getStore().getUpdateFailureRatio());
add(rows, "info.UPDATE_FAILURE_PERCENT", "" + updateFailureRatio / 100 + "." + updateFailureRatio % 100 + "%");
long size; long size;
try { try {
size = fs.getFile().size(); size = fs.getFile().size();
...@@ -1822,6 +1826,7 @@ public class MetaTable extends Table { ...@@ -1822,6 +1826,7 @@ public class MetaTable extends Table {
if (start == 0) { if (start == 0) {
start = now; start = now;
} }
int blockingSessionId = s.getBlockingSessionId();
add(rows, add(rows,
// ID // ID
Integer.toString(s.getId()), Integer.toString(s.getId()),
...@@ -1834,7 +1839,11 @@ public class MetaTable extends Table { ...@@ -1834,7 +1839,11 @@ public class MetaTable extends Table {
// STATEMENT_START // STATEMENT_START
new Timestamp(start).toString(), new Timestamp(start).toString(),
// CONTAINS_UNCOMMITTED // CONTAINS_UNCOMMITTED
Boolean.toString(s.containsUncommitted()) Boolean.toString(s.containsUncommitted()),
// STATE
String.valueOf(s.getState()),
// BLOCKER_ID INT
blockingSessionId == 0 ? null : String.valueOf(blockingSessionId)
); );
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论