ninsmiracle commented on PR #1666:
URL: 
https://github.com/apache/incubator-pegasus/pull/1666#issuecomment-1823877464

   > I’m confused how can this patch fix this issue, I guess the reason the 
compaction progress not update is caused by the 
[serving](https://github.com/apache/incubator-pegasus/blob/master/src/meta/meta_data.h#L217C28-L217C28)
 and the 
[progress](https://github.com/apache/incubator-pegasus/blob/master/src/meta/meta_data.cpp#L543)
 is not well updated after a node shutdown.
   
   Yes. And We can see the current logic how a replica judge itself finish 
compact this round or not:
   ```
   if (start_time_ms > 0) {
       return dsn::replication::manual_compaction_status::RUNNING;
   } else if (enqueue_time_ms > 0) {
       return dsn::replication::manual_compaction_status::QUEUING;
   } else if (last_time_used_ms > 0 && last_finish_time_ms > 0) {
       return dsn::replication::manual_compaction_status::FINISHED;
   } else {
       return dsn::replication::manual_compaction_status::IDLE;
   }
   ```
   When replica restart or migrate,`last_time_used_ms` will loss.
   And this replica will try to enter task queue again,however compaction's 
time checker prevent doing it util next day.
   So I add `LAST_MANUAL_COMPACT_USED_TIME` and persist this parameter to colum 
families. So that this replica can be judged status `finish` after replica 
migrate.
   
   
   
   


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