XiaoMi / rdsn

Has been migrated to https://github.com/apache/incubator-pegasus/tree/master/rdsn
Other
144 stars 58 forks source link

refactor: drop redundant config_status::pending_proposal #1050

Closed empiredan closed 2 years ago

empiredan commented 2 years ago

https://github.com/apache/incubator-pegasus/issues/908

acelyc111 commented 2 years ago

Plz check whether config_status is appeared in RPC or disk storage, remove this state may cause incompatible problem.

acelyc111 commented 2 years ago

I think mark an enum value as deprecated and remove all usage would be better.

levy5307 commented 2 years ago

Plz check whether config_status is appeared in RPC or disk storage, remove this state may cause incompatible problem.

+1

hycdong commented 2 years ago

I think mark an enum value as deprecated and remove all usage would be better.

+1

empiredan commented 2 years ago

I think mark an enum value as deprecated and remove all usage would be better.

+1

Actually since pegasus v1.8 (or even older version) pending_proposal has not yet been used to assign any variable. It's only used to compare with some read operations rather than write to some variable. On the other hand, the only usage of it is to assign to config_context::stage, a variable in memory to record current state of the configuration of a partition which doesn't need to synced to disk.

However, in case of unexpected problems I think we'd better to mark it deprecated and remove all usages, without dropping the definitions.