Glen Geng created HDDS-4477:
-------------------------------
Summary: txID in SCMMetadataStoreImpl may drop to 0 after a SCM
restart.
Key: HDDS-4477
URL: https://issues.apache.org/jira/browse/HDDS-4477
Project: Hadoop Distributed Data Store
Issue Type: Bug
Components: SCM
Affects Versions: 1.1.0
Reporter: Glen Geng
*Summary*
If SCM cleans up all the DeletedBlocksTransaction in deletedBlocksTable, then
restart, the txID in SCMMetadataStoreImpl will drop to 0.
*Detail*
in SCMMetadataStoreImpl.java
{code:java}
public SCMMetadataStoreImpl(OzoneConfiguration config)
throws IOException {
this.configuration = config;
start(this.configuration);
this.txID = new AtomicLong(this.getLargestRecordedTXID());
}
private Long getLargestRecordedTXID() throws IOException {
try (TableIterator<Long, ? extends KeyValue<Long, DeletedBlocksTransaction>>
txIter = deletedBlocksTable.iterator()) {
txIter.seekToLast();
Long txid = txIter.key();
if (txid != null) {
return txid;
}
}
return 0L;
}{code}
in DeletedBlockLogImpl.java
{code:java}
public void commitTransactions(
List<DeleteBlockTransactionResult> transactionResults, UUID dnID) {
...
scmMetadataStore.getDeletedBlocksTXTable().delete(txID);
...
}{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]