@@ -93,22 +93,22 @@ butil::Status ServiceHelper::ValidateRegionState(store::RegionPtr region) {
9393 return butil::Status (pb::error::EREGION_NOT_FOUND, " Not found region" );
9494 }
9595 if (region->State () == pb::common::StoreRegionState::NEW) {
96- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is new, waiting later" , region->Id ());
96+ return butil::Status (pb::error::EREGION_NEW , " Region(%lu) is new, waiting later" , region->Id ());
9797 }
9898 if (region->State () == pb::common::StoreRegionState::STANDBY) {
99- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is standby, waiting later" , region->Id ());
99+ return butil::Status (pb::error::EREGION_STANDBY , " Region(%lu) is standby, waiting later" , region->Id ());
100100 }
101101 if (region->State () == pb::common::StoreRegionState::DELETING) {
102- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is deleting" , region->Id ());
102+ return butil::Status (pb::error::EREGION_DELETING , " Region(%lu) is deleting" , region->Id ());
103103 }
104104 if (region->State () == pb::common::StoreRegionState::DELETED) {
105- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is deleted" , region->Id ());
105+ return butil::Status (pb::error::EREGION_DELETED , " Region(%lu) is deleted" , region->Id ());
106106 }
107107 if (region->State () == pb::common::StoreRegionState::ORPHAN) {
108- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is orphan" , region->Id ());
108+ return butil::Status (pb::error::EREGION_ORPHAN , " Region(%lu) is orphan" , region->Id ());
109109 }
110110 if (region->State () == pb::common::StoreRegionState::TOMBSTONE) {
111- return butil::Status (pb::error::EREGION_UNAVAILABLE , " Region(%lu) is tombstone" , region->Id ());
111+ return butil::Status (pb::error::EREGION_TOMBSTONE , " Region(%lu) is tombstone" , region->Id ());
112112 }
113113
114114 return butil::Status ();
0 commit comments