Skip to content

Conversation

@swamirishi
Copy link
Contributor

What changes were proposed in this pull request?

Currently when we fetch a page on job report table from an offset value, we are are doing continuous get calls on the column family since the snapdiff reports pages are not lexicographically ordered. We can use the rocksdb iterator to scan keys on a column family to optimize instead. In order to use this we need to prepend leading zeroes on to the keys to have the pages in lexicographical ordering.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-8497

How was this patch tested?

Unit tests written as part of #4678

@adoroszlai adoroszlai added the snapshot https://issues.apache.org/jira/browse/HDDS-6517 label May 17, 2023
Copy link
Contributor

@hemantk-12 hemantk-12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch @swamirishi

Left one major (bug) comment and some minor comments.

@smengcl
Copy link
Contributor

smengcl commented Jun 8, 2023

Blocked by #4678 as well.

@smengcl smengcl marked this pull request as draft June 8, 2023 20:52
@swamirishi swamirishi marked this pull request as ready for review June 18, 2023 23:25
Copy link
Contributor

@hemantk-12 hemantk-12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me apart from some minor comments I left.

Copy link
Contributor

@hemantk-12 hemantk-12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Thanks for the patch.

# Conflicts:
#	hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/SnapshotDiffManager.java
#	hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
# Conflicts:
#	hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/snapshot/RocksDbPersistentMap.java
#	hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestSnapshotDiffManager.java
Copy link
Contributor

@prashantpogde prashantpogde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you for making these changes @swamirishi

@prashantpogde prashantpogde merged commit 36901d4 into apache:master Jun 22, 2023
Comment on lines +92 to +93
public ClosableIterator<Map.Entry<K, V>> iterator(Optional<K> lowerBound,
Optional<K> upperBound) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

snapshot https://issues.apache.org/jira/browse/HDDS-6517

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants