chihsuan opened a new pull request, #10879:
URL: https://github.com/apache/ozone/pull/10879

   ## What changes were proposed in this pull request?
   
   `ReconDBProvider.truncateTable` currently iterates over every table entry 
and issues one point delete per key. This makes clearing a populated table 
require O(n) delete operations.
   
   This change replaces the per-entry deletion loop with a fixed number of 
operations:
   
   1. Use a key-only iterator to find the first and last keys.
   2. Delete the range `[firstKey, lastKey)`.
   3. Delete `lastKey` separately because `deleteRange` excludes its end key.
   
   The method is also made generic to avoid using raw `Table` and `KeyValue` 
types.
   
   A real RocksDB-backed test covers null, empty, single-entry, and multi-entry 
tables. It also verifies that the table remains usable after truncation.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15894
   
   ## How was this patch tested?
   
   The focused Recon DB provider and caller tests passed:
   
   ```shell
   mvn -o -pl :ozone-recon test \
     
-Dtest='TestReconDBProvider,TestReconContainerMetadataManagerImpl,TestReconNamespaceSummaryManagerImpl'
 \
     -DskipShade -DskipRecon -DskipDocs
   ```
   
   Result: 18 tests passed with no failures or errors.
   
   Repository checkstyle also passed for all modules:
   
   ```shell
   ./hadoop-ozone/dev-support/checks/checkstyle.sh
   ```
   
   Generated-by: Codex (GPT-5)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to