HDDS-6426. OM keyTable and fileTable use different key formats.#3251
Closed
JyotinderSingh wants to merge 2 commits intoapache:masterfrom
Closed
HDDS-6426. OM keyTable and fileTable use different key formats.#3251JyotinderSingh wants to merge 2 commits intoapache:masterfrom
JyotinderSingh wants to merge 2 commits intoapache:masterfrom
Conversation
Contributor
|
Closing this PR as it has not had any activity in a long time, we need to revisit this Jira and redo this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
HDDS-5835changedOMMetadataManager#getKeyTableto return a different table based on the bucket layout:fileTablefor FSO buckets,keyTableotherwise. The problem is that these two tables have completely different sets of keys and key formats. It is not enough to change existing requests expecting to operate on the key table to now point to the file table if they are invoked on an FSO bucket, because they will query the table with the wrong key format.This implementation is misleading for developers (you ask for a keyTable and might get a fileTable instead) and caused HDDS-6414, while possibly masking other similar bugs for existing requests.
This patch introduces a new interface to define methods to build DB Keys to query entries inside the
keyTableandfileTable. We introduce two implementations of this interface - one for FSO, and another for OBS/LEGACY.This should reduce the effort on developer side to handle key generation logic while writing new Request classes or tests.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-6426
How was this patch tested?
Related unit tests