w41ter opened a new pull request, #61132:
URL: https://github.com/apache/doris/pull/61132

   This is a cherry-pick of #60738 to branch-4.0.
   
   
   It only works for metadata_failure_recovery mode
   
   
   Problem Summary:
   When using metadata failure recovery mode, sometimes the journal logs need 
to be truncated to a specific journal ID to recover from metadata corruption. 
This PR adds a new parameter `--recovery_journal_id` to allow users to specify 
the target journal ID, and all journals with IDs greater than this value will 
be removed.
   
   ### How to use
   
   When the Frontend (FE) metadata is corrupted and needs to be recovered, 
follow these steps:
   
   1. Stop the FE process
   2. Start FE with both `--metadata_failure_recovery` and 
`--recovery_journal_id` parameters:
   
   ```bash
   ./start_fe.sh --metadata_failure_recovery --recovery_journal_id <journal_id>
   ```
   
   For example, to recover to journal ID 12345:
   ```bash
   ./start_fe.sh --metadata_failure_recovery --recovery_journal_id 12345
   ```
   
   3. The system will:
      - Remove all journal databases with IDs greater than the specified 
journal ID
      - Truncate the target journal database by deleting keys with IDs greater 
than the specified value
      - Start FE in metadata failure recovery mode
   
   **Note**: This operation will permanently delete metadata journals. Make 
sure to backup your data before using this feature.


-- 
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]

Reply via email to