[
https://issues.apache.org/jira/browse/HDDS-13906?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18038173#comment-18038173
]
Wei-Chiu Chuang commented on HDDS-13906:
----------------------------------------
Explanation
Currently, when a new Ozone Manager joins the cluster, the leader OM has to
send it a snapshot of its database (which uses RocksDB). To
ensure data consistency, this process locks the database, copies the
necessary files into a tar archive, and then releases the lock. The
copying process is slow and happens "synchronously" (blocking), which means
other background tasks on the leader OM are stalled until the
copy is finished.
The proposed improvement is to reduce the time spent holding the lock:
1. Instead of copying the file data under lock, the process would just
create a hardlink to the database file in a temporary directory.
Creating a hardlink is an extremely fast, near-instantaneous filesystem
operation.
2. Immediately after creating the hardlink, the lock can be released.
3. With the lock released, the slow process of reading the file (via the
hardlink) and writing its contents into the tar archive can happen
without blocking the OM's other critical background tasks.
This change would significantly improve the leader OM's performance and
responsiveness during bootstrap operations.
> Reduce Bootstrap Write lock time on OM during bootstrapping execution
> ---------------------------------------------------------------------
>
> Key: HDDS-13906
> URL: https://issues.apache.org/jira/browse/HDDS-13906
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Swaminathan Balachandran
> Assignee: Wei-Chiu Chuang
> Priority: Major
>
> Because of fixes in HDDS-13905 an entire BG service task would be blocked
> because of bootstrap operation running on a leader OM. One possible
> improvement here would be to just to create a hardlink(which we already do to
> ensure this file doesn't get deleted by rocksdb operations but we also write
> the file into the Tarball stream synchronously
> https://github.com/apache/ozone/blob/96390ac142725195315906400a633f316c899702/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/Archiver.java#L135-L155)
> to the file to be copied into tar outputStream into a tmp directory under
> the bootstrap lock and write all the entries corresponding to the link
> created outside the lock(The entry should also include the hardLinkFile
> created in the last batch).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]