Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.1.0
Description
Summary
If SCM cleans up all the DeletedBlocksTransaction in deletedBlocksTable, then restart, the txID in SCMMetadataStoreImpl will drop to 0.
Detail
in SCMMetadataStoreImpl.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; }
in DeletedBlockLogImpl.java
public void commitTransactions(
List<DeleteBlockTransactionResult> transactionResults, UUID dnID) {
...
scmMetadataStore.getDeletedBlocksTXTable().delete(txID);
...
}
Attachments
Issue Links
- links to