<@U0A71G31CDV> What is The journal and where I ca...
# questions-and-troubleshooting
m
@Rocky What is The journal and where I can store it ?
r
In StarRocks, the journal refers to the metadata redo log (or edit log). It records all modifications made to the system's metadata, such as creating tables, adding partitions, or data loading tasks. What is the journal? * Purpose: It ensures metadata persistence and consistency. When the Frontend (FE) Leader receives a request that changes the system state, it writes the operation to the journal. Follower FEs then replay these journals to keep their local metadata in sync. * Technology: StarRocks uses Berkeley DB Java Edition (BDB JE) to manage these journals. * Role in HA: In a High Availability (HA) setup, journals are replicated across FE nodes to ensure that if the Leader fails, a Follower can take over without data loss. Where is it stored? The journal is stored on the local disk of each FE node within the directory defined by the
meta_dir
parameter in your
fe.conf
file. * Default Location:
${STARROCKS_HOME}/meta
* Specific Subdirectory: Within the
meta_dir
, you will typically find a
bdb/
directory where the BDB JE environment and journal files (with names like
00000000.jdb
) reside. Best Practices for Storage * Performance: Because every metadata-changing operation must be written to the journal before it is considered successful, it is highly recommended to store the
meta_dir
on a high-performance disk, such as an SSD/NVMe. * Disk Space: Ensure sufficient disk space. If the disk containing the journal becomes full (or falls below a safety threshold, typically 5 GB in newer versions), the FE node may stop or fail to restart. * Isolation: Avoid sharing the same disk with BE data or heavy system logs to prevent I/O contention. You can check your current storage location by running:
Copy code
bash
grep "meta_dir" fe/conf/fe.conf
If the line is commented out or missing, it defaults to the
meta
directory in your FE installation path. Referencesadministration/management/FE_configuration.mdadministration/Meta_recovery.md