devabhishekpal opened a new pull request, #9886:
URL: https://github.com/apache/ozone/pull/9886
## What changes were proposed in this pull request?
HDDS-14660. Implement new table to store part information for multipart
uploads
Please describe your PR in detail:
* This PR adds a new `multipartPartsTable` to handle storing of parts for
Multipart Uploads.
* The existing MultipartKeyInfo is updated to handle new fields like owner
and ACLs, volume, bucket and key name.
* The codec for PartKey and PartInformation has been added.
* The new table is added to the list of compacted tables
### How is the PartKey encoded?
Say for the below sample input (we are taking 47 as it has 2F in the lower
byte):
```
uploadId = <abcd-1234...>
partNumber = 47 -> taking 47 because it has 2f in the byte representation
```
Encoding format:
keyBytes = `UTF8(uploadId)` + `/` + `int32_be(partNumber)`
For **47**:
int32 big-endian bytes = `00 00 00 2f`
So final tail is:
- separator / = `2f`
- part bytes = `00 00 00 2f`
- Total tail bytes = `2f 00 00 00 2f`
Now we run the following checks:
- Check full-key first: if byte at len - 5 is /, decode as full key (used to
identify full row)
- Else, if byte at len - 1 is /, decode as prefix. (this is used for prefix
scan for iterating)
- Else invalid.
A logical key will look something like the following in the RocksDB entry:
```
[61 62 63 31 32 33 2d 75 75 69 64 2d 34 35 36 2f 00 00 00 2f]
[--------------uploadId UTF-8---------------][2f][-int32 BE-]
```
and will be represented as:
```
{
uploadID: "abcd123-uuid-456",
partNumber: 47
} : {
...
}
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-14660
## How was this patch tested?
Patch has been tested by running unit tests.
--
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]