frostruan opened a new pull request, #5408:
URL: https://github.com/apache/hbase/pull/5408

   **This PR tries to reimplement the log-roll procedure with proc-v2.** 
   
   **Modifies the following things**
   
   **client side:**
   
   instead of calling `admin.execProcedure()`, now we call 
`admin.execProcedureWithReturn`, and the returned value depends on the 
configuration in the server side. If master is configured to used proc-v2, the 
value would be the procedure id, otherwise nothing. Then we will keep asking 
master if the procedure has finished by calling `admin.isProcedureFinished` 
until it finished or failed. This was implemented in 
`BackupUtils#rollWALWriters`.
   
   **server side**
   
   1. enhanced `LogRollMasterProcedureManager` to support both proc-v1 and 
proc-v2
   
   2. introduce 3 new procedures.
   
   **LogRollProcedure**
   The `LogRollProcedure` is used to roll WAL for all the regionservers in the 
cluster. It acquires the shared lock of the backup system table. It has 2 
states: 
   `LOG_ROLL_PRE_CHECK` : make sure the backup system table exists and is 
enabled
   `LOG_ROLL_ROLL_LOG_ON_EACH_RS` : roll all rs WAL writers
   
   **RSLogRollProcedure**
   The RSLogRollProcedure is used to schedule a RSLogRollRemoteProcedure for 
each regionserver. When the subprocedure returns, the RSLogRollProcedure will 
check the logrolling result in the backup system table. If failed, The 
RSLogRollProcedure will schedule a new RSLogRollRemoteProcedure to retry.
   
   **RSLogRollRemoteProcedure**
   The RSLogRollRemoteProcedure is used to send the log roll request to the 
remote server.
   
   any suggestions and feedbacks are appreciated.


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

Reply via email to