Sammi Chen created HDDS-10731:
---------------------------------
Summary: Avoid send block delete commands to DN if the involved
container is closed and empty
Key: HDDS-10731
URL: https://issues.apache.org/jira/browse/HDDS-10731
Project: Apache Ozone
Issue Type: Improvement
Reporter: Sammi Chen
Assignee: Sammi Chen
During investigate one SCM crash case, we found that the SCM DB deletedBlock
table has 900M records while customer said the DN's disk utilization looks
normal and didn't have any major space not reclaimed issue.
{noformat}
bin/ozone debug ldb --db=/Users/sammi/workspace/ozone-meta/scm.db scan --cf
deletedBlocks --count
951177554
{noformat}
After further checked the deletedBlock table content, there are lots of txs
whose target container is already closed and empty. Here is one example,
Container 1087
{noformat}
{
"state" : "CLOSED",
"stateEnterTime" : 1706614618.156000000,
"replicationConfig" : {
"replicationFactor" : "THREE",
"replicationType" : "RATIS"
},
"usedBytes" : 0,
"numberOfKeys" : 0,
"lastUsed" : 1713412552.968000000,
"owner" : "om2",
"containerID" : 1087,
"deleteTransactionId" : 2071,
"sequenceId" : 0
}
{noformat}
Block delete transactions for this container 1087
{noformat}
1564: {
"memoizedSize" : -1,
"unknownFields" : {
"fields" : { }
},
"bitField0_" : 7,
"txID_" : 1564,
"containerID_" : 1087,
"localID_" : [ 111677748019211347, 111677748019211366, 111677748019211404 ],
"count_" : 0,
"memoizedIsInitialized" : 1,
"memoizedSerializedSize" : -1,
"memoizedHashCode" : 0
}
1834: {
"memoizedSize" : -1,
"unknownFields" : {
"fields" : { }
},
"bitField0_" : 7,
"txID_" : 1834,
"containerID_" : 1087,
"localID_" : [ 111677748019211432 ],
"count_" : 0,
"memoizedIsInitialized" : 1,
"memoizedSerializedSize" : -1,
"memoizedHashCode" : 0
}
2071: {
"memoizedSize" : -1,
"unknownFields" : {
"fields" : { }
},
"bitField0_" : 7,
"txID_" : 2071,
"containerID_" : 1087,
"localID_" : [ 111677748019211288 ],
"count_" : 0,
"memoizedIsInitialized" : 1,
"memoizedSerializedSize" : -1,
"memoizedHashCode" : 0
}
{noformat}
For those kinds of txs, we can avoid send the commands to DN, instead we can
directly delete the txs from the DB.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]