Siyao Meng created HDDS-10077:
---------------------------------
Summary: Add metadata HSYNC_CLIENT_ID to hsync'ed key in
OpenKeyTable as well
Key: HDDS-10077
URL: https://issues.apache.org/jira/browse/HDDS-10077
Project: Apache Ozone
Issue Type: Sub-task
Reporter: Siyao Meng
Currently, only those keys in KeyTable/FileTable would have metadata
{{HSYNC_CLIENT_ID}} when those keys have been hsync'ed (and not closed yet).
The problem with this is that it makes {{getExpiredOpenKeys()}} and
{{listOpenKeys}} (HDDS-8830) very *inefficient* by forcing them to look up
KeyTable/FileTable while they could have just used OpenKeyTable/OpenFileTable
solely to determine whether an open key is hsync'ed or not.
Proposal:
1. during an hsync(), persist metadata {{HSYNC_CLIENT_ID}} to {{OmKeyInfo}} in
{{OpenKeyTable}} as well (in addition to {{KeyTable}}). Only write when the
client ID changes so it doesn't cause write amplifications. Ideally only the
first hsync() of a key would cause a write to {{OpenKeyTable}}.
2. during key close/commit, remove {{HSYNC_CLIENT_ID}} from {{OpenKeyTable}} if
necessary so that {{HSYNC_CLIENT_ID}} isn't written to the final key.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]