Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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.
Attachments
Issue Links
- is related to
-
HDDS-8830 Add admin CLI to list open files
- Resolved
- links to