Skip to content

Comments

HDDS-6426. OM keyTable and fileTable use different key formats.#3251

Closed
JyotinderSingh wants to merge 2 commits intoapache:masterfrom
JyotinderSingh:HDDS-6426
Closed

HDDS-6426. OM keyTable and fileTable use different key formats.#3251
JyotinderSingh wants to merge 2 commits intoapache:masterfrom
JyotinderSingh:HDDS-6426

Conversation

@JyotinderSingh
Copy link
Contributor

What changes were proposed in this pull request?

HDDS-5835 changed OMMetadataManager#getKeyTable to return a different table based on the bucket layout: fileTable for FSO buckets, keyTable otherwise. 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 keyTable and fileTable. 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

@JyotinderSingh JyotinderSingh marked this pull request as draft March 31, 2022 10:32
@swagle swagle requested a review from rakeshadr April 18, 2022 16:07
@swagle swagle requested a review from errose28 May 16, 2022 16:08
@kerneltime
Copy link
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.

@kerneltime kerneltime closed this Aug 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants