acelyc111 commented on PR #1666: URL: https://github.com/apache/incubator-pegasus/pull/1666#issuecomment-1824144299
> > 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,the progress is not well updated after replica restart. 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. How to comprehend `compaction's time checker prevent doing it util next day`, do you mean the logic in `bool pegasus_manual_compact_service::check_manual_compact_state()`, in this case, transfer the status from `manual_compaction_status::IDLE` to `manual_compaction_status::FINISHED` may help? -- 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: dev-unsubscr...@pegasus.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@pegasus.apache.org For additional commands, e-mail: dev-h...@pegasus.apache.org