//Note that, if dledger is enabled, the maxOffset maybe -1, so here only require the dispatchBehindBytes > 0
while(this.dispatchBehindBytes()>0){
/**
* 1. Finish dispatching the messages fall behind, then to start other services.
* 2. DLedger committedPos may be missing, so here just require dispatchBehindBytes <= 0
*/
while(true){
if(dispatchBehindBytes()<=0){
break;
}
Thread.sleep(1000);
log.info("Try to finish doing reput the messages fall behind during the starting, reputOffset={} maxOffset={} behind={}",this.reputMessageService.getReputFromOffset(),this.getMaxPhyOffset(),this.dispatchBehindBytes());