runzhiwang opened a new pull request #1199: URL: https://github.com/apache/hadoop-ozone/pull/1199
## What changes were proposed in this pull request? **What's the problem ?** When write `DB_PENDING_DELETE_BLOCK_COUNT_KEY` to rocksdb, most code convert value to byte array by Longs.toByteArray. But when read, `parseKVContainerData` use Ints.fromByteArray. The result is always wrong, unless the value is zero.   For example, Longs.toByteArray(1) return byte array in which only byte[7] is 1, but Ints.fromByteArray only parse the first 4 bytes of byte array. So write 1, but read out 0.   ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-3957 ## How was this patch tested? add assert in current ut. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
